lib/deas/route.rb in deas-0.27.0 vs lib/deas/route.rb in deas-0.28.0
- old
+ new
@@ -14,19 +14,19 @@
@route_proxy.validate!
@handler_class = @route_proxy.handler_class
end
def run(sinatra_call)
- args = {
- :sinatra_call => sinatra_call,
- :request => sinatra_call.request,
- :response => sinatra_call.response,
- :params => sinatra_call.params,
- :logger => sinatra_call.settings.logger,
- :router => sinatra_call.settings.router,
- :session => sinatra_call.session
- }
- runner = Deas::SinatraRunner.new(self.handler_class, args)
+ runner = Deas::SinatraRunner.new(self.handler_class, {
+ :sinatra_call => sinatra_call,
+ :request => sinatra_call.request,
+ :response => sinatra_call.response,
+ :session => sinatra_call.session,
+ :params => sinatra_call.params,
+ :logger => sinatra_call.settings.logger,
+ :router => sinatra_call.settings.router,
+ :template_source => sinatra_call.settings.template_source
+ })
sinatra_call.request.env.tap do |env|
env['deas.params'] = runner.params
env['deas.handler_class_name'] = self.handler_class.name
env['deas.logging'].call " Handler: #{env['deas.handler_class_name']}"