config 2.1.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +69 -43
- data/CONTRIBUTING.md +1 -1
- data/README.md +16 -26
- data/config.gemspec +11 -14
- data/lib/config.rb +0 -2
- data/lib/config/integrations/rails/railtie.rb +1 -1
- data/lib/config/options.rb +1 -2
- data/lib/config/validation/schema.rb +2 -0
- data/lib/config/version.rb +1 -1
- metadata +19 -17
- data/lib/config/integrations/rails/engine.rb +0 -9
- data/spec/app/rails_5.0/README.md +0 -24
- data/spec/app/rails_5.1/README.md +0 -24
- data/spec/app/rails_5.2/README.md +0 -24
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 554478f496c7582db5d4a3965d44499cde1b9d739002cf9e828eb0578de3b356
|
|
4
|
+
data.tar.gz: d3d21afa1efa34e03d958e4ae347de44ff00f2e1f45ffdeceef8785bfcb41b61
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bde322b8eb560783917d36ebcaea664d10b255ccdf915b86fa8330b3e7ed50aba4c3f66ba265f5b2bd896a679bd74ccc6add60e2f5d92a088fb8c1d61cafce75
|
|
7
|
+
data.tar.gz: 81895a02cdda30016f6dc80d2f6a5d3e01669d884ee177ec5bbdc910938a4e3f5964749416694afa99b375316735ba98c1a375ee90430a847b6ee5cd68e64809
|
data/CHANGELOG.md
CHANGED
|
@@ -2,129 +2,155 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
...
|
|
6
|
+
|
|
7
|
+
## 2.2.1
|
|
8
|
+
|
|
9
|
+
### Performance improvements
|
|
10
|
+
|
|
11
|
+
* Get rid of unused Rails Engine class definition ([#247](https://github.com/rubyconfig/config/pull/247))
|
|
12
|
+
* Require dry-validation only when schema is specified ([#253](https://github.com/rubyconfig/config/pull/253))
|
|
13
|
+
* Defer modification of `ActionController::Base` to when it is loaded in Rails integration ([#250](https://github.com/rubyconfig/config/pull/250))
|
|
14
|
+
|
|
15
|
+
### Bug fixes
|
|
16
|
+
|
|
17
|
+
* Fix missing new_ostruct_member in Ruby 2.7 ([#255](https://github.com/rubyconfig/config/pull/255))
|
|
18
|
+
* Fix validation contract documentation ([#260](https://github.com/rubyconfig/config/pull/260))
|
|
19
|
+
* Fix validation contract documentation ([#260](https://github.com/rubyconfig/config/pull/260))
|
|
20
|
+
|
|
21
|
+
### Changes
|
|
22
|
+
|
|
23
|
+
* Use sprockets 3.x when running unit tests for Rails 4.2 ([#256](https://github.com/rubyconfig/config/pull/256))
|
|
24
|
+
* Cleanup example Rails application used for testing ([#263](https://github.com/rubyconfig/config/pull/263))
|
|
25
|
+
* Upgrade markdown linter and fix errors ([#265](https://github.com/rubyconfig/config/pull/265))
|
|
26
|
+
* Upgrade development dependencies and test matrix with latest Ruby and Rails versions ([#264](https://github.com/rubyconfig/config/pull/264))
|
|
27
|
+
* Replace Travis CI with GitHub Actions ([#266](https://github.com/rubyconfig/config/pull/266))
|
|
28
|
+
* Add Rails 6.0 to the test matrix ([#258](https://github.com/rubyconfig/config/pull/258))
|
|
29
|
+
* Rename GitHub organization name from `railsconfig` to `rubyconfig` ([#268](https://github.com/rubyconfig/config/pull/268))
|
|
30
|
+
|
|
5
31
|
## 2.1.0
|
|
6
32
|
|
|
7
33
|
### New features
|
|
8
34
|
|
|
9
|
-
* Add dry-validation contract support ([#238](https://github.com/
|
|
35
|
+
* Add dry-validation contract support ([#238](https://github.com/rubyconfig/config/pull/238))
|
|
10
36
|
|
|
11
37
|
### Changes
|
|
12
38
|
|
|
13
|
-
* Get rid of activesupport dependency ([#230](https://github.com/
|
|
14
|
-
* Ignore .local files in test environment ([#135](https://github.com/
|
|
15
|
-
* Execute default rspec against latest Rails app and load appropriate development dependencies dynamically ([#241](https://github.com/
|
|
16
|
-
* Fix inconsistent documentation for ENV prefix and default value in generator ([#246](https://github.com/
|
|
39
|
+
* Get rid of activesupport dependency ([#230](https://github.com/rubyconfig/config/pull/230))
|
|
40
|
+
* Ignore .local files in test environment ([#135](https://github.com/rubyconfig/config/issues/135), [#233](https://github.com/rubyconfig/config/pull/233))
|
|
41
|
+
* Execute default rspec against latest Rails app and load appropriate development dependencies dynamically ([#241](https://github.com/rubyconfig/config/pull/241))
|
|
42
|
+
* Fix inconsistent documentation for ENV prefix and default value in generator ([#246](https://github.com/rubyconfig/config/pull/246))
|
|
17
43
|
|
|
18
44
|
### Bug fixes
|
|
19
45
|
|
|
20
|
-
* Fix warnings when running tests in Rails 5 scope ([#240](https://github.com/
|
|
21
|
-
* Do not run incompatible code coverage on truffleruby ([#242](https://github.com/
|
|
46
|
+
* Fix warnings when running tests in Rails 5 scope ([#240](https://github.com/rubyconfig/config/issues/240)
|
|
47
|
+
* Do not run incompatible code coverage on truffleruby ([#242](https://github.com/rubyconfig/config/issues/242)
|
|
22
48
|
|
|
23
49
|
## 2.0.0
|
|
24
50
|
|
|
25
51
|
### BREAKING CHANGES
|
|
26
52
|
|
|
27
53
|
After upgrade to dry-schema 1.0 we had to drop support for Rails `< 4.2` and Ruby `< 2.4`.
|
|
28
|
-
If you need older version of Ruby or Rails, please stick to 1.x version of this gem.
|
|
54
|
+
If you need older version of Ruby or Rails, please stick to 1.x version of this gem.
|
|
29
55
|
|
|
30
56
|
### New features
|
|
31
57
|
|
|
32
|
-
* Add `merge_hash_arrays` as a configuration option ([#214](https://github.com/
|
|
58
|
+
* Add `merge_hash_arrays` as a configuration option ([#214](https://github.com/rubyconfig/config/pull/214))
|
|
33
59
|
|
|
34
60
|
### Changes
|
|
35
61
|
|
|
36
|
-
* Upgraded dry-validation dependency to dry-schema 1.0 ([#224](https://github.com/
|
|
37
|
-
* Moved constant to be defined on `Object` instead of `Kernel` ([#227](https://github.com/
|
|
38
|
-
* Add TruffleRuby to the test matrix ([#229](https://github.com/
|
|
62
|
+
* Upgraded dry-validation dependency to dry-schema 1.0 ([#224](https://github.com/rubyconfig/config/pull/224))
|
|
63
|
+
* Moved constant to be defined on `Object` instead of `Kernel` ([#227](https://github.com/rubyconfig/config/issues/227))
|
|
64
|
+
* Add TruffleRuby to the test matrix ([#229](https://github.com/rubyconfig/config/issues/229))
|
|
39
65
|
|
|
40
66
|
## 1.7.2
|
|
41
67
|
|
|
42
68
|
### Bug fixes
|
|
43
69
|
|
|
44
|
-
* Lock max version of dry-validation depending on the ruby version ([#223](https://github.com/
|
|
70
|
+
* Lock max version of dry-validation depending on the ruby version ([#223](https://github.com/rubyconfig/config/pull/223))
|
|
45
71
|
|
|
46
72
|
## 1.7.1
|
|
47
73
|
|
|
48
74
|
### New features
|
|
49
75
|
|
|
50
|
-
* Upgrade dependencies ([#211](https://github.com/
|
|
76
|
+
* Upgrade dependencies ([#211](https://github.com/rubyconfig/config/pull/211))
|
|
51
77
|
|
|
52
78
|
### Changes
|
|
53
79
|
|
|
54
|
-
* Add Ruby 2.5 and Rails 5.1 to the testing matrix on Travis ([#201](https://github.com/
|
|
55
|
-
* Add Ruby 2.6
|
|
56
|
-
* Add Rails 5.2 to the test matrix ([#212](https://github.com/
|
|
80
|
+
* Add Ruby 2.5 and Rails 5.1 to the testing matrix on Travis ([#201](https://github.com/rubyconfig/config/pull/201))
|
|
81
|
+
* Add Ruby 2.6 to the test matrix ([#210](https://github.com/rubyconfig/config/pull/210))
|
|
82
|
+
* Add Rails 5.2 to the test matrix ([#212](https://github.com/rubyconfig/config/pull/212))
|
|
57
83
|
|
|
58
84
|
## 1.7.0
|
|
59
85
|
|
|
60
86
|
### New features
|
|
61
87
|
|
|
62
|
-
* **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/
|
|
88
|
+
* **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))
|
|
63
89
|
|
|
64
90
|
## 1.6.1
|
|
65
91
|
|
|
66
92
|
### Bug fixes
|
|
67
93
|
|
|
68
|
-
* Make dry-validation dependency less strict allowing to use newer versions ([#183](https://github.com/
|
|
69
|
-
* Fix `key?` and `has_key?`, which raise NoMethodError in non Rails environment, by using ActiveSupport `#delegate` implicitly ([#185](https://github.com/
|
|
70
|
-
* Update `deep_merge` dependency to latest version (v1.2.1) ([#191](https://github.com/
|
|
71
|
-
* Upgrade `rubocop` to version 0.52.1 ([#193](https://github.com/
|
|
72
|
-
* Add `zip` to the list of reserved keywords ([#197](https://github.com/
|
|
94
|
+
* Make dry-validation dependency less strict allowing to use newer versions ([#183](https://github.com/rubyconfig/config/pull/183))
|
|
95
|
+
* 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))
|
|
96
|
+
* Update `deep_merge` dependency to latest version (v1.2.1) ([#191](https://github.com/rubyconfig/config/pull/191))
|
|
97
|
+
* Upgrade `rubocop` to version 0.52.1 ([#193](https://github.com/rubyconfig/config/pull/193))
|
|
98
|
+
* Add `zip` to the list of reserved keywords ([#197](https://github.com/rubyconfig/config/pull/197))
|
|
73
99
|
|
|
74
100
|
## 1.6.0
|
|
75
101
|
|
|
76
102
|
### New features
|
|
77
103
|
|
|
78
104
|
* `Config#fail_on_missing` option (default `false`) to raise a `KeyError` exception when accessing a non-existing key
|
|
79
|
-
* Add ability to test if a value was set for a given key with `key?` and `has_key?` ([#182](https://github.com/
|
|
105
|
+
* 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))
|
|
80
106
|
|
|
81
107
|
## 1.5.1
|
|
82
108
|
|
|
83
109
|
### New features
|
|
84
110
|
|
|
85
|
-
* Add parsing of ENV variable values to Boolean type ([#180](https://github.com/
|
|
111
|
+
* Add parsing of ENV variable values to Boolean type ([#180](https://github.com/rubyconfig/config/pull/180))
|
|
86
112
|
|
|
87
113
|
## 1.5.0
|
|
88
114
|
|
|
89
115
|
### New features
|
|
90
116
|
|
|
91
|
-
* Add ability to validate config schema ([#155](https://github.com/
|
|
92
|
-
* Add count to the reserved names list ([#167](https://github.com/
|
|
117
|
+
* Add ability to validate config schema ([#155](https://github.com/rubyconfig/config/pull/155) thanks to [@ok32](https://github.com/ok32))
|
|
118
|
+
* Add count to the reserved names list ([#167](https://github.com/rubyconfig/config/pull/167) thanks to [@carbonin](https://github.com/carbonin))
|
|
93
119
|
|
|
94
120
|
### Bug fixes
|
|
95
121
|
|
|
96
|
-
* Correctly parse `env_prefix`, which contains `env_separator` ([#177](https://github.com/
|
|
122
|
+
* Correctly parse `env_prefix`, which contains `env_separator` ([#177](https://github.com/rubyconfig/config/pull/177) thanks to [@rdodson41](https://github.com/rdodson41))
|
|
97
123
|
|
|
98
124
|
## 1.4.0
|
|
99
125
|
|
|
100
126
|
### New features
|
|
101
127
|
|
|
102
|
-
* Added support for passing a raw ruby hash into to both `Settings.add_source!` and `Settings.prepend_source!` ([#108](https://github.com/
|
|
128
|
+
* 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))
|
|
103
129
|
|
|
104
130
|
### Bug fixes
|
|
105
131
|
|
|
106
|
-
* Added new reserved name `test` ([#158](https://github.com/
|
|
107
|
-
* `to_hash` should not replace nested config objects with Hash ([#160](https://github.com/
|
|
132
|
+
* Added new reserved name `test` ([#158](https://github.com/rubyconfig/config/pull/158) thanks to [@milushov](https://github.com/milushov))
|
|
133
|
+
* `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))
|
|
108
134
|
|
|
109
135
|
## 1.3.0
|
|
110
136
|
|
|
111
|
-
* **WARNING:** Overwrite arrays found in previously loaded settings file ([#137](https://github.com/
|
|
137
|
+
* **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
|
|
112
138
|
* Changed default ENV variables loading settings to downcase variable names and parse values
|
|
113
139
|
* Added parsing ENV variables values to Float type
|
|
114
|
-
* 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/
|
|
140
|
+
* 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)
|
|
115
141
|
|
|
116
142
|
## 1.2.1
|
|
117
143
|
|
|
118
|
-
* Fixed support for multilevel settings loaded from ENV variables (inspired by [@cbeer](https://github.com/cbeer) in [#144](https://github.com/
|
|
144
|
+
* 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))
|
|
119
145
|
|
|
120
146
|
## 1.2.0
|
|
121
147
|
|
|
122
|
-
* Add ability to load settings from ENV variables ([#108](https://github.com/
|
|
123
|
-
* Removed Rails 5 deprecation warnings for prepend_before_filter ([#141](https://github.com/
|
|
148
|
+
* 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))
|
|
149
|
+
* Removed Rails 5 deprecation warnings for prepend_before_filter ([#141](https://github.com/rubyconfig/config/pull/141))
|
|
124
150
|
|
|
125
151
|
## 1.1.1
|
|
126
152
|
|
|
127
|
-
* Downgrade minimum ruby version to 2.0.0 ([#136](https://github.com/
|
|
153
|
+
* Downgrade minimum ruby version to 2.0.0 ([#136](https://github.com/rubyconfig/config/issues/136))
|
|
128
154
|
|
|
129
155
|
## 1.1.0
|
|
130
156
|
|
|
@@ -133,12 +159,12 @@ If you need older version of Ruby or Rails, please stick to 1.x version of this
|
|
|
133
159
|
|
|
134
160
|
## 1.0.0
|
|
135
161
|
|
|
136
|
-
* `
|
|
137
|
-
* Fixed array descent when converting to hash ([#89](https://github.com/
|
|
138
|
-
* Catch OpenStruct reserved keywords ([#95](https://github.com/
|
|
139
|
-
* Allows loading before app configuration process ([#107](https://github.com/
|
|
140
|
-
* `deep_merge` is now properly managed via gemspec ([#110](https://github.com/
|
|
141
|
-
* Added `prepend_source!` ([#102](https://github.com/
|
|
162
|
+
* `rubyconfig` is now officially renamed to `Config`
|
|
163
|
+
* Fixed array descent when converting to hash ([#89](https://github.com/rubyconfig/config/pull/89))
|
|
164
|
+
* Catch OpenStruct reserved keywords ([#95](https://github.com/rubyconfig/config/pull/95) by [@dudo](https://github.com/dudo))
|
|
165
|
+
* Allows loading before app configuration process ([#107](https://github.com/rubyconfig/config/pull/107) by [@Antiarchitect](https://github.com/Antiarchitect))
|
|
166
|
+
* `deep_merge` is now properly managed via gemspec ([#110](https://github.com/rubyconfig/config/pull/110))
|
|
167
|
+
* Added `prepend_source!` ([#102](https://github.com/rubyconfig/config/pull/102))
|
|
142
168
|
|
|
143
169
|
## 0.99
|
|
144
170
|
|
data/CONTRIBUTING.md
CHANGED
data/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Config
|
|
2
2
|
|
|
3
|
-
[](http://travis-ci.org/railsconfig/config)
|
|
4
3
|
[](http://badge.fury.io/rb/config)
|
|
5
|
-
[](https://github.com/rubyconfig/config/actions?query=branch%3Amaster)
|
|
5
|
+
[](https://codeclimate.com/github/rubyconfig/config/maintainability)
|
|
6
|
+
[](https://codeclimate.com/github/rubyconfig/config/test_coverage)
|
|
7
|
+
[](https://opencollective.com/rubyconfig)
|
|
8
8
|
|
|
9
9
|
## Summary
|
|
10
10
|
|
|
@@ -321,7 +321,7 @@ class ConfigContract < Dry::Validation::Contract
|
|
|
321
321
|
end
|
|
322
322
|
|
|
323
323
|
Config.setup do |config|
|
|
324
|
-
config.validation_contract = ConfigContract
|
|
324
|
+
config.validation_contract = ConfigContract.new
|
|
325
325
|
end
|
|
326
326
|
```
|
|
327
327
|
|
|
@@ -466,8 +466,6 @@ You are very warmly welcome to help. Please follow our [contribution guidelines]
|
|
|
466
466
|
|
|
467
467
|
Any and all contributions offered in any form, past present or future are understood to be in complete agreement and acceptance with [MIT](LICENSE) license.
|
|
468
468
|
|
|
469
|
-
|
|
470
|
-
|
|
471
469
|
## Authors
|
|
472
470
|
|
|
473
471
|
* [Piotr Kuczynski](http://github.com/pkuczynski)
|
|
@@ -479,32 +477,24 @@ Any and all contributions offered in any form, past present or future are unders
|
|
|
479
477
|
|
|
480
478
|
### Code Contributors
|
|
481
479
|
|
|
482
|
-
This project exists thanks to all the people who contribute. [
|
|
483
|
-
<a href="https://github.com/railsconfig/config/graphs/contributors"><img src="https://opencollective.com/rubyconfig/contributors.svg?width=890&button=false" /></a>
|
|
480
|
+
This project exists thanks to all the people who contribute and you are very warmly welcome to help. Please follow our [contribution guidelines](CONTRIBUTING.md).
|
|
484
481
|
|
|
485
|
-
|
|
482
|
+
Any and all contributions offered in any form, past present or future are understood to be in complete agreement and acceptance with the [MIT](LICENSE) license.
|
|
486
483
|
|
|
487
|
-
[[
|
|
484
|
+
[](https://github.com/rubyconfig/config/graphs/contributors)
|
|
485
|
+
|
|
486
|
+
### Financial Contributors
|
|
488
487
|
|
|
489
|
-
|
|
488
|
+
[Become a backer](https://opencollective.com/rubyconfig#backer) and support us with a small monthly donation to help us continue our activities. Thank you if you already one! 🙏
|
|
490
489
|
|
|
491
|
-
|
|
490
|
+
[](https://opencollective.com/rubyconfig)
|
|
492
491
|
|
|
493
|
-
####
|
|
492
|
+
#### Sponsors
|
|
494
493
|
|
|
495
|
-
Support this project
|
|
494
|
+
Support this project by becoming a [sponsor](https://opencollective.com/rubyconfig#sponsor). Your logo will show up here with a link to your website.
|
|
496
495
|
|
|
497
|
-
|
|
498
|
-
<a href="https://opencollective.com/rubyconfig/organization/1/website"><img src="https://opencollective.com/rubyconfig/organization/1/avatar.svg"></a>
|
|
499
|
-
<a href="https://opencollective.com/rubyconfig/organization/2/website"><img src="https://opencollective.com/rubyconfig/organization/2/avatar.svg"></a>
|
|
500
|
-
<a href="https://opencollective.com/rubyconfig/organization/3/website"><img src="https://opencollective.com/rubyconfig/organization/3/avatar.svg"></a>
|
|
501
|
-
<a href="https://opencollective.com/rubyconfig/organization/4/website"><img src="https://opencollective.com/rubyconfig/organization/4/avatar.svg"></a>
|
|
502
|
-
<a href="https://opencollective.com/rubyconfig/organization/5/website"><img src="https://opencollective.com/rubyconfig/organization/5/avatar.svg"></a>
|
|
503
|
-
<a href="https://opencollective.com/rubyconfig/organization/6/website"><img src="https://opencollective.com/rubyconfig/organization/6/avatar.svg"></a>
|
|
504
|
-
<a href="https://opencollective.com/rubyconfig/organization/7/website"><img src="https://opencollective.com/rubyconfig/organization/7/avatar.svg"></a>
|
|
505
|
-
<a href="https://opencollective.com/rubyconfig/organization/8/website"><img src="https://opencollective.com/rubyconfig/organization/8/avatar.svg"></a>
|
|
506
|
-
<a href="https://opencollective.com/rubyconfig/organization/9/website"><img src="https://opencollective.com/rubyconfig/organization/9/avatar.svg"></a>
|
|
496
|
+
[](https://opencollective.com/rubyconfig)
|
|
507
497
|
|
|
508
498
|
## License
|
|
509
499
|
|
|
510
|
-
|
|
500
|
+
Copyright (C) Piotr Kuczynski. Released under the [MIT License](LICENSE).
|
data/config.gemspec
CHANGED
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
|
11
11
|
s.summary = 'Effortless multi-environment settings in Rails, Sinatra, Pandrino and others'
|
|
12
12
|
s.description = 'Easiest way to manage multi-environment settings in any ruby project or framework: ' +
|
|
13
13
|
'Rails, Sinatra, Pandrino and others'
|
|
14
|
-
s.homepage = 'https://github.com/
|
|
14
|
+
s.homepage = 'https://github.com/rubyconfig/config'
|
|
15
15
|
s.license = 'MIT'
|
|
16
16
|
s.extra_rdoc_files = %w[README.md CHANGELOG.md CONTRIBUTING.md LICENSE.md]
|
|
17
17
|
s.rdoc_options = ['--charset=UTF-8']
|
|
@@ -21,14 +21,13 @@ Please consider donating to our open collective to help us maintain this project
|
|
|
21
21
|
👉 Donate: \e[34mhttps://opencollective.com/rubyconfig/donate\e[0m\n"
|
|
22
22
|
|
|
23
23
|
s.files = `git ls-files`.split($/)
|
|
24
|
-
s.files.select! { |file| /(^lib
|
|
25
|
-
s.files += Dir.glob('doc/**/*')
|
|
24
|
+
s.files.select! { |file| /(^lib\/|^\w+.md$|\.gemspec$)/ =~ file }
|
|
26
25
|
|
|
27
26
|
s.require_paths = ['lib']
|
|
28
27
|
s.required_ruby_version = '>= 2.4.0'
|
|
29
28
|
|
|
30
29
|
s.add_dependency 'deep_merge', '~> 1.2', '>= 1.2.1'
|
|
31
|
-
s.add_dependency 'dry-validation', '~> 1.0'
|
|
30
|
+
s.add_dependency 'dry-validation', '~> 1.0', '>= 1.0.0'
|
|
32
31
|
|
|
33
32
|
s.add_development_dependency 'rake', '~> 12.0', '>= 12.0.0'
|
|
34
33
|
|
|
@@ -37,20 +36,18 @@ Please consider donating to our open collective to help us maintain this project
|
|
|
37
36
|
s.add_development_dependency 'rspec', '~> 3.7', '>= 3.7.0'
|
|
38
37
|
|
|
39
38
|
# Default RSpec run will test against latest Rails app
|
|
40
|
-
unless ENV['APPRAISAL_INITIALIZED']
|
|
39
|
+
unless ENV['APPRAISAL_INITIALIZED'] || ENV['GITHUB_ACTIONS']
|
|
41
40
|
File.read(Dir['gemfiles/rails*.gemfile'].sort.last).scan(/gem "(.*?)", "(.*?)"/m) do |name, version|
|
|
42
41
|
s.add_development_dependency name, version
|
|
43
42
|
end
|
|
44
43
|
end
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
s.add_development_dependency 'codeclimate-test-reporter', '~> 1.0.9'
|
|
54
|
-
s.add_development_dependency 'simplecov', '~> 0.13.0'
|
|
45
|
+
if ENV['GITHUB_ACTIONS']
|
|
46
|
+
# Code coverage is needed only in CI
|
|
47
|
+
s.add_development_dependency 'simplecov', '~> 0.17.1' if RUBY_ENGINE == 'ruby'
|
|
48
|
+
else
|
|
49
|
+
# Static code analysis to be used locally
|
|
50
|
+
s.add_development_dependency 'mdl', '~> 0.8', '>= 0.8.0'
|
|
51
|
+
s.add_development_dependency 'rubocop', '~> 0.78.0'
|
|
55
52
|
end
|
|
56
53
|
end
|
data/lib/config.rb
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
require 'dry-validation'
|
|
2
1
|
require 'config/compatibility'
|
|
3
2
|
require 'config/options'
|
|
4
3
|
require 'config/configuration'
|
|
5
4
|
require 'config/version'
|
|
6
|
-
require 'config/integrations/rails/engine' if defined?(::Rails)
|
|
7
5
|
require 'config/sources/yaml_source'
|
|
8
6
|
require 'config/sources/hash_source'
|
|
9
7
|
require 'config/validation/schema'
|
|
@@ -23,7 +23,7 @@ module Config
|
|
|
23
23
|
# Development environment should reload settings on every request
|
|
24
24
|
if ::Rails.env.development?
|
|
25
25
|
initializer :config_reload_on_development do
|
|
26
|
-
|
|
26
|
+
ActiveSupport.on_load :action_controller_base do
|
|
27
27
|
if ::Rails::VERSION::MAJOR >= 4
|
|
28
28
|
prepend_before_action { ::Config.reload! }
|
|
29
29
|
else
|
data/lib/config/options.rb
CHANGED
|
@@ -201,7 +201,6 @@ module Config
|
|
|
201
201
|
|
|
202
202
|
h.each do |k, v|
|
|
203
203
|
k = k.to_s if !k.respond_to?(:to_sym) && k.respond_to?(:to_s)
|
|
204
|
-
s.new_ostruct_member(k)
|
|
205
204
|
|
|
206
205
|
if v.is_a?(Hash)
|
|
207
206
|
v = v["type"] == "hash" ? v["contents"] : __convert(v)
|
|
@@ -209,7 +208,7 @@ module Config
|
|
|
209
208
|
v = v.collect { |e| e.instance_of?(Hash) ? __convert(e) : e }
|
|
210
209
|
end
|
|
211
210
|
|
|
212
|
-
s
|
|
211
|
+
s[k] = v
|
|
213
212
|
end
|
|
214
213
|
s
|
|
215
214
|
end
|
data/lib/config/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: config
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1
|
|
4
|
+
version: 2.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Piotr Kuczynski
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2020-01-
|
|
13
|
+
date: 2020-01-08 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: deep_merge
|
|
@@ -36,6 +36,9 @@ dependencies:
|
|
|
36
36
|
name: dry-validation
|
|
37
37
|
requirement: !ruby/object:Gem::Requirement
|
|
38
38
|
requirements:
|
|
39
|
+
- - ">="
|
|
40
|
+
- !ruby/object:Gem::Version
|
|
41
|
+
version: 1.0.0
|
|
39
42
|
- - "~>"
|
|
40
43
|
- !ruby/object:Gem::Version
|
|
41
44
|
version: '1.0'
|
|
@@ -43,6 +46,9 @@ dependencies:
|
|
|
43
46
|
prerelease: false
|
|
44
47
|
version_requirements: !ruby/object:Gem::Requirement
|
|
45
48
|
requirements:
|
|
49
|
+
- - ">="
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: 1.0.0
|
|
46
52
|
- - "~>"
|
|
47
53
|
- !ruby/object:Gem::Version
|
|
48
54
|
version: '1.0'
|
|
@@ -126,14 +132,14 @@ dependencies:
|
|
|
126
132
|
requirements:
|
|
127
133
|
- - '='
|
|
128
134
|
- !ruby/object:Gem::Version
|
|
129
|
-
version:
|
|
135
|
+
version: 6.0.2.1
|
|
130
136
|
type: :development
|
|
131
137
|
prerelease: false
|
|
132
138
|
version_requirements: !ruby/object:Gem::Requirement
|
|
133
139
|
requirements:
|
|
134
140
|
- - '='
|
|
135
141
|
- !ruby/object:Gem::Version
|
|
136
|
-
version:
|
|
142
|
+
version: 6.0.2.1
|
|
137
143
|
- !ruby/object:Gem::Dependency
|
|
138
144
|
name: rspec-rails
|
|
139
145
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -152,14 +158,14 @@ dependencies:
|
|
|
152
158
|
name: sqlite3
|
|
153
159
|
requirement: !ruby/object:Gem::Requirement
|
|
154
160
|
requirements:
|
|
155
|
-
- - "
|
|
161
|
+
- - "~>"
|
|
156
162
|
- !ruby/object:Gem::Version
|
|
157
163
|
version: 1.4.0
|
|
158
164
|
type: :development
|
|
159
165
|
prerelease: false
|
|
160
166
|
version_requirements: !ruby/object:Gem::Requirement
|
|
161
167
|
requirements:
|
|
162
|
-
- - "
|
|
168
|
+
- - "~>"
|
|
163
169
|
- !ruby/object:Gem::Version
|
|
164
170
|
version: 1.4.0
|
|
165
171
|
- !ruby/object:Gem::Dependency
|
|
@@ -168,34 +174,34 @@ dependencies:
|
|
|
168
174
|
requirements:
|
|
169
175
|
- - ">="
|
|
170
176
|
- !ruby/object:Gem::Version
|
|
171
|
-
version: 0.
|
|
177
|
+
version: 0.8.0
|
|
172
178
|
- - "~>"
|
|
173
179
|
- !ruby/object:Gem::Version
|
|
174
|
-
version: '0.
|
|
180
|
+
version: '0.8'
|
|
175
181
|
type: :development
|
|
176
182
|
prerelease: false
|
|
177
183
|
version_requirements: !ruby/object:Gem::Requirement
|
|
178
184
|
requirements:
|
|
179
185
|
- - ">="
|
|
180
186
|
- !ruby/object:Gem::Version
|
|
181
|
-
version: 0.
|
|
187
|
+
version: 0.8.0
|
|
182
188
|
- - "~>"
|
|
183
189
|
- !ruby/object:Gem::Version
|
|
184
|
-
version: '0.
|
|
190
|
+
version: '0.8'
|
|
185
191
|
- !ruby/object:Gem::Dependency
|
|
186
192
|
name: rubocop
|
|
187
193
|
requirement: !ruby/object:Gem::Requirement
|
|
188
194
|
requirements:
|
|
189
195
|
- - "~>"
|
|
190
196
|
- !ruby/object:Gem::Version
|
|
191
|
-
version:
|
|
197
|
+
version: 0.78.0
|
|
192
198
|
type: :development
|
|
193
199
|
prerelease: false
|
|
194
200
|
version_requirements: !ruby/object:Gem::Requirement
|
|
195
201
|
requirements:
|
|
196
202
|
- - "~>"
|
|
197
203
|
- !ruby/object:Gem::Version
|
|
198
|
-
version:
|
|
204
|
+
version: 0.78.0
|
|
199
205
|
description: 'Easiest way to manage multi-environment settings in any ruby project
|
|
200
206
|
or framework: Rails, Sinatra, Pandrino and others'
|
|
201
207
|
email:
|
|
@@ -219,7 +225,6 @@ files:
|
|
|
219
225
|
- lib/config/compatibility.rb
|
|
220
226
|
- lib/config/configuration.rb
|
|
221
227
|
- lib/config/integrations/heroku.rb
|
|
222
|
-
- lib/config/integrations/rails/engine.rb
|
|
223
228
|
- lib/config/integrations/rails/railtie.rb
|
|
224
229
|
- lib/config/integrations/sinatra.rb
|
|
225
230
|
- lib/config/options.rb
|
|
@@ -238,10 +243,7 @@ files:
|
|
|
238
243
|
- lib/generators/config/templates/settings/development.yml
|
|
239
244
|
- lib/generators/config/templates/settings/production.yml
|
|
240
245
|
- lib/generators/config/templates/settings/test.yml
|
|
241
|
-
|
|
242
|
-
- spec/app/rails_5.1/README.md
|
|
243
|
-
- spec/app/rails_5.2/README.md
|
|
244
|
-
homepage: https://github.com/railsconfig/config
|
|
246
|
+
homepage: https://github.com/rubyconfig/config
|
|
245
247
|
licenses:
|
|
246
248
|
- MIT
|
|
247
249
|
metadata: {}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# README
|
|
2
|
-
|
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
|
4
|
-
application up and running.
|
|
5
|
-
|
|
6
|
-
Things you may want to cover:
|
|
7
|
-
|
|
8
|
-
* Ruby version
|
|
9
|
-
|
|
10
|
-
* System dependencies
|
|
11
|
-
|
|
12
|
-
* Configuration
|
|
13
|
-
|
|
14
|
-
* Database creation
|
|
15
|
-
|
|
16
|
-
* Database initialization
|
|
17
|
-
|
|
18
|
-
* How to run the test suite
|
|
19
|
-
|
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
|
21
|
-
|
|
22
|
-
* Deployment instructions
|
|
23
|
-
|
|
24
|
-
* ...
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# README
|
|
2
|
-
|
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
|
4
|
-
application up and running.
|
|
5
|
-
|
|
6
|
-
Things you may want to cover:
|
|
7
|
-
|
|
8
|
-
* Ruby version
|
|
9
|
-
|
|
10
|
-
* System dependencies
|
|
11
|
-
|
|
12
|
-
* Configuration
|
|
13
|
-
|
|
14
|
-
* Database creation
|
|
15
|
-
|
|
16
|
-
* Database initialization
|
|
17
|
-
|
|
18
|
-
* How to run the test suite
|
|
19
|
-
|
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
|
21
|
-
|
|
22
|
-
* Deployment instructions
|
|
23
|
-
|
|
24
|
-
* ...
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# README
|
|
2
|
-
|
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
|
4
|
-
application up and running.
|
|
5
|
-
|
|
6
|
-
Things you may want to cover:
|
|
7
|
-
|
|
8
|
-
* Ruby version
|
|
9
|
-
|
|
10
|
-
* System dependencies
|
|
11
|
-
|
|
12
|
-
* Configuration
|
|
13
|
-
|
|
14
|
-
* Database creation
|
|
15
|
-
|
|
16
|
-
* Database initialization
|
|
17
|
-
|
|
18
|
-
* How to run the test suite
|
|
19
|
-
|
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
|
21
|
-
|
|
22
|
-
* Deployment instructions
|
|
23
|
-
|
|
24
|
-
* ...
|