config 2.0.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a73b8d9d0d0b87e7663d494adcef7051ea4df4d6ab7a0e501ae096c870d0220
4
- data.tar.gz: f97f4226c7baa682647f3098317526a45c3e8d45bbbde48e80e7b3183e090736
3
+ metadata.gz: 85332d4ed746064fee534937bdc24149fcedfcc311270527b098da57c42d6a70
4
+ data.tar.gz: 704036655a9f40ddadbbc6fe8ca3854d2a74e613ee67a972e59adf4de78eaf95
5
5
  SHA512:
6
- metadata.gz: 28248c7da97c294525d04d56b5e470c171231d15bcb7bbff3029adc5b2710e00e9ebf07ea0697bbb9b2444a64d8f25a1e0a3e7492cda727bf4a84b2a8f936712
7
- data.tar.gz: 36462bd11b537212ee25d6d05c90297f65ccb4db4a7b80657f2b6c3647ff8ded75de3b8649672bad4a77b6947e17709efc875404c2a2f5126b5b7fb9a4cd0ab9
6
+ metadata.gz: 10eb564da50890bc25b7286950c73d4f88e19ab226163379b07a9f63ce4dce245592bb427949970937025c54af611f6278906e4c658b7baae3ae21cbf16892b8
7
+ data.tar.gz: 06a00c9ad9e3a5d7bd30664de4ab7821c3ae09f9edd9bc3d385a11ece34cdaf09c62bfac11fa6e14cf64596132d6c5481ed50d3f6bcf0849532adb3fd1abc855
data/CHANGELOG.md CHANGED
@@ -1,114 +1,212 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 4.0.0
4
4
 
