README.md in headhunter-0.0.5 vs README.md in headhunter-0.0.7

- old
+ new

@@ -24,10 +24,14 @@ - `rspec HEADHUNTER=true` - `cucumber HEADHUNTER=true` Headhunter doesn't keep your tests from passing if invalid HTML or unused CSS is found. Instead it displays a short statistic after the tests are run. + $ rake HEADHUNTER=true + + Precompiling assets for Headhunter... done! + 30/30 |============================= 100 ==============================>| Time: 00:00:02 Finished in 2.65 seconds 30 examples, 0 failures @@ -45,16 +49,14 @@ 20 selectors are in use. 3 selectors are not in use: a img, #flash.failure, input[type='file'] ## How it works -Headhunter registers itself as middleware in the Rack stack and triggers validation for every HTML response. +Headhunter registers itself as middleware in the Rack stack and triggers validation for every HTML response. Headhunter also iterates over every `.css` file and triggers its validation. In addition, it checks which CSS selectors are really used in the HTML pages to see whether there exist any unused CSS definitions. -For every `.css` file, validation is also triggered. In addition, it iterates over every HTML page's selectors to see whether there exist any unused CSS definitions in your `.css` files. +For being able to validate CSS, `rake assets:precompile` is triggered at the beginning of running tests. This may slow down starting your tests a bit. **Notice: all precompiled assets will be removed after the tests have finished!** -For being able to validate CSS, `rake assets:precompile` is triggered at the beginning of running tests. This may slow down starting your tests a bit. (Notice: after the tests have finished, the precompiled assets are also removed automatically by running `rake assets:clobber`.) - ## Requirements ### Tidy HTML [Tidy HTML](http://tidy.sourceforge.net/) should be installed on a typical OSX and Linux installation already. You're not developing on a Windows machine, are you?! @@ -72,9 +74,10 @@ - Instead of running `rake assets:clobber`, it may be also sufficient to simply remove all *.css files from `public/assets/stylesheets` manually. This would save some compilation time. - Instead of using the online CSS validation service of ???, it would be nice to have a local CSS validator. Is there anything like this? TotalValidator seems to be able to do something like this, but it's not free for CSS validation and I don't know how to use it. - HTML and CSS sources should not be compressed, to allow more concise error messages - Would be really useful to have the concrete URL of every validated HTML page. But can't find a way to extract it from Rack response. - There are not tests yet. I first want to see whether this gem would be appreciated by the community, and if so, I will definitely add tests. +- Didn't try this with AJAX requests yet. Would be great if such responses would be validated, too! ## Disclaimer Headhunter is heavily inspired by Aanand Prasad's (outdated) [Deadweight](https://github.com/aanand/deadweight) gem and by Unboxed Consulting's [be_valid_asset](https://github.com/unboxed/be_valid_asset) gem. Thank you for your pioneering work!