diff --git a/lib/flowerbox/rack.rb b/lib/flowerbox/rack.rb index b1c5c84..134a299 100644 --- a/lib/flowerbox/rack.rb +++ b/lib/flowerbox/rack.rb @@ -13,7 +13,8 @@ module Flowerbox def _call(env) if sprockets_file = env['PATH_INFO'][%r{/__F__(.*)$}, 1] result = sprockets.call(env.merge('QUERY_STRING' => 'body=1', 'PATH_INFO' => sprockets_file)) - result[1]['Cache-Control'] = 'max-age: 0' + result[1]['Cache-Control'] = 'max-age: 0; must-revalidate; no-store' + result[1].delete('ETag') result else diff --git a/lib/flowerbox/runner/selenium.rb b/lib/flowerbox/runner/selenium.rb index 06e6d75..9650d05 100644 --- a/lib/flowerbox/runner/selenium.rb +++ b/lib/flowerbox/runner/selenium.rb @@ -21,7 +21,7 @@ module Flowerbox def run(sprockets, spec_files, options) super do - navigate = Proc.new { browser.navigate.to "http://localhost:#{server.port}/" } + navigate = Proc.new { browser.navigate.to "http://localhost:#{server.port}/?#{Time.now.to_f}" } begin navigate.call @@ -83,7 +83,7 @@ HTML end def template_files - sprockets.files.collect { |file| %{} } + sprockets.files.collect { |file| %{} } end end end diff --git a/lib/flowerbox/test_environment/base.rb b/lib/flowerbox/test_environment/base.rb index 48df9c3..0dba4e2 100644 --- a/lib/flowerbox/test_environment/base.rb +++ b/lib/flowerbox/test_environment/base.rb @@ -47,7 +47,7 @@ module Flowerbox end def actual_path_for(file) - @sprockets.find_asset(file, :bundle => false).pathname.to_s + @sprockets.find_asset(file.gsub(%r{\?.*$}, ''), :bundle => false).pathname.to_s end end end