lib/esplanade/middlewares/dangerous_middleware.rb in esplanade-1.6.0 vs lib/esplanade/middlewares/dangerous_middleware.rb in esplanade-1.7.0
- old
+ new
@@ -2,21 +2,12 @@
require 'esplanade/request'
require 'esplanade/response'
module Esplanade
class DangerousMiddleware
- def initialize(
- app,
- prefix: Esplanade.configuration.prefix,
- apib_path: Esplanade.configuration.apib_path,
- drafter_yaml_path: Esplanade.configuration.drafter_yaml_path
- )
+ def initialize(app, **params)
@app = app
- @documentation = Tomograph::Tomogram.new(
- prefix: prefix,
- apib_path: apib_path,
- drafter_yaml_path: drafter_yaml_path
- )
+ @documentation = Tomograph::Tomogram.new(Esplanade.configuration.params.merge(params))
end
def call(env)
request = Esplanade::Request.new(@documentation, env)
request.validation.valid!