lib/sitehub/middleware.rb in sitehub-0.4.2 vs lib/sitehub/middleware.rb in sitehub-0.4.3

- old
+ new

@@ -3,11 +3,11 @@ def middlewares @middleware ||= [] end def use(middleware_clazz, *args, &block) - middlewares << [middleware_clazz, args, block|| proc{}] + middlewares << [middleware_clazz, args, block || proc {}] end def apply_middleware(forward_proxy) middlewares.reverse.inject(forward_proxy) do |app, middleware_def| middleware = middleware_def[0] @@ -16,6 +16,6 @@ middleware.new(app, *args, &block) end end end -end \ No newline at end of file +end