Tools to help validate web pages. Gathers validation results from multiple sources, providing a single interface for both requests and responses.
bashtetikn (Yiddish, verb, /bɛ-oSH-tɛk-in/): To validate, certify, or confirm
Add this line to your application's Gemfile:
gem 'bashtetikn'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install bashtetikn
require 'bashtetikn'
validator = Bashtetikn::HtmlValidator.new
suspect_url = "https://w3c-validators.github.io/w3c_validators/invalid_html5.html"
results = validator.validate_uri(suspect_url)
puts results.errors
ERROR; URI: https://w3c-validators.github.io/w3c_validators/invalid_html5.html; line 15: End tag for “body” seen, but there were unclosed elements.
ERROR; URI: https://w3c-validators.github.io/w3c_validators/invalid_html5.html; line 10: Unclosed element “section”.
puts results.warnings
=> nil
Content | Page | Fragment |
---|---|---|
HTML (W3C) | ✅ | ✅ |
Accessibility (WAVE) | 🔜 | 🔜 |
We are dockerized! If using VS Code, this should automatically load inside a Dev Environment (see: https://code.visualstudio.com/docs/remote/containers).
- Run
rake spec
to run the tests. - You can also run
bin/console
for an interactive prompt that will allow you to experiment.
After checking out the repo, run bin/setup
to install dependencies.
Bug reports and pull requests are welcome on GitHub at https://github.com/mattscilipoti/bashtetikn. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
- To install this gem onto your local machine, run
bundle exec rake install
. - To release a new version, update the version number in
version.rb
, and then runbundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the.gem
file to rubygems.org.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Bashtetikn project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.