Skip to content

This gem provides tools to help validate web pages. Gathers validation results from multiple sources, providing a single interface for both requests and responses.

License

Notifications You must be signed in to change notification settings

mattscilipoti/bashtetikn

Repository files navigation

Bashtetikn

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

Gem Version Supported Ruby Versions Spec Status

Installation

Add this line to your application's Gemfile:

gem 'bashtetikn'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install bashtetikn

Usage

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

Supported Validators

Content Page Fragment
HTML (W3C)
Accessibility (WAVE) 🔜 🔜

Development

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.

If you don't want to use Docker...

After checking out the repo, run bin/setup to install dependencies.

Contributing

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.

Release Managers

  • 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 run bundle 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.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Bashtetikn project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.


I love Validator

About

This gem provides tools to help validate web pages. Gathers validation results from multiple sources, providing a single interface for both requests and responses.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published