hey web browsers, obey my stupid headers...oh you won't? well, then.
This commit is contained in:
parent
43d3ce1423
commit
7b3540ff0c
@ -13,7 +13,8 @@ module Flowerbox
|
|||||||
def _call(env)
|
def _call(env)
|
||||||
if sprockets_file = env['PATH_INFO'][%r{/__F__(.*)$}, 1]
|
if sprockets_file = env['PATH_INFO'][%r{/__F__(.*)$}, 1]
|
||||||
result = sprockets.call(env.merge('QUERY_STRING' => 'body=1', 'PATH_INFO' => sprockets_file))
|
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
|
result
|
||||||
else
|
else
|
||||||
|
@ -21,7 +21,7 @@ module Flowerbox
|
|||||||
|
|
||||||
def run(sprockets, spec_files, options)
|
def run(sprockets, spec_files, options)
|
||||||
super do
|
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
|
begin
|
||||||
navigate.call
|
navigate.call
|
||||||
@ -83,7 +83,7 @@ HTML
|
|||||||
end
|
end
|
||||||
|
|
||||||
def template_files
|
def template_files
|
||||||
sprockets.files.collect { |file| %{<script type="text/javascript" src="/__F__/#{sprockets.logical_path_for(file)}"></script>} }
|
sprockets.files.collect { |file| %{<script type="text/javascript" src="/__F__/#{sprockets.logical_path_for(file)}?#{Time.now.to_f}"></script>} }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -47,7 +47,7 @@ module Flowerbox
|
|||||||
end
|
end
|
||||||
|
|
||||||
def actual_path_for(file)
|
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
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user