Fix asset_hashing assets affected by Rack middleware or mounted apps (like sprockets). Fixes #558
This commit is contained in:
parent
4076666c19
commit
09ba0049d4
4 changed files with 17 additions and 7 deletions
|
@ -99,10 +99,7 @@ module Middleman::Cli
|
|||
#
|
||||
# @return [Rack::Test::Session]
|
||||
def shared_rack
|
||||
@_shared_rack ||= begin
|
||||
mock = ::Rack::MockSession.new(shared_server.to_rack_app)
|
||||
::Rack::Test::Session.new(mock)
|
||||
end
|
||||
@_shared_rack ||= ::Rack::Test::Session.new(shared_server.to_rack_app)
|
||||
end
|
||||
|
||||
# Set the root path to the Middleman::Application's root
|
||||
|
|
|
@ -37,7 +37,6 @@ module Middleman
|
|||
# @private
|
||||
def reset!
|
||||
@app = nil
|
||||
@prototype = nil
|
||||
end
|
||||
|
||||
# The shared Rack instance being build
|
||||
|
@ -94,7 +93,8 @@ module Middleman
|
|||
# @private
|
||||
# @return [Rack::Builder]
|
||||
def prototype
|
||||
@prototype ||= to_rack_app
|
||||
reset!
|
||||
to_rack_app
|
||||
end
|
||||
|
||||
# Call prototype, use in config.ru
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue