lib/headhunter/runner.rb in headhunter-0.1.4 vs lib/headhunter/runner.rb in headhunter-0.1.5
- old
+ new
@@ -14,30 +14,30 @@
@html_validator = HtmlValidator.new
@css_hunter = CssHunter.new(stylesheets)
@css_validator = CssValidator.new(stylesheets)
- @css_validator.process!
end
- def process!(url, html)
- @html_validator.process!(url, html)
- @css_hunter.process!(url, html)
+ def process(url, html)
+ @html_validator.validate(url, html)
+ @css_hunter.process(url, html)
end
def clean_up!
print "Headhunter is removing precompiled assets...".yellow
remove_assets!
puts " done!".yellow
end
def report
- @html_validator.prepare_results_html
+ puts [ @html_validator.statistics,
+ @css_validator.statistics,
+ @css_hunter.statistics
+ ].join "\n\n"
- @html_validator.report
- @css_validator.report
- @css_hunter.report
+ puts
end
private
def precompile_assets!
@@ -56,9 +56,9 @@
def remove_assets!
FileUtils.rm_r ASSETS_PATH if File.exist?(ASSETS_PATH)
end
def stylesheets
- Dir["#{ASSETS_PATH}/*.css"]
+ Dir["#{::Rails.root}/#{ASSETS_PATH}/*.css"]
end
end
end