Easiest way to add multi-environment yaml settings to Rails, Sinatra, Padrino and other Ruby projects.
dry-validation
from dependencies (#333)deep_merge
's monkey patch for Hash#deep_merge
and Hash#deep_merge!
(#342). If you rely on those methods and are not using Rails / Active Support, you can load the monkey patch via require 'deep_merge/deep_merge_hash'
. This change fixes Rails 7.x support.< 5.2
are no longer supported (#316)< 2.6
are no longer supported (#316)HashSource
and EnvSource
instances in Config.load_files
and Config.load_and_set_settings
. (#315). There are a few subtle breaking changes:
Config.load_files
(called from Config.load_and_set_settings
) would call .to_s
on each of its arguments. Now, this responsibility is defered to YAMLSource. In effect, if your application passes String or Pathname objects to Config.load_files
, no changes are necessary, but if you were somehow relying on the .to_s
call for some other type of object, you'll now need to call .to_s
on that object before passing it to Config
.Config.load_files
would call uniq
on its argument array. This call has been removed, so duplicate file paths are not removed before further processing. In some cases, this can cause differences in behavior since later config files override the values in earlier ones. In most cases, it's best to ensure that duplicate paths are not passed to Config.load_files
.Config.evaluate_erb_in_yaml = false
. The default value for this option is true
for backwards-compatibility. (#303)