This script validates the generated guides against the W3C Validator.
Guides are taken from the output directory, from where all .html files are submitted to the validator.
This script is prepared to be launched from the guides directory as a rake task:
rake guides:validate
If nothing is specified, all files will be validated, but you can check just some of them using this environment variable:
ONLY
Use ONLY if you want to validate only one or a set of guides. Prefixes are
enough:
# validates only association_basics.html
rake guides:validate ONLY=assoc
Separate many using commas:
# validates only association_basics.html and migrations.html
rake guides:validate ONLY=assoc,migrations
Required Files
- w3c_validators
Namespace
- MODULE RailsGuides
- CLASS RailsGuides::Validator