Skip to content

Instantly share code, notes, and snippets.

@kevwil
Created December 5, 2009 01:49
Show Gist options
  • Save kevwil/249506 to your computer and use it in GitHub Desktop.
Save kevwil/249506 to your computer and use it in GitHub Desktop.
setup for @app.call errors
builder = Rack::Builder.new do
use Rack::CommonLogger
use Rack::Lint
use Rack::ShowExceptions
lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['OK']] }
use Rack::Lint
end
@app = builder.to_app
# pass app to server, server calls app and gets response
status, headers, body = @app.call(env)
# ^ will be one of the used Rack:: classes, not 200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment