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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e61b3780ec9c2a5586d1e50691a655761542740ed0ae370b5c1ad769e4d6349
4
- data.tar.gz: 9a3d32e7943894f2f44546ab8c161d8b97ffe3a6df620856cbb037c337d83db6
3
+ metadata.gz: 554478f496c7582db5d4a3965d44499cde1b9d739002cf9e828eb0578de3b356
4
+ data.tar.gz: d3d21afa1efa34e03d958e4ae347de44ff00f2e1f45ffdeceef8785bfcb41b61
5
5
  SHA512:
6
- metadata.gz: 58015736b2f1bd3394102de9dcf09c64ee9f56c51abac9673a1a38dd867ab26b12abccda26c0b81d04c052a9e6c8cff48fd015004734dc4f9a0abb1dec1a1dea
7
- data.tar.gz: cfea04abd4b76cd40913dea8544df5a049ecaf50faa475fe3662f6b3389bdf9aac35c26d9614dbaaf35df06ee7033ae4ee6a3943bc28373583cd930c9569b186
6
+ metadata.gz: bde322b8eb560783917d36ebcaea664d10b255ccdf915b86fa8330b3e7ed50aba4c3f66ba265f5b2bd896a679bd74ccc6add60e2f5d92a088fb8c1d61cafce75
7
+ data.tar.gz: 81895a02cdda30016f6dc80d2f6a5d3e01669d884ee177ec5bbdc910938a4e3f5964749416694afa99b375316735ba98c1a375ee90430a847b6ee5cd68e64809
@@ -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/railsconfig/config/pull/238))
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/railsconfig/config/pull/230))
14
- * Ignore .local files in test environment ([#135](https://github.com/railsconfig/config/issues/135), [#233](https://github.com/railsconfig/config/pull/233))
15
- * Execute default rspec against latest Rails app and load appropriate development dependencies dynamically ([#241](https://github.com/railsconfig/config/pull/241))
16
- * Fix inconsistent documentation for ENV prefix and default value in generator ([#246](https://github.com/railsconfig/config/pull/246))
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/railsconfig/config/issues/240)
21
- * Do not run incompatible code coverage on truffleruby ([#242](https://github.com/railsconfig/config/issues/242)
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/railsconfig/config/pull/214))
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/railsconfig/config/pull/224))
37
- * Moved constant to be defined on `Object` instead of `Kernel` ([#227](https://github.com/railsconfig/config/issues/227))
38
- * Add TruffleRuby to the test matrix ([#229](https://github.com/railsconfig/config/issues/229))
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/railsconfig/config/pull/223))
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/railsconfig/config/pull/211))
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/railsconfig/config/pull/201))
55
- * Add Ruby 2.6 tto the test matrix ([#210](https://github.com/railsconfig/config/pull/210))
56
- * Add Rails 5.2 to the test matrix ([#212](https://github.com/railsconfig/config/pull/212))
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/railsconfig/config/pull/196))
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/railsconfig/config/pull/183))
69
- * 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))
70
- * Update `deep_merge` dependency to latest version (v1.2.1) ([#191](https://github.com/railsconfig/config/pull/191))
71
- * Upgrade `rubocop` to version 0.52.1 ([#193](https://github.com/railsconfig/config/pull/193))
72
- * Add `zip` to the list of reserved keywords ([#197](https://github.com/railsconfig/config/pull/197))
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/railsconfig/config/pull/182))
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/railsconfig/config/pull/180))
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/railsconfig/config/pull/155) thanks to [@ok32](https://github.com/ok32))
92
- * Add count to the reserved names list ([#167](https://github.com/railsconfig/config/pull/167) thanks to [@carbonin](https://github.com/carbonin))
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/railsconfig/config/pull/177) thanks to [@rdodson41](https://github.com/rdodson41))
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/railsconfig/config/pull/159) thanks to [@halloffame](https://github.com/halloffame))
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/railsconfig/config/pull/158) thanks to [@milushov](https://github.com/milushov))
107
- * `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))
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/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
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/railsconfig/config/issues/111)
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/railsconfig/config/pull/144))
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/railsconfig/config/issues/108) thanks to [@vinceve](https://github.com/vinceve) and [@spalladino](https://github.com/spalladino))
123
- * Removed Rails 5 deprecation warnings for prepend_before_filter ([#141](https://github.com/railsconfig/config/pull/141))
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/railsconfig/config/issues/136))
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
- * `RailsConfig` is now officially renamed to `Config`
137
- * Fixed array descent when converting to hash ([#89](https://github.com/railsconfig/config/pull/89))
138
- * Catch OpenStruct reserved keywords ([#95](https://github.com/railsconfig/config/pull/95) by [@dudo](https://github.com/dudo))
139
- * Allows loading before app configuration process ([#107](https://github.com/railsconfig/config/pull/107) by [@Antiarchitect](https://github.com/Antiarchitect))
140
- * `deep_merge` is now properly managed via gemspec ([#110](https://github.com/railsconfig/config/pull/110))
141
- * Added `prepend_source!` ([#102](https://github.com/railsconfig/config/pull/102))
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
 
@@ -28,5 +28,5 @@ appraisal rspec
28
28
  If you modified any of the documentation files verify their format:
29
29
 
30
30
  ```bash
31
- mdl --style .mdlstyle.rb *.md
31
+ mdl *.md
32
32
  ```
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Config
2
2
 
3
- [![Build Status](https://api.travis-ci.org/railsconfig/config.svg?branch=master)](http://travis-ci.org/railsconfig/config)
4
3
  [![Gem Version](https://badge.fury.io/rb/config.svg)](http://badge.fury.io/rb/config)
5
- [![Maintainability](https://api.codeclimate.com/v1/badges/85c206c13dce7de090af/maintainability)](https://codeclimate.com/github/railsconfig/config/maintainability)
6
- [![Test Coverage](https://api.codeclimate.com/v1/badges/85c206c13dce7de090af/test_coverage)](https://codeclimate.com/github/railsconfig/config/test_coverage)
7
- [![Financial Contributors on Open Collective](https://opencollective.com/rubyconfig/all/badge.svg?label=financial+contributors)](https://opencollective.com/rubyconfig)
4
+ [![Tests](https://github.com/rubyconfig/config/workflows/tests/badge.svg)](https://github.com/rubyconfig/config/actions?query=branch%3Amaster)
5
+ [![Maintainability](https://api.codeclimate.com/v1/badges/85c206c13dce7de090af/maintainability)](https://codeclimate.com/github/rubyconfig/config/maintainability)
6
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/85c206c13dce7de090af/test_coverage)](https://codeclimate.com/github/rubyconfig/config/test_coverage)
7
+ [![Financial Contributors on Open Collective](https://opencollective.com/rubyconfig/all/badge.svg?label=backers)](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. [[Contribute](CONTRIBUTING.md)].
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
- ### Financial Contributors
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
- [[Become a financial contributor](https://opencollective.com/rubyconfig/contribute)] and and support us with a small donation to help us continue our activities. Thank you if you already one! 🙏
484
+ [![Contributors](https://opencollective.com/rubyconfig/contributors.svg?width=890&button=false)](https://github.com/rubyconfig/config/graphs/contributors)
485
+
486
+ ### Financial Contributors
488
487
 
489
- #### Individuals
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
- <a href="https://opencollective.com/rubyconfig"><img src="https://opencollective.com/rubyconfig/individuals.svg?width=890"></a>
490
+ [![Backers](https://opencollective.com/rubyconfig/backers.svg?width=890)](https://opencollective.com/rubyconfig)
492
491
 
493
- #### Organizations
492
+ #### Sponsors
494
493
 
495
- Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/rubyconfig/contribute)]
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
- <a href="https://opencollective.com/rubyconfig/organization/0/website"><img src="https://opencollective.com/rubyconfig/organization/0/avatar.svg"></a>
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
+ [![Sponsors](https://opencollective.com/rubyconfig/sponsors.svg?width=890)](https://opencollective.com/rubyconfig)
507
497
 
508
498
  ## License
509
499
 
510
- Config is released under the [MIT License](http://www.opensource.org/licenses/MIT).
500
+ Copyright (C) Piotr Kuczynski. Released under the [MIT License](LICENSE).
@@ -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/railsconfig/config'
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\/|\.md$|\.gemspec$)/ =~ file }
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
- # Static code analysis
47
- s.add_development_dependency 'mdl', '~> 0.5', '>= 0.5.0'
48
-
49
- # Version 0.62 requires Ruby 2.2
50
- s.add_development_dependency 'rubocop', '~> 0.62'
51
-
52
- if ENV['TRAVIS'] && ENV['TRAVIS_RUBY_VERSION'] != 'truffleruby'
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
@@ -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
- ActionController::Base.class_eval do
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
@@ -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.send("#{k}=".to_sym, v)
211
+ s[k] = v
213
212
  end
214
213
  s
215
214
  end
@@ -8,6 +8,8 @@ module Config
8
8
 
9
9
  def schema(&block)
10
10
  if block_given?
11
+ # Delay require until optional schema validation is requested
12
+ require 'dry-validation'
11
13
  @schema = Dry::Schema.define(&block)
12
14
  else
13
15
  @schema
@@ -1,3 +1,3 @@
1
1
  module Config
2
- VERSION = '2.1.0'.freeze
2
+ VERSION = '2.2.1'.freeze
3
3
  end
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.0
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-03 00:00:00.000000000 Z
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: 5.2.2
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: 5.2.2
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.5.0
177
+ version: 0.8.0
172
178
  - - "~>"
173
179
  - !ruby/object:Gem::Version
174
- version: '0.5'
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.5.0
187
+ version: 0.8.0
182
188
  - - "~>"
183
189
  - !ruby/object:Gem::Version
184
- version: '0.5'
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: '0.62'
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: '0.62'
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
- - spec/app/rails_5.0/README.md
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,9 +0,0 @@
1
- module Config
2
- module Integrations
3
- module Rails
4
- class Engine < ::Rails::Engine
5
- isolate_namespace Config
6
- end
7
- end
8
- end
9
- end
@@ -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
- * ...