lib/hanami/app.rb in hanami-2.0.0.beta3 vs lib/hanami/app.rb in hanami-2.0.0.beta4

- old
+ new

@@ -1,8 +1,8 @@ # frozen_string_literal: true -require_relative "configuration" +require_relative "config" require_relative "constants" require_relative "slice" require_relative "slice_name" module Hanami @@ -27,11 +27,11 @@ subclass.extend(ClassMethods) @_mutex.synchronize do subclass.class_eval do - @configuration = Hanami::Configuration.new(app_name: slice_name, env: Hanami.env) + @config = Hanami::Config.new(app_name: slice_name, env: Hanami.env) # Prepare the load path (based on the default root of `Dir.pwd`) as early as # possible, so you can make a `require` inside the body of an `App` subclass, # which may be useful for certain kinds of app configuration. prepare_load_path @@ -41,11 +41,11 @@ end end # App class interface module ClassMethods - attr_reader :configuration + attr_reader :config def app_name slice_name end @@ -150,10 +150,10 @@ end end # When auto-registering components in app/, ignore files in `app/lib/` (these will # be auto-registered as above), as well as the configured no_auto_register_paths - no_auto_register_paths = ([LIB_DIR] + configuration.no_auto_register_paths) + no_auto_register_paths = ([LIB_DIR] + config.no_auto_register_paths) .map { |path| path.end_with?(File::SEPARATOR) ? path : "#{path}#{File::SEPARATOR}" } if root.join(APP_DIR).directory?