Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rack middleware for proofing HTML at runtime #512

Merged
merged 5 commits into from Jun 16, 2019

Conversation

DanielHeath
Copy link
Contributor

Sample usage in a Rails app: Add to config/application.rb

config.middleware.use HTMLProofer::Middleware if Rails.env.test?
config.middleware.use HTMLProofer::Middleware if Rails.env.development?

This will raise an error at runtime if your HTML is invalid.

Particularly helpful for projects which have extensive CI.

@codecov-io
Copy link

codecov-io commented Mar 14, 2019

Codecov Report

Merging #512 into master will increase coverage by 0.04%.
The diff coverage is 98.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #512      +/-   ##
==========================================
+ Coverage   98.33%   98.38%   +0.04%     
==========================================
  Files          28       30       +2     
  Lines        1867     1918      +51     
==========================================
+ Hits         1836     1887      +51     
  Misses         31       31
Impacted Files Coverage Δ
spec/html-proofer/middleware_spec.rb 100% <100%> (ø)
lib/html-proofer/runner.rb 99.05% <100%> (ø) ⬆️
lib/html-proofer/middleware.rb 96.66% <96.66%> (ø)
lib/html-proofer/log.rb 95.83% <0%> (+4.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d00955d...edeeb3d. Read the comment docs.

lib/html-proofer/middleware.rb Show resolved Hide resolved
lib/html-proofer/middleware.rb Show resolved Hide resolved
@DanielHeath
Copy link
Contributor Author

@gjtorikian I think that was everything - anything else needed before a merge?

@gjtorikian gjtorikian merged commit edeeb3d into gjtorikian:master Jun 16, 2019
@gjtorikian
Copy link
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants