- Fix warning: ostruct was loaded from the standard library with Ruby 3.3.5 and 3.4+ (#363)
- Fix funding_url to funding_uri in gemspec (#361)
- Allow arrays to be passed through env variables (#354)
- Use funding_url rather than post_install_message (#360)
- Fix typos in the tests and documentation (#359)
- Add configuration option
environment
to override the use ofRails.env
(#356)
- Remove
dry-validation
from dependencies (#333)
- Allow to use custom filename && directory name to store configs (#341)
- Prevent name collision with private methods from ancestors (#351)
- Fix conflicts with Rails 7 active_support methods (#347)
- No longer load
deep_merge
's monkey patch forHash#deep_merge
andHash#deep_merge!
(#342). If you rely on those methods and are not using Rails / Active Support, you can load the monkey patch viarequire 'deep_merge/deep_merge_hash'
. This change fixes Rails 7.x support.
- Address edge case with
table
config param (#339)
- Remove use of method
File.exists?
to fix use in Ruby 3.0 (#318)
- Only load
Railtie
integration ifRails::Railtie
is defined (#319) - Fix indentation warning in Ruby 3.1 (#322)
- Rails versions
< 5.2
are no longer supported (#316) - Ruby versions
< 2.6
are no longer supported (#316) - Support
HashSource
andEnvSource
instances inConfig.load_files
andConfig.load_and_set_settings
. (#315). There are a few subtle breaking changes:- Previously,
Config.load_files
(called fromConfig.load_and_set_settings
) would call.to_s
on each of its arguments. Now, this responsibility is deferred to YAMLSource. In effect, if your application passes String or Pathname objects toConfig.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 toConfig
. - Before this change,
Config.load_files
would calluniq
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 toConfig.load_files
.
- Previously,
- Allow the use of unsafe YAML parsing features when using psych >= 4 (#306)
- Evaluating ERB in YAML files can now be disabled with
Config.evaluate_erb_in_yaml = false
. The default value for this option istrue
for backwards-compatibility. (#303)
- After upgrade behaviour of
to_h
would change and match behaviour ofto_hash
. Check #217 for more details. Config::Options#load_env!
andConfig::Options#reload_env!
have been removed. If you need to reload settings after modifying theENV
hash, useConfig.reload!
orConfig::Options#reload!
instead.
- Added alias
to_h
forto_hash
(#277)
- Add
Config::Sources::EnvSource
for loading settings from flatHash
es withString
keys andString
values, such as from AWS SecretsManager (#299)
- Revert added alias to_h for to_hash (#277)
- Raise explicit error on environment variable conflicts (#293)
- Added alias to_h for to_hash (#277)
- Prevent unnecessary doubled loading of environment variables (#291)
- Return
Hash
fromConfig::Options#as_json
instead ofArray
of pairs when using ActiveSupport Core Extensions (#292)
- Get rid of unused Rails Engine class definition (#247)
- Require dry-validation only when schema is specified (#253)
- Defer modification of
ActionController::Base
to when it is loaded in Rails integration (#250)
- Fix missing new_ostruct_member in Ruby 2.7 (#255)
- Fix validation contract documentation (#260)
- Excluded test application's *.md files from the gem build (#267)
- Use sprockets 3.x when running unit tests for Rails 4.2 (#256)
- Cleanup example Rails application used for testing (#263)
- Upgrade markdown linter and fix errors (#265)
- Upgrade development dependencies and test matrix with latest Ruby and Rails versions (#264)
- Replace Travis CI with GitHub Actions (#266)
- Add Rails 6.0 to the test matrix (#258)
- Rename GitHub organization name from
railsconfig
torubyconfig
(#268)
- Add dry-validation contract support (#238)
- Get rid of activesupport dependency (#230)
- Ignore .local files in test environment (#135, #233)
- Execute default rspec against latest Rails app and load appropriate development dependencies dynamically (#241)
- Fix inconsistent documentation for ENV prefix and default value in generator (#246)
- Fix warnings when running tests in Rails 5 scope (#240
- Do not run incompatible code coverage on truffleruby (#242
After upgrade to dry-schema 1.0 we had to drop support for Rails < 4.2
and Ruby < 2.4
.
If you need older version of Ruby or Rails, please stick to 1.x version of this gem.
- Add
merge_hash_arrays
as a configuration option (#214)
- Upgraded dry-validation dependency to dry-schema 1.0 (#224)
- Moved constant to be defined on
Object
instead ofKernel
(#227) - Add TruffleRuby to the test matrix (#229)
- Lock max version of dry-validation depending on the ruby version (#223)
- Upgrade dependencies (#211)
- Add Ruby 2.5 and Rails 5.1 to the testing matrix on Travis (#201)
- Add Ruby 2.6 to the test matrix (#210)
- Add Rails 5.2 to the test matrix (#212)
- WARNING:
nil
values will from now on overwrite an existing value when merging configs! This change of behavior can be reverted viaconfig.merge_nil_values = false
in your Config initializer (#196)
- Make dry-validation dependency less strict allowing to use newer versions (#183)
- Fix
key?
andhas_key?
, which raise NoMethodError in non Rails environment, by using ActiveSupport#delegate
implicitly (#185) - Update
deep_merge
dependency to latest version (v1.2.1) (#191) - Upgrade
rubocop
to version 0.52.1 (#193) - Add
zip
to the list of reserved keywords (#197)
Config#fail_on_missing
option (defaultfalse
) to raise aKeyError
exception when accessing a non-existing key- Add ability to test if a value was set for a given key with
key?
andhas_key?
(#182)
- Add parsing of ENV variable values to Boolean type (#180)
- Add ability to validate config schema (#155 thanks to @ok32)
- Add count to the reserved names list (#167 thanks to @carbonin)
- Correctly parse
env_prefix
, which containsenv_separator
(#177 thanks to @rdodson41)
- Added support for passing a raw ruby hash into to both
Settings.add_source!
andSettings.prepend_source!
(#108 thanks to @halloffame)
- Added new reserved name
test
(#158 thanks to @milushov) to_hash
should not replace nested config objects with Hash (#160 thanks to @seikichi)
- WARNING: Overwrite arrays found in previously loaded settings file (#137 thanks to @Fryguy and @dtaniwaki) - this is a change breaking previous behaviour. If you want to keep Config to work as before, which is merging arrays found in following loaded settings file, please add
config.overwrite_arrays = false
to your Config initializer - Changed default ENV variables loading settings to downcase variable names and parse values
- Added parsing ENV variables values to Float type
- Change method definition order in Rails integration module to prevent undefined method
preload
error (based on @YaroSpace suggestion in #111
- Add ability to load settings from ENV variables (#108 thanks to @vinceve and @spalladino)
- Removed Rails 5 deprecation warnings for prepend_before_filter (#141)
- Downgrade minimum ruby version to 2.0.0 (#136)
- Add ability to specify knockout_prefix option for deep_merge
- Minor code and documentation refactoring and cleanup
rubyconfig
is now officially renamed toConfig
- Fixed array descent when converting to hash (#89)
- Catch OpenStruct reserved keywords (#95 by @dudo)
- Allows loading before app configuration process (#107 by @Antiarchitect)
deep_merge
is now properly managed via gemspec (#110)- Added
prepend_source!
(#102)
- Released deprecated gem migrating to the new name
- Ability to use in Settings file keywords reserved for OpenStruct: select, collect (#95)
- Made config work without Rails as a hard dependency (#86, #88)
- Fix generate error when .gitignore is missing (#85)
- Fix deprecation warning on File.exists? (#81)
- Add a shortcut method for setting files (#67)
- Improve YAMLSource load error message by outputting offending file path (#88)
- Ability to specify the app name when calling the Heroku rake task (#75)
- Fixed compatibility with Rails 4.1 (#72)
- Testing suite verifies compatibility with Rails 3.2, 4.0 and 4.1
- Compatibility with Heroku (#64)