Skip to content

Instantly share code, notes, and snippets.

@amster
Created February 16, 2011 19:12
Show Gist options
  • Save amster/829941 to your computer and use it in GitHub Desktop.
Save amster/829941 to your computer and use it in GitHub Desktop.
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
class TestMiddleware
def initialize(app)
@app = app
end
def call(env)
puts "------------------TestMiddleware--------------"
puts env.to_yaml
@app.call(env)
end
end
run TestMiddleware.new(TestApp::Application)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment