Sha256: cee8f9884bec5206b01dcccd8aa05b5fbff24242c9ae0165fd6903b1975b2c34
Contents?: true
Size: 1.04 KB
Versions: 3
Compression:
Stored size: 1.04 KB
Contents
# # frozen_string_literal: true # require "hanami/application/router" # Hanami.application.register_provider :router do # start do # configuration = Hanami.application.configuration # routes = begin # require File.join(configuration.root, configuration.router.routes_path) # routes_class = Hanami.application.send(:autodiscover_application_constant, configuration.router.routes_class_name) # WIP private # routes_class.routes # rescue LoadError # proc {} # end # resolver = configuration.router.resolver.new( # slices: Hanami.application.slices, # inflector: Hanami.application.inflector # TODO: use container[:inflector]? # ) # router = Hanami::Application::Router.new( # routes: routes, # resolver: resolver, # **configuration.router.options, # ) do # use Hanami.application[:rack_monitor] # Hanami.application.config.for_each_middleware do |m, *args, &block| # use(m, *args, &block) # end # end # register :router, router # end # end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hanami-2.0.0.alpha8 | lib/hanami/application/routing/router.rb |
hanami-2.0.0.alpha7.1 | lib/hanami/application/routing/router.rb |
hanami-2.0.0.alpha7 | lib/hanami/application/routing/router.rb |