mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
c1aa6663a5
Moved Rack middleware management into Sinatra::Application and enabled support for assembling custom Rack middleware pipelines before an app. require 'sinatra' use Rack::Lint use Rack::Authentication get '/' do "Hello, World" end Assuming a default set of options, this would result in the following pipeline leading to the application: CommonLogger -> Lint -> Authentication -> Application (The Rack::CommonLogger middleware is created automatically when the :logging option is enabled.) Also worth noting is that the pipeline leading to the application is reassembled on each request during reload in :development mode. |
||
---|---|---|
.. | ||
public | ||
views | ||
app_test.rb | ||
application_test.rb | ||
builder_test.rb | ||
custom_error_test.rb | ||
diddy_test.rb | ||
erb_test.rb | ||
event_context_test.rb | ||
events_test.rb | ||
haml_test.rb | ||
helper.rb | ||
mapped_error_test.rb | ||
pipeline_test.rb | ||
rest_test.rb | ||
sass_test.rb | ||
sessions_test.rb | ||
streaming_test.rb | ||
sym_params_test.rb | ||
template_test.rb | ||
use_in_file_templates_test.rb |