diff --git a/lib/vanity/configuration.rb b/lib/vanity/configuration.rb index 3cfb1a52..b07101dc 100644 --- a/lib/vanity/configuration.rb +++ b/lib/vanity/configuration.rb @@ -213,7 +213,7 @@ def connection_params(file_name = nil) file_path = File.join(config_path, file_name) if File.exist?(file_path) # rubocop:todo Style/GuardClause - config = YAML.safe_load(ERB.new(File.read(file_path)).result) + config = YAML.safe_load(ERB.new(File.read(file_path)).result, [], [], true) config ||= {} params_for_environment = config[environment.to_s] diff --git a/test/dummy/config/initializers/vanity.rb b/test/dummy/config/initializers/vanity.rb new file mode 100644 index 00000000..f7870460 --- /dev/null +++ b/test/dummy/config/initializers/vanity.rb @@ -0,0 +1,3 @@ +Vanity.configure do |config| + config.config_path = Rails.root.join('config') +end diff --git a/test/dummy/config/vanity.yml b/test/dummy/config/vanity.yml new file mode 100644 index 00000000..da219ca0 --- /dev/null +++ b/test/dummy/config/vanity.yml @@ -0,0 +1,7 @@ +default: &default + some_key: true + +test: + <<: *default + adapter: mock + collecting: false