lib/rack/app/middlewares/configuration.rb in rack-app-5.10.2 vs lib/rack/app/middlewares/configuration.rb in rack-app-5.11.0
- old
+ new
@@ -1,25 +1,23 @@
require "rack/builder"
require "rack/request"
require "rack/response"
class Rack::App::Middlewares::Configuration
- require "rack/app/middlewares/configuration/path_params_matcher"
-
def initialize(app, config)
@app = app || raise
@serializer = config.serializer || raise
@handler_class = config.app_class || raise
@payload_parser = config.payload_builder.to_parser || raise
end
def call(env)
- env[Rack::App::Constants::ENV::REQUEST_HANDLER]= handler(env)
+ env[::Rack::App::Constants::ENV::REQUEST_HANDLER]= handler(env)
env[::Rack::App::Constants::ENV::SERIALIZER]= @serializer
env[::Rack::App::Constants::ENV::PAYLOAD_PARSER]= @payload_parser
env[::Rack::App::Constants::ENV::PAYLOAD_GETTER]= lambda do
- env[::Rack::App::Constants::ENV::PARSED_PAYLOAD] ||= env[::Rack::App::Constants::ENV::PAYLOAD_PARSER].parse_env(env)
- end
+ env[::Rack::App::Constants::ENV::PARSED_PAYLOAD] ||= env[::Rack::App::Constants::ENV::PAYLOAD_PARSER].parse_env(env)
+ end
@app.call(env)
end
protected