lib/muchkeys/rails.rb in muchkeys-0.7.0 vs lib/muchkeys/rails.rb in muchkeys-0.7.1

- old
+ new

@@ -1,18 +1,8 @@ module Muchkeys class Rails < Rails::Railtie config.before_configuration do - app_config = YAML.load(File.read(::Rails.root.join("config", "muchkeys.yml"))) - Muchkeys.configure do |config| - config.application_name ||= app_config[:application_name] || ::Rails.application.class.parent_name.underscore - config.consul_url ||= app_config[:consul_url] || "http://localhost:8500" - config.keys_dir ||= app_config[:keys_dir] - config.private_key ||= app_config[:private_key] - config.public_key ||= app_config[:public_key] - config.search_paths ||= app_config[:search_paths] - config.secrets_hint ||= app_config[:secrets_hint] - end - + Muchkeys.configure_from_yaml(::Rails.root.join("config", "muchkeys.yml")) Muchkeys.populate_environment!(*Muchkeys.env_keys) end end end