class PeekAView::Tools::YSlow
Public Instance Methods
check(uri)
click to toggle source
# File lib/peek_a_view/tools/yslow.rb, line 8 def check(uri) system "phantomjs '#{yslow_script}' -f plain '#{uri}'" end
report(uri)
click to toggle source
# File lib/peek_a_view/tools/yslow.rb, line 12 def report(uri) system "phantomjs '#{yslow_script}' -f junit '#{uri}' > '#{report_file(uri)}'" end
Private Instance Methods
report_dir()
click to toggle source
# File lib/peek_a_view/tools/yslow.rb, line 22 def report_dir File.join(Rails.root, 'reports', 'yslow') end
report_file(uri)
click to toggle source
# File lib/peek_a_view/tools/yslow.rb, line 26 def report_file(uri) report_path(uri, '.xml') end
yslow_script()
click to toggle source
# File lib/peek_a_view/tools/yslow.rb, line 18 def yslow_script File.join(PeekAView::Engine.config.root, 'vendor', 'yslow.js') end