lib/config_default.rb in config_default-0.2.0 vs lib/config_default.rb in config_default-0.2.1
- old
+ new
@@ -2,12 +2,14 @@
require "active_support/core_ext/hash"
require "config_default/version"
require "config_default/config"
+require "config_default/init"
require "config_default/struct"
-require "config_default/rails_monkey_patch"
+require "config_default/rails_application_extension"
+require "config_default/rails_application_configuration_extension"
module ConfigDefault
extend self
attr_accessor :config
@@ -16,10 +18,14 @@
def configure
yield(config) if block_given?
end
+ def init_rails_monkey_patch!
+ ConfigDefault::Init.init_rails_monkey_patch!
+ end
+
def load(name, key: Rails.env, symbolize_keys: false, deep_symbolize_keys: false)
default_config = load_file("#{name}.#{config.postfix}")
config = load_file(name)
data = default_config.deep_merge(config)
@@ -47,7 +53,5 @@
recursive: recursive,
allow_nil: allow_nil,
)
end
end
-
-ConfigDefault::RailsMonkeyPatch.call