merge more into core, use gem availability to autoload
This commit is contained in:
parent
27a9fa98f7
commit
9ebddeed1d
476 changed files with 81 additions and 141 deletions
16
middleman-core/fixtures/asset-hash-app/lib/middleware.rb
Normal file
16
middleman-core/fixtures/asset-hash-app/lib/middleware.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
class Middleware
|
||||
def initialize(app)
|
||||
@app = app
|
||||
end
|
||||
|
||||
def call(env)
|
||||
status, headers, response = @app.call(env)
|
||||
body = ''
|
||||
response.each {|part| body += part }
|
||||
if (env["PATH_INFO"] =~ /css$/)
|
||||
body += "\n/* Added by Rack filter */"
|
||||
status, headers, response = Rack::Response.new(body, status, headers).finish
|
||||
end
|
||||
[status, headers, response]
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue