lib/dry/web/roda/application.rb in dry-web-roda-0.7.4 vs lib/dry/web/roda/application.rb in dry-web-roda-0.7.5
- old
+ new
@@ -6,36 +6,36 @@
module Web
module Roda
class Application < ::Roda
extend Dry::Configurable
- setting :container
+ setting :container, reader: true
setting :routes
plugin :multi_route
plugin :flow
plugin :error_handler
def self.configure(&block)
super.tap do
- use(config.container[:rack_monitor])
+ use(container[:rack_monitor]) if container.config.listeners
end
end
def self.resolve(name)
- config.container[name]
+ container[name]
end
def self.[](name)
- resolve(name)
+ container[name]
end
def self.load_routes!
Dir[root.join("#{config.routes}/**/*.rb")].each { |f| require f }
end
def self.root
- config.container.config.root
+ container.config.root
end
def notifications
self.class[:notifications]
end