lib/hanami/providers/rack.rb in hanami-2.2.0.beta1 vs lib/hanami/providers/rack.rb in hanami-2.2.0.beta2

- old
+ new

@@ -10,11 +10,11 @@ # @see https://github.com/rack/rack # @see https://dry-rb.org/gems/dry-monitor/ # # @api private # @since 2.0.0 - class Rack < Dry::System::Provider::Source + class Rack < Hanami::Provider::Source # @api private def prepare Dry::Monitor.load_extensions(:rack) # Explicitly register the Rack middleware events on our notifications bus. The Dry::Monitor @@ -28,17 +28,17 @@ notifications.register_event(Dry::Monitor::Rack::Middleware::REQUEST_ERROR) end # @api private def start - target.start :logger + slice.start :logger monitor_middleware = Dry::Monitor::Rack::Middleware.new( target["notifications"], clock: Dry::Monitor::Clock.new(unit: :microsecond) ) - rack_logger = Hanami::Web::RackLogger.new(target[:logger], env: target.container.env) + rack_logger = Hanami::Web::RackLogger.new(target[:logger], env: slice.container.env) rack_logger.attach(monitor_middleware) register "monitor", monitor_middleware end end