lib/deas/route.rb in deas-0.2.1 vs lib/deas/route.rb in deas-0.3.0
- old
+ new
@@ -15,11 +15,17 @@
def constantize!
@handler_class ||= constantize_name(handler_class_name)
raise(NoHandlerClassError.new(handler_class_name)) if !@handler_class
end
- def runner(sinatra_call)
- Deas::SinatraRunner.new(@handler_class, sinatra_call)
+ def run(sinatra_call)
+ sinatra_call.request.env.tap do |env|
+ env['sinatra.params'] = sinatra_call.params
+ env['deas.handler_class'] = @handler_class
+ env['deas.logging'].call " Handler: #{env['deas.handler_class']}"
+ env['deas.logging'].call " Params: #{env['sinatra.params'].inspect}"
+ end
+ Deas::SinatraRunner.run(@handler_class, sinatra_call)
end
private
def constantize_name(class_name)