5
- ...
5
+ ### BREAKING CHANGES
6
+
7
+ * Rails versions `< 5.2` are no longer supported ([#316](https://github.com/rubyconfig/config/pull/316))
8
+ * Ruby versions `< 2.6` are no longer supported ([#316](https://github.com/rubyconfig/config/pull/316))
9
+ * Support `HashSource` and `EnvSource` instances in `Config.load_files` and `Config.load_and_set_settings`. ([#315](https://github.com/rubyconfig/config/pull/315)). There are a few subtle breaking changes:
10
+ * Previously, `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`.
11
+ * Before this change, `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`.
12
+
13
+ ## 3.1.1
14
+
15
+ ### Bug fixes
16
+
17
+ * Allow the use of unsafe YAML parsing features when using psych >= 4 ([#306](https://github.com/railsconfig/config/issues/306))
18
+
19
+ ## 3.1.0
20
+
21
+ ### New features
22
+
23
+ * Evaluating ERB in YAML files can now be disabled with `Config.evaluate_erb_in_yaml = false`. The default value for this option is `true` for backwards-compatibility. ([#303](https://github.com/rubyconfig/config/pull/303))
24
+
25
+ ## 3.0.0
26
+
27
+ ### BREAKING CHANGES
28
+
29
+ * After upgrade behaviour of `to_h` would change and match behaviour of `to_hash`. Check [#217](https://github.com/rubyconfig/config/issues/217#issuecomment-741953382) for more details.
30
+ * `Config::Options#load_env!` and `Config::Options#reload_env!` have been removed. If you need to reload settings after modifying the `ENV` hash, use `Config.reload!` or `Config::Options#reload!` instead.
31
+
32
+ ### Bug fixes
33
+
34
+ * Added alias `to_h` for `to_hash` ([#277](https://github.com/railsconfig/config/issues/277))
35
+
36
+ ### Changes
37
+
38
+ * Add `Config::Sources::EnvSource` for loading settings from flat `Hash`es with `String` keys and `String` values, such as from AWS SecretsManager ([#299](https://github.com/railsconfig/config/pull/299))
39
+
40
+ ## 2.2.3
41
+
42
+ ### Bug fixes
43
+
44
+ * Revert added alias to_h for to_hash ([#277](https://github.com/railsconfig/config/issues/277))
45
+
46
+ ### Changes
47
+
48
+ * Raise explicit error on environment variable conflicts ([#293](https://github.com/railsconfig/config/issues/293))
49
+
50
+ ## 2.2.2
51
+
52
+ ### Bug fixes
53
+
54
+ * Added alias to_h for to_hash ([#277](https://github.com/railsconfig/config/issues/277))
55
+ * Prevent unnecessary doubled loading of environment variables ([#291](https://github.com/rubyconfig/config/pull/291))
56
+ * Return `Hash` from `Config::Options#as_json` instead of `Array` of pairs when using ActiveSupport Core Extensions ([#292](https://github.com/rubyconfig/config/pull/292))
57
+
58
+ ### Changes
59
+
60
+ * Add JRuby 9.2 to the test matrix ([#228](https://github.com/railsconfig/config/issues/228))
61
+ * Add exit! to reserved keywords ([#289](https://github.com/railsconfig/config/issues/289))
62
+
63
+ ## 2.2.1
64
+
65
+ ### Performance improvements
66
+
67
+ * Get rid of unused Rails Engine class definition ([#247](https://github.com/rubyconfig/config/pull/247))
68
+ * Require dry-validation only when schema is specified ([#253](https://github.com/rubyconfig/config/pull/253))
69
+ * Defer modification of `ActionController::Base` to when it is loaded in Rails integration ([#250](https://github.com/rubyconfig/config/pull/250))
70
+
71
+ ### Bug fixes
72
+
73
+ * Fix missing new_ostruct_member in Ruby 2.7 ([#255](https://github.com/rubyconfig/config/pull/255))
74
+ * Fix validation contract documentation ([#260](https://github.com/rubyconfig/config/pull/260))
75
+ * Excluded test application's *.md files from the gem build ([#267](https://github.com/rubyconfig/config/pull/267))
76
+
77
+ ### Changes
78
+
79
+ * Use sprockets 3.x when running unit tests for Rails 4.2 ([#256](https://github.com/rubyconfig/config/pull/256))
80
+ * Cleanup example Rails application used for testing ([#263](https://github.com/rubyconfig/config/pull/263))
81
+ * Upgrade markdown linter and fix errors ([#265](https://github.com/rubyconfig/config/pull/265))
82
+ * Upgrade development dependencies and test matrix with latest Ruby and Rails versions ([#264](https://github.com/rubyconfig/config/pull/264))
83
+ * Replace Travis CI with GitHub Actions ([#266](https://github.com/rubyconfig/config/pull/266))
84
+ * Add Rails 6.0 to the test matrix ([#258](https://github.com/rubyconfig/config/pull/258))
85
+ * Rename GitHub organization name from `railsconfig` to `rubyconfig` ([#268](https://github.com/rubyconfig/config/pull/268))
86
+
87
+ ## 2.1.0
88
+
89
+ ### New features
90
+
91
+ * Add dry-validation contract support ([#238](https://github.com/rubyconfig/config/pull/238))
92
+
93
+ ### Changes
94
+
95
+ * Get rid of activesupport dependency ([#230](https://github.com/rubyconfig/config/pull/230))
96
+ * Ignore .local files in test environment ([#135](https://github.com/rubyconfig/config/issues/135), [#233](https://github.com/rubyconfig/config/pull/233))
97
+ * Execute default rspec against latest Rails app and load appropriate development dependencies dynamically ([#241](https://github.com/rubyconfig/config/pull/241))
98
+ * Fix inconsistent documentation for ENV prefix and default value in generator ([#246](https://github.com/rubyconfig/config/pull/246))
99
+
100
+ ### Bug fixes
101
+
102
+ * Fix warnings when running tests in Rails 5 scope ([#240](https://github.com/rubyconfig/config/issues/240)
103
+ * Do not run incompatible code coverage on truffleruby ([#242](https://github.com/rubyconfig/config/issues/242)
6
104
 
7
105
  ## 2.0.0
8
106
 
9
107
  ### BREAKING CHANGES
10
108
 
11
109
  After upgrade to dry-schema 1.0 we had to drop support for Rails `< 4.2` and Ruby `< 2.4`.
12
- If you need older version of Ruby or Rails, please stick to 1.x version of this gem.
110
+ If you need older version of Ruby or Rails, please stick to 1.x version of this gem.
13
111
 
14
112
  ### New features
15
113
 
16
- * Add `merge_hash_arrays` as a configuration option ([#214](https://github.com/railsconfig/config/pull/214))
114
+ * Add `merge_hash_arrays` as a configuration option ([#214](https://github.com/rubyconfig/config/pull/214))
17
115
 
18
116
  ### Changes
19
117
 
20
- * Upgraded dry-validation dependency to dry-schema 1.0 ([#224](https://github.com/railsconfig/config/pull/224))
21
- * Moved constant to be defined on `Object` instead of `Kernel` ([#227](https://github.com/railsconfig/config/issues/227))
22
- * Add TruffleRuby to the test matrix ([#229](https://github.com/railsconfig/config/issues/229))
118
+ * Upgraded dry-validation dependency to dry-schema 1.0 ([#224](https://github.com/rubyconfig/config/pull/224))
119
+ * Moved constant to be defined on `Object` instead of `Kernel` ([#227](https://github.com/rubyconfig/config/issues/227))
120
+ * Add TruffleRuby to the test matrix ([#229](https://github.com/rubyconfig/config/issues/229))
23
121
 
24
122
  ## 1.7.2
25
123
 
26
124
  ### Bug fixes
27
125
 
28
- * Lock max version of dry-validation depending on the ruby version ([#223](https://github.com/railsconfig/config/pull/223))
126
+ * Lock max version of dry-validation depending on the ruby version ([#223](https://github.com/rubyconfig/config/pull/223))
29
127
 
30
128
  ## 1.7.1
31
129
 
32
130
  ### New features
33
131
 
34
- * Upgrade dependencies ([#211](https://github.com/railsconfig/config/pull/211))
132
+ * Upgrade dependencies ([#211](https://github.com/rubyconfig/config/pull/211))
35
133
 
36
134
  ### Changes
37
135
 
38
- * Add Ruby 2.5 and Rails 5.1 to the testing matrix on Travis ([#201](https://github.com/railsconfig/config/pull/201))
39
- * Add Ruby 2.6 tto the test matrix ([#210](https://github.com/railsconfig/config/pull/210))
40
- * Add Rails 5.2 to the test matrix ([#212](https://github.com/railsconfig/config/pull/212))
136
+ * Add Ruby 2.5 and Rails 5.1 to the testing matrix on Travis ([#201](https://github.com/rubyconfig/config/pull/201))
137
+ * Add Ruby 2.6 to the test matrix ([#210](https://github.com/rubyconfig/config/pull/210))
138
+ * Add Rails 5.2 to the test matrix ([#212](https://github.com/rubyconfig/config/pull/212))
41
139
 
42
140
  ## 1.7.0
43
141
 
44
142
  ### New features
45
143
 
46
- * **WARNING:** `nil` values will from now on overwrite an existing value when merging configs! This change of behavior can be reverted via `config.merge_nil_values = false` in your Config initializer ([#196](https://github.com/railsconfig/config/pull/196))
144
+ * **WARNING:** `nil` values will from now on overwrite an existing value when merging configs! This change of behavior can be reverted via `config.merge_nil_values = false` in your Config initializer ([#196](https://github.com/rubyconfig/config/pull/196))
47
145
 
48
146
  ## 1.6.1
49
147
 
50
148
  ### Bug fixes
51
149
 
52
- * Make dry-validation dependency less strict allowing to use newer versions ([#183](https://github.com/railsconfig/config/pull/183))
53
- * Fix `key?` and `has_key?`, which raise NoMethodError in non Rails environment, by using ActiveSupport `#delegate` implicitly ([#185](https://github.com/railsconfig/config/pull/185))
54
- * Update `deep_merge` dependency to latest version (v1.2.1) ([#191](https://github.com/railsconfig/config/pull/191))
55
- * Upgrade `rubocop` to version 0.52.1 ([#193](https://github.com/railsconfig/config/pull/193))
56
- * Add `zip` to the list of reserved keywords ([#197](https://github.com/railsconfig/config/pull/197))
150
+ * Make dry-validation dependency less strict allowing to use newer versions ([#183](https://github.com/rubyconfig/config/pull/183))
151
+ * Fix `key?` and `has_key?`, which raise NoMethodError in non Rails environment, by using ActiveSupport `#delegate` implicitly ([#185](https://github.com/rubyconfig/config/pull/185))
152
+ * Update `deep_merge` dependency to latest version (v1.2.1) ([#191](https://github.com/rubyconfig/config/pull/191))
153
+ * Upgrade `rubocop` to version 0.52.1 ([#193](https://github.com/rubyconfig/config/pull/193))
154
+ * Add `zip` to the list of reserved keywords ([#197](https://github.com/rubyconfig/config/pull/197))
57
155
 
58
156
  ## 1.6.0
59
157
 
60
158
  ### New features
61
159
 
62
160
  * `Config#fail_on_missing` option (default `false`) to raise a `KeyError` exception when accessing a non-existing key
63
- * Add ability to test if a value was set for a given key with `key?` and `has_key?` ([#182](https://github.com/railsconfig/config/pull/182))
161
+ * Add ability to test if a value was set for a given key with `key?` and `has_key?` ([#182](https://github.com/rubyconfig/config/pull/182))
64
162
 
65
163
  ## 1.5.1
66
164
 
67
165
  ### New features
68
166
 
69
- * Add parsing of ENV variable values to Boolean type ([#180](https://github.com/railsconfig/config/pull/180))
167
+ * Add parsing of ENV variable values to Boolean type ([#180](https://github.com/rubyconfig/config/pull/180))
70
168
 
71
169
  ## 1.5.0
72
170
 
73
171
  ### New features
74
172
 
75
- * Add ability to validate config schema ([#155](https://github.com/railsconfig/config/pull/155) thanks to [@ok32](https://github.com/ok32))
76
- * Add count to the reserved names list ([#167](https://github.com/railsconfig/config/pull/167) thanks to [@carbonin](https://github.com/carbonin))
173
+ * Add ability to validate config schema ([#155](https://github.com/rubyconfig/config/pull/155) thanks to [@ok32](https://github.com/ok32))
174
+ * Add count to the reserved names list ([#167](https://github.com/rubyconfig/config/pull/167) thanks to [@carbonin](https://github.com/carbonin))
77
175
 
78
176
  ### Bug fixes
79
177
 
80
- * Correctly parse `env_prefix`, which contains `env_separator` ([#177](https://github.com/railsconfig/config/pull/177) thanks to [@rdodson41](https://github.com/rdodson41))
178
+ * Correctly parse `env_prefix`, which contains `env_separator` ([#177](https://github.com/rubyconfig/config/pull/177) thanks to [@rdodson41](https://github.com/rdodson41))
81
179
 
82
180
  ## 1.4.0
83
181
 
84
182
  ### New features
85
183
 
86
- * Added support for passing a raw ruby hash into to both `Settings.add_source!` and `Settings.prepend_source!` ([#108](https://github.com/railsconfig/config/pull/159) thanks to [@halloffame](https://github.com/halloffame))
184
+ * Added support for passing a raw ruby hash into to both `Settings.add_source!` and `Settings.prepend_source!` ([#108](https://github.com/rubyconfig/config/pull/159) thanks to [@halloffame](https://github.com/halloffame))
87
185
 
88
186
  ### Bug fixes
89
187
 
90
- * Added new reserved name `test` ([#158](https://github.com/railsconfig/config/pull/158) thanks to [@milushov](https://github.com/milushov))
91
- * `to_hash` should not replace nested config objects with Hash ([#160](https://github.com/railsconfig/config/issues/160) thanks to [@seikichi](https://github.com/seikichi))
188
+ * Added new reserved name `test` ([#158](https://github.com/rubyconfig/config/pull/158) thanks to [@milushov](https://github.com/milushov))
189
+ * `to_hash` should not replace nested config objects with Hash ([#160](https://github.com/rubyconfig/config/issues/160) thanks to [@seikichi](https://github.com/seikichi))
92
190
 
93
191
  ## 1.3.0
94
192
 
95
- * **WARNING:** Overwrite arrays found in previously loaded settings file ([#137](https://github.com/railsconfig/config/pull/137) thanks to [@Fryguy](https://github.com/Fryguy) and [@dtaniwaki](https://github.com/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
193
+ * **WARNING:** Overwrite arrays found in previously loaded settings file ([#137](https://github.com/rubyconfig/config/pull/137) thanks to [@Fryguy](https://github.com/Fryguy) and [@dtaniwaki](https://github.com/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
96
194
  * Changed default ENV variables loading settings to downcase variable names and parse values
97
195
  * Added parsing ENV variables values to Float type
98
- * Change method definition order in Rails integration module to prevent undefined method `preload` error (based on [@YaroSpace](https://github.com/YaroSpace) suggestion in [#111](https://github.com/railsconfig/config/issues/111)
196
+ * Change method definition order in Rails integration module to prevent undefined method `preload` error (based on [@YaroSpace](https://github.com/YaroSpace) suggestion in [#111](https://github.com/rubyconfig/config/issues/111)
99
197
 
100
198
  ## 1.2.1
101
199
 
102
- * Fixed support for multilevel settings loaded from ENV variables (inspired by [@cbeer](https://github.com/cbeer) in [#144](https://github.com/railsconfig/config/pull/144))
200
+ * Fixed support for multilevel settings loaded from ENV variables (inspired by [@cbeer](https://github.com/cbeer) in [#144](https://github.com/rubyconfig/config/pull/144))
103
201
 
104
202
  ## 1.2.0
105
203
 
106
- * Add ability to load settings from ENV variables ([#108](https://github.com/railsconfig/config/issues/108) thanks to [@vinceve](https://github.com/vinceve) and [@spalladino](https://github.com/spalladino))
107
- * Removed Rails 5 deprecation warnings for prepend_before_filter ([#141](https://github.com/railsconfig/config/pull/141))
204
+ * Add ability to load settings from ENV variables ([#108](https://github.com/rubyconfig/config/issues/108) thanks to [@vinceve](https://github.com/vinceve) and [@spalladino](https://github.com/spalladino))
205
+ * Removed Rails 5 deprecation warnings for prepend_before_filter ([#141](https://github.com/rubyconfig/config/pull/141))
108
206
 
109
207
  ## 1.1.1
110
208
 
111
- * Downgrade minimum ruby version to 2.0.0 ([#136](https://github.com/railsconfig/config/issues/136))
209
+ * Downgrade minimum ruby version to 2.0.0 ([#136](https://github.com/rubyconfig/config/issues/136))
112
210
 
113
211
  ## 1.1.0
114
212
 
@@ -117,12 +215,12 @@ If you need older version of Ruby or Rails, please stick to 1.x version of this
117
215
 
118
216
  ## 1.0.0
119
217
 
120
- * `RailsConfig` is now officially renamed to `Config`
121
- * Fixed array descent when converting to hash ([#89](https://github.com/railsconfig/config/pull/89))
122
- * Catch OpenStruct reserved keywords ([#95](https://github.com/railsconfig/config/pull/95) by [@dudo](https://github.com/dudo))
123
- * Allows loading before app configuration process ([#107](https://github.com/railsconfig/config/pull/107) by [@Antiarchitect](https://github.com/Antiarchitect))
124
- * `deep_merge` is now properly managed via gemspec ([#110](https://github.com/railsconfig/config/pull/110))
125
- * Added `prepend_source!` ([#102](https://github.com/railsconfig/config/pull/102))
218
+ * `rubyconfig` is now officially renamed to `Config`
219
+ * Fixed array descent when converting to hash ([#89](https://github.com/rubyconfig/config/pull/89))
220
+ * Catch OpenStruct reserved keywords ([#95](https://github.com/rubyconfig/config/pull/95) by [@dudo](https://github.com/dudo))
221
+ * Allows loading before app configuration process ([#107](https://github.com/rubyconfig/config/pull/107) by [@Antiarchitect](https://github.com/Antiarchitect))
222
+ * `deep_merge` is now properly managed via gemspec ([#110](https://github.com/rubyconfig/config/pull/110))
223
+ * Added `prepend_source!` ([#102](https://github.com/rubyconfig/config/pull/102))
126
224
 
127
225
  ## 0.99
128
226
 
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,32 @@
1
+ # Contributing
2
+
3
+ Install appraisal
4
+
5
+ ```bash
6
+ gem install bundler -v 1.17.3
7
+ gem install appraisal
8
+ ```
9
+
10
+ Bundle
11
+
12
+ ```bash
13
+ bundle install
14
+ ```
15
+
16
+ Bootstrap
17
+
18
+ ```bash
19
+ appraisal install
20
+ ```
21
+
22
+ Run the test suite:
23
+
24
+ ```bash
25
+ appraisal rspec
26
+ ```
27
+
28
+ If you modified any of the documentation files verify their format:
29
+
30
+ ```bash
31
+ mdl *.md
32
+ ```