lib/ur/middleware.rb in ur-0.2.1 vs lib/ur/middleware.rb in ur-0.2.2

- old
+ new

@@ -28,11 +28,11 @@ end class FaradayMiddleware < ::Faraday::Middleware include Ur::Middleware def call(request_env) - ur = Ur.from_faraday_request(request_env, @options.select { |k, _| [:schemas].include?(k) }) + ur = Ur.from_faraday_request(request_env, **@options.select { |k, _| [:schemas].include?(k) }) invoke_callback(:before_request, ur) begin_request(ur) ur.faraday_on_complete(@app, request_env) do |response_env| finish_request(ur) invoke_callback(:after_response, ur) @@ -41,10 +41,10 @@ end class RackMiddleware include Ur::Middleware def call(env) - ur = Ur.from_rack_request(env, @options.select { |k, _| [:schemas].include?(k) }) + ur = Ur.from_rack_request(env, **@options.select { |k, _| [:schemas].include?(k) }) invoke_callback(:before_request, ur) begin_request(ur) ur.with_rack_response(@app, env) do finish_request(ur) invoke_callback(:after_response, ur)