Sha256: d39b083002382a88c21801ba358887f7760df5be67f77ddb77a3adcf7ef9dd54

Contents?: true

Size: 393 Bytes

Versions: 159

Compression:

Stored size: 393 Bytes

Contents

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

Version data entries

159 entries across 98 versions & 5 rubygems

Version Path
middleman-core-4.6.0 fixtures/asset-hash-prefix/lib/middleware.rb
middleman-core-4.6.0 fixtures/asset-hash-source-map/lib/middleware.rb
middleman-core-4.6.0 fixtures/asset-hash-app/lib/middleware.rb
middleman-core-4.5.1 fixtures/asset-hash-source-map/lib/middleware.rb
middleman-core-4.5.1 fixtures/asset-hash-app/lib/middleware.rb
middleman-core-4.5.1 fixtures/asset-hash-prefix/lib/middleware.rb
middleman-core-4.5.0 fixtures/asset-hash-app/lib/middleware.rb
middleman-core-4.5.0 fixtures/asset-hash-source-map/lib/middleware.rb
middleman-core-4.5.0 fixtures/asset-hash-prefix/lib/middleware.rb
middleman-core-4.4.3 fixtures/asset-hash-app/lib/middleware.rb
middleman-core-4.4.3 fixtures/asset-hash-prefix/lib/middleware.rb
middleman-core-4.4.3 fixtures/asset-hash-source-map/lib/middleware.rb
middleman-core-4.4.2 fixtures/asset-hash-app/lib/middleware.rb
middleman-core-4.4.2 fixtures/asset-hash-source-map/lib/middleware.rb
middleman-core-4.4.2 fixtures/asset-hash-prefix/lib/middleware.rb
middleman-core-4.4.0 fixtures/asset-hash-prefix/lib/middleware.rb
middleman-core-4.4.0 fixtures/asset-hash-source-map/lib/middleware.rb
middleman-core-4.4.0 fixtures/asset-hash-app/lib/middleware.rb
middleman-core-4.3.11 fixtures/asset-hash-source-map/lib/middleware.rb
middleman-core-4.3.11 fixtures/asset-hash-app/lib/middleware.rb