Created
April 13, 2009 21:31
-
-
Save vangberg/94742 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Classical top-style apps and Sinatra::Default has a bunch of useful | |
# default settings not found in Sinatra::Base: | |
# | |
# - Exceptions are mapped to the error handler of your Sinatra app | |
# instead of propagating to Rack | |
# | |
# - The Rack::MethodOverride middleware is enabled, allowing the | |
# '_method=PUT' hack | |
# | |
# - Static files are served from the public directory | |
# | |
# - Logging is enabled | |
# | |
# .. and then some. Take a look at the source yourself: | |
class Default < Base | |
set :raise_errors, Proc.new { test? } | |
set :dump_errors, true | |
set :sessions, false | |
set :logging, Proc.new { ! test? } | |
set :methodoverride, true | |
set :static, true | |
set :run, Proc.new { ! test? } | |
.. | |
end | |
# Refer to http://www.sinatrarb.com/configuration.html for documenation | |
# for the different options. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment