complex_config 0.22.1 → 0.22.3

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: d25e925267a755f28ea324b3ed2f43d737659124e097ae52ac48bd87aedd9173
4
- data.tar.gz: f68858a3bba577915b3d602093363f1143b29be84cfe42f4ac4c64056baa5551
3
+ metadata.gz: 88d0367562a3dd7f7c842c8cb5a992358f7259782e989c1e75125a889bcab4c8
4
+ data.tar.gz: d449645011ca5ab1151eea7e1606a5cd0a0162a3a90b048d3e48e74587c1e28e
5
5
  SHA512:
6
- metadata.gz: c9cb2d7480057aa2685952e8c272c8a10245664c0e30fbdf83d76c1fd5c2ff196eb84bec265baa5fae19283acdcb9efd5c25e90721e40df4fe185fa5c2273bf9
7
- data.tar.gz: 463827352c5df8655b58ea371c57733b78aa2a00ca28ac0e77516cb2b7edaf43919f5b5c93cf27e32d3add7d8eec53b8204af9b862871ba3d9a0037220ce34ae
6
+ metadata.gz: cbba4bb79df0421dc7f467ccec1e5511a139b258b781b3210371b7afa4b3e12813e183713b103a99098188dc40d50cea1eef3a434cacaa967da1e5b4f6bb8226
7
+ data.tar.gz: 642063aff4f227c5e580f6aa588e57aa9e8b36e0e4eef8607925dd0ce60d8d6465427e6919a1cb44e646425a3597610222be921bed1ddc251315d18d4faad759
data/CHANGES.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changes
2
2
 
3
+ ## 2024-10-21 v0.22.2
4
+
5
+ * Update file to handle ENOENT and ENOTDIR errors when reading from file:
6
+ + Add `Errno::ENOTDIR` to rescue clause in `ComplexConfig::KeySource`
7
+ + Rescue both `Errno::ENOENT` and `Errno::ENOTDIR` exceptions for robustness
8
+ * Improved test(s) in specs:
9
+ + Removed unneeded `allow` statement from `provider_spec.rb`
10
+ + Modified `shortcuts_spec.rb` to use `at_least(:once)` for `expect(provider).to receive(:env)`
11
+
3
12
  ## 2024-09-22 v0.22.1
4
13
 
5
14
  #### Bug Fixes and Improvements
@@ -19,16 +28,16 @@
19
28
  ## 2024-09-12 v0.22.0
20
29
 
21
30
  * **New Feature: UTF-8 Support**
22
- + Added `utf8` parameter to `Tree#initialize`
23
- + Introduced `default_utf8` method to determine default encoding based on environment variables
24
- + Modified `inner_child_prefix` and `last_child_prefix` methods for UTF-8 and ASCII encodings
25
- + Updated tests in `spec/complex_config/settings_spec.rb`
31
+ + Added `utf8` parameter to `Tree#initialize`
32
+ + Introduced `default_utf8` method to determine default encoding based on environment variables
33
+ + Modified `inner_child_prefix` and `last_child_prefix` methods for UTF-8 and ASCII encodings
34
+ + Updated tests in `spec/complex_config/settings_spec.rb`
26
35
 
27
36
  ## 2024-09-09 v0.21.2
28
37
 
29
38
  * **Settings List Method**:
30
- + Renamed `list` to `attributes_list`.
31
- + Updated tests in `settings_spec.rb` to use the new method name.
39
+ + Renamed `list` to `attributes_list`.
40
+ + Updated tests in `settings_spec.rb` to use the new method name.
32
41
 
33
42
  ## 2024-09-09 v0.21.1
34
43
 
@@ -40,21 +49,21 @@
40
49
  ## 2024-09-09 v0.21.0
41
50
 
42
51
  * **Tree Representation**:
43
- + Add `Tree` class to convert complex config objects into trees.
44
- + Update `Settings` class to use `Tree` conversion in `to_tree` method.
45
- + Update tests to reflect changes.
52
+ + Add `Tree` class to convert complex config objects into trees.
53
+ + Update `Settings` class to use `Tree` conversion in `to_tree` method.
54
+ + Update tests to reflect changes.
46
55
  * **Components Array**: Add components array for flux capacitors
47
56
  * **Rakefile and Gemspec**:
48
- - Add clobber task for coverage to Rakefile
49
- - Update all_images script: update `bundle` to `bundle install --full-index`
57
+ - Add clobber task for coverage to Rakefile
58
+ - Update all_images script: update `bundle` to `bundle install --full-index`
50
59
  * **.gitignore**: Remove `.byebug_history` from ignored files
51
60
  * **Complex Config**:
52
- + Raise type error and add test for empty configuration file.
53
- + Update gemspec to use GemHadar 1.17.0
54
- + Add requirement for tins/xt/ask_and_send in complex_config/provider.rb
55
- + Add check for hash type in ComplexConfig::Settings#build method
56
- + Add test for reading from empty configuration file in provider_spec.rb
57
- + Replace byebug with debug in spec_helper.rb
61
+ + Raise type error and add test for empty configuration file.
62
+ + Update gemspec to use GemHadar 1.17.0
63
+ + Add requirement for tins/xt/ask_and_send in complex_config/provider.rb
64
+ + Add check for hash type in ComplexConfig::Settings#build method
65
+ + Add test for reading from empty configuration file in provider_spec.rb
66
+ + Replace byebug with debug in spec_helper.rb
58
67
 
59
68
  ## 2024-04-17 v0.20.0
60
69
 
@@ -91,13 +100,13 @@
91
100
  ## 2021-10-28 v0.19.2
92
101
 
93
102
  * **New Psych Support**
94
- + Added support for newest Psych 4 library
95
- + Defaults to disabling YAML alias feature
103
+ + Added support for newest Psych 4 library
104
+ + Defaults to disabling YAML alias feature
96
105
  * **Psych API Update**
97
- + Updated code to use new Psych/YAML API when Psych version < 4
98
- + Retained behavior of evaluating aliases
106
+ + Updated code to use new Psych/YAML API when Psych version < 4
107
+ + Retained behavior of evaluating aliases
99
108
  * **Ruby Version Bump**
100
- + Updated Ruby version in tool-versions to 3.0.2
109
+ + Updated Ruby version in tool-versions to 3.0.2
101
110
 
102
111
  ## 2021-04-09 v0.19.1
103
112
 
@@ -107,8 +116,8 @@
107
116
  ## 2021-01-05 v0.19.0
108
117
 
109
118
  * Added two new methods:
110
- + `get_attribute_by_name`
111
- + `get_attributes_by_name`
119
+ + `get_attribute_by_name`
120
+ + `get_attributes_by_name`
112
121
 
113
122
  ## 2020-08-26 v0.18.2
114
123
 
@@ -125,13 +134,13 @@
125
134
  ## 2020-01-07 v0.18.0
126
135
 
127
136
  * **New Version Summary**
128
- + Added support for Ruby 2.7.0
129
- + Updated tests to include Ruby 2.7.0
130
- + Refactored code to avoid string modifications
137
+ + Added support for Ruby 2.7.0
138
+ + Updated tests to include Ruby 2.7.0
139
+ + Refactored code to avoid string modifications
131
140
  * Significant Changes:
132
- * Support added for Ruby 2.7.0
133
- * Tests updated to include Ruby 2.7.0
134
- * String modification stopped
141
+ * Support added for Ruby 2.7.0
142
+ * Tests updated to include Ruby 2.7.0
143
+ * String modification stopped
135
144
 
136
145
  ## 2019-11-27 v0.17.1
137
146
 
@@ -146,11 +155,11 @@
146
155
  ## 2019-03-18 v0.16.2
147
156
 
148
157
  * **New Feature**: Added support for handling complex scenarios
149
- + Implemented a new logic to handle intricate cases
158
+ + Implemented a new logic to handle intricate cases
150
159
  * Improved error handling and reporting
151
- + Enhanced logging to provide more detailed information about errors
160
+ + Enhanced logging to provide more detailed information about errors
152
161
  * Minor code refactoring
153
- + Simplified some conditional statements
162
+ + Simplified some conditional statements
154
163
 
155
164
  ## 2019-03-18 v0.16.1
156
165
 
@@ -161,12 +170,12 @@
161
170
  ## 2019-03-14 v0.16.0
162
171
 
163
172
  * **New Features**
164
- + Added support for `trim_mode` in legacy mode
165
- + Enabled `trim_mode` by default
166
- + Added `#to_json` method to settings objects
173
+ + Added support for `trim_mode` in legacy mode
174
+ + Enabled `trim_mode` by default
175
+ + Added `#to_json` method to settings objects
167
176
  * **Changes**
168
- + Updated code to use new `trim_mode` feature
169
- + Modified settings objects to include `#to_json` method
177
+ + Updated code to use new `trim_mode` feature
178
+ + Modified settings objects to include `#to_json` method
170
179
 
171
180
  ## 2019-03-14 v0.15.1
172
181
 
@@ -183,14 +192,14 @@
183
192
 
184
193
  * **New Version**: Bumped version
185
194
  * **Improved Error Handling**:
186
- + Improved error handling if key isn't valid
187
- + Raises `ComplexConfig::DecryptionFailed` for encrypted files
195
+ + Improved error handling if key isn't valid
196
+ + Raises `ComplexConfig::DecryptionFailed` for encrypted files
188
197
  * **Compatibility**:
189
- + Make this run on older rubies
198
+ + Make this run on older rubies
190
199
  * **Documentation**:
191
- + Cleanup documentation
200
+ + Cleanup documentation
192
201
  * **RubyGems**:
193
- + Use newest rubygems
202
+ + Use newest rubygems
194
203
 
195
204
  ## 2018-06-07 v0.14.0
196
205
 
@@ -199,24 +208,24 @@
199
208
  ## 2018-02-23 v0.13.3
200
209
 
201
210
  * **Changes in Evaluation Order**
202
- + The evaluation order of key sources has been modified.
211
+ + The evaluation order of key sources has been modified.
203
212
 
204
213
  ## 2018-02-23 v0.13.2
205
214
 
206
215
  * **Compatibility improvements**
207
- + Be compatible with ancient rubies^3
208
- + Be compatible with ancient rubies^2
209
- + Be compatible with ancient rubies
216
+ + Be compatible with ancient rubies^3
217
+ + Be compatible with ancient rubies^2
218
+ + Be compatible with ancient rubies
210
219
  * **Refactoring**
211
- + Refactor key provision with source object
220
+ + Refactor key provision with source object
212
221
 
213
222
  ## 2018-02-09 v0.13.1
214
223
 
215
224
  * **New Features**
216
- + Added information to README file
225
+ + Added information to README file
217
226
  * **Significant Changes**
218
- + Bumped version number
219
- + Improved error reporting for encrypted files with missing keys
227
+ + Bumped version number
228
+ + Improved error reporting for encrypted files with missing keys
220
229
 
221
230
  ## 2018-01-26 v0.13.0
222
231
 
@@ -235,11 +244,11 @@
235
244
  ## 2017-11-16 v0.12.0
236
245
 
237
246
  * **New Features**
238
- + Add support for writing configurations (encrypted or not)
247
+ + Add support for writing configurations (encrypted or not)
239
248
  * **Version Bump**
240
- + Bump version to 0.12.0
249
+ + Bump version to 0.12.0
241
250
  * **Compatibility Improvements**
242
- + Support older Rubies
251
+ + Support older Rubies
243
252
 
244
253
  ## 2017-11-02 v0.11.3
245
254
 
@@ -268,18 +277,18 @@
268
277
 
269
278
  * **New Version**: Released version 0.9.2.
270
279
  * **Performance Improvement**:
271
- + Memoized proxy object for improved performance.
280
+ + Memoized proxy object for improved performance.
272
281
 
273
282
  ## 2016-11-23 v0.9.1
274
283
 
275
284
  * **New Features**
276
- + Use newest RubyGems
277
- + Test on Ruby 2.3.3
285
+ + Use newest RubyGems
286
+ + Test on Ruby 2.3.3
278
287
  * **Bug Fixes**
279
- + Fix Travis builds
280
- + travis fiddles with RAILS_ENV variable, breaking specs (resolved)
288
+ + Fix Travis builds
289
+ + travis fiddles with RAILS_ENV variable, breaking specs (resolved)
281
290
  * **Testing Improvements**
282
- + Test newer Rubies
291
+ + Test newer Rubies
283
292
 
284
293
  ## 2016-11-22 v0.9.0
285
294
 
@@ -296,23 +305,23 @@
296
305
  ## 2016-07-18 v0.7.0
297
306
 
298
307
  * **New Features**
299
- + Added new date functionality
308
+ + Added new date functionality
300
309
  * **Improvements**
301
310
  + Simplified `ComplexConfig::Settings` interface by basing it on
302
311
  `BasicObject` and reducing mixin usage
303
312
  * **Documentation**
304
- + Updated README.md with new changes
313
+ + Updated README.md with new changes
305
314
 
306
315
  ## 2016-07-15 v0.6.0
307
316
 
308
317
  * **Caching Improvements**
309
- + Use `mize` for caching
318
+ + Use `mize` for caching
310
319
 
311
320
  ## 2016-06-23 v0.5.2
312
321
 
313
322
  * **Index Access Feature**
314
- + Fixed issue with incorrect indexing behavior (#56190d3)
315
- + Improved performance and reliability of index access functionality
323
+ + Fixed issue with incorrect indexing behavior (#56190d3)
324
+ + Improved performance and reliability of index access functionality
316
325
 
317
326
  ## 2016-06-23 v0.5.1
318
327
 
@@ -321,20 +330,20 @@
321
330
  `foo[:bar]` equivalent for a plugin key.
322
331
  + Test on Ruby 2.3.1 and 2.4.0-preview1
323
332
  * **Infrastructure Changes**
324
- + Use new infrastructure
333
+ + Use new infrastructure
325
334
  * **Bug Fixes**
326
- + Fix typo
335
+ + Fix typo
327
336
 
328
337
  ## 2015-11-19 v0.5.0
329
338
 
330
339
  * **New Features**
331
- + Add configure method
332
- + Add configuration example to README
340
+ + Add configure method
341
+ + Add configuration example to README
333
342
  * **Bug Fixes**
334
- + Flush cache for every request in rails development
335
- + Change the Changes
343
+ + Flush cache for every request in rails development
344
+ + Change the Changes
336
345
  * **Improvements**
337
- + Just always skip to avoid interference
346
+ + Just always skip to avoid interference
338
347
 
339
348
  ## 2015-11-17 v0.4.0
340
349
 
@@ -343,14 +352,14 @@
343
352
  ## 2015-11-03 v0.3.1
344
353
 
345
354
  * **New Features**
346
- + Add missing tins dependency
347
- + Show improved settings output in README.md
348
- + Adds a decent string representation for ComplexConfig::Settings objects
355
+ + Add missing tins dependency
356
+ + Show improved settings output in README.md
357
+ + Adds a decent string representation for ComplexConfig::Settings objects
349
358
  * **Dependency Updates**
350
- + Use newest gem hadar
351
- + Add some development_dependencies (including tins)
359
+ + Use newest gem hadar
360
+ + Add some development_dependencies (including tins)
352
361
  * **Code Improvements**
353
- + Shorten codeclimate snippet
362
+ + Shorten codeclimate snippet
354
363
 
355
364
  ## 2015-03-24 v0.3.0
356
365
 
@@ -381,28 +390,28 @@
381
390
  ## 2015-01-27 v0.2.0
382
391
 
383
392
  * **New Features**
384
- + Added support for JRuby in tests
385
- + Updated to newest Ruby 2.2
393
+ + Added support for JRuby in tests
394
+ + Updated to newest Ruby 2.2
386
395
  * **Improvements**
387
396
  + Replaced mixin with delegation for Enumerable, allowing attribute names
388
397
  like `zip`, `min`, or `max` without conflicts
389
398
  * **Documentation**
390
- + Added Apache license file
399
+ + Added Apache license file
391
400
 
392
401
  ## 2015-01-01 v0.1.1
393
402
 
394
403
  * **New Version Summary**
395
- + Use value from non-associative list arrays
396
- + Fix `puts` method to call `to_ary` correctly
397
- + Prevent cash leakage after flushing cache
398
- + Add `to_ary` method for level on demand
404
+ + Use value from non-associative list arrays
405
+ + Fix `puts` method to call `to_ary` correctly
406
+ + Prevent cash leakage after flushing cache
407
+ + Add `to_ary` method for level on demand
399
408
 
400
409
  ## 2014-12-15 v0.1.0
401
410
 
402
411
  * **Significant Changes**:
403
- + Freeze cached configuration by default (versioning)
404
- + Add to-do list for future development
405
- + Integrate CodeClimate for code analysis and improvement
412
+ + Freeze cached configuration by default (versioning)
413
+ + Add to-do list for future development
414
+ + Integrate CodeClimate for code analysis and improvement
406
415
 
407
416
  ## 2014-12-12 v0.0.0
408
417
 
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ GemHadar do
13
13
  test_dir 'spec'
14
14
  ignore '.*.sw[pon]', 'pkg', 'Gemfile.lock', 'coverage', '.rvmrc',
15
15
  '.AppleDouble', '.DS_Store', 'errors.lst', 'tags'
16
- package_ignore '.all_images', '.utilsrc', '.rspec', '.tool-versions',
16
+ package_ignore '.all_images.yml', '.utilsrc', '.rspec', '.tool-versions',
17
17
  '.gitignore'
18
18
 
19
19
  readme 'README.md'
@@ -23,14 +23,15 @@ GemHadar do
23
23
  clobber 'coverage'
24
24
 
25
25
  dependency 'json'
26
- dependency 'tins'
27
- dependency 'mize', '~> 0.3', '>= 0.3.4'
26
+ dependency 'tins', '~> 1'
27
+ dependency 'mize', '~> 0.6'
28
28
  dependency 'base64'
29
29
  development_dependency 'rake'
30
30
  development_dependency 'simplecov'
31
31
  development_dependency 'rspec'
32
32
  development_dependency 'monetize'
33
33
  development_dependency 'debug'
34
+ development_dependency 'all_images', '~> 0.8'
34
35
  end
35
36
 
36
37
  task :default => :spec
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.22.1
1
+ 0.22.3
@@ -1,36 +1,37 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: complex_config 0.22.1 ruby lib
2
+ # stub: complex_config 0.22.3 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "complex_config".freeze
6
- s.version = "0.22.1".freeze
6
+ s.version = "0.22.3".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Florian Frank".freeze]
11
- s.date = "2024-09-22"
11
+ s.date = "1980-01-02"
12
12
  s.description = "This library allows you to access configuration files via a simple interface".freeze
13
13
  s.email = "flori@ping.de".freeze
14
14
  s.executables = ["complex_config".freeze]
15
15
  s.extra_rdoc_files = ["README.md".freeze, "lib/complex_config.rb".freeze, "lib/complex_config/config.rb".freeze, "lib/complex_config/encryption.rb".freeze, "lib/complex_config/errors.rb".freeze, "lib/complex_config/key_source.rb".freeze, "lib/complex_config/plugins.rb".freeze, "lib/complex_config/plugins/enable.rb".freeze, "lib/complex_config/plugins/money.rb".freeze, "lib/complex_config/plugins/uri.rb".freeze, "lib/complex_config/provider.rb".freeze, "lib/complex_config/provider/shortcuts.rb".freeze, "lib/complex_config/proxy.rb".freeze, "lib/complex_config/railtie.rb".freeze, "lib/complex_config/rude.rb".freeze, "lib/complex_config/settings.rb".freeze, "lib/complex_config/shortcuts.rb".freeze, "lib/complex_config/tree.rb".freeze, "lib/complex_config/version.rb".freeze]
16
- s.files = [".all_images.yml".freeze, "CHANGES.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "bin/complex_config".freeze, "complex_config.gemspec".freeze, "config/products.yml".freeze, "lib/complex_config.rb".freeze, "lib/complex_config/config.rb".freeze, "lib/complex_config/encryption.rb".freeze, "lib/complex_config/errors.rb".freeze, "lib/complex_config/key_source.rb".freeze, "lib/complex_config/plugins.rb".freeze, "lib/complex_config/plugins/enable.rb".freeze, "lib/complex_config/plugins/money.rb".freeze, "lib/complex_config/plugins/uri.rb".freeze, "lib/complex_config/provider.rb".freeze, "lib/complex_config/provider/shortcuts.rb".freeze, "lib/complex_config/proxy.rb".freeze, "lib/complex_config/railtie.rb".freeze, "lib/complex_config/rude.rb".freeze, "lib/complex_config/settings.rb".freeze, "lib/complex_config/shortcuts.rb".freeze, "lib/complex_config/tree.rb".freeze, "lib/complex_config/version.rb".freeze, "spec/complex_config/config_spec.rb".freeze, "spec/complex_config/encryption_spec.rb".freeze, "spec/complex_config/key_source_spec.rb".freeze, "spec/complex_config/plugins_spec.rb".freeze, "spec/complex_config/provider_spec.rb".freeze, "spec/complex_config/settings_spec.rb".freeze, "spec/complex_config/shortcuts_spec.rb".freeze, "spec/config/broken_config.yml".freeze, "spec/config/config.yml".freeze, "spec/config/config_with_alias.yml".freeze, "spec/config/empty_config.yml".freeze, "spec/config/legacy_classes.yml".freeze, "spec/config/master.key".freeze, "spec/config/with-key-file.yml.enc".freeze, "spec/config/with-key-file.yml.key".freeze, "spec/config/without-key-file.yml.enc".freeze, "spec/spec_helper.rb".freeze]
16
+ s.files = ["CHANGES.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "bin/complex_config".freeze, "complex_config.gemspec".freeze, "config/products.yml".freeze, "lib/complex_config.rb".freeze, "lib/complex_config/config.rb".freeze, "lib/complex_config/encryption.rb".freeze, "lib/complex_config/errors.rb".freeze, "lib/complex_config/key_source.rb".freeze, "lib/complex_config/plugins.rb".freeze, "lib/complex_config/plugins/enable.rb".freeze, "lib/complex_config/plugins/money.rb".freeze, "lib/complex_config/plugins/uri.rb".freeze, "lib/complex_config/provider.rb".freeze, "lib/complex_config/provider/shortcuts.rb".freeze, "lib/complex_config/proxy.rb".freeze, "lib/complex_config/railtie.rb".freeze, "lib/complex_config/rude.rb".freeze, "lib/complex_config/settings.rb".freeze, "lib/complex_config/shortcuts.rb".freeze, "lib/complex_config/tree.rb".freeze, "lib/complex_config/version.rb".freeze, "spec/complex_config/config_spec.rb".freeze, "spec/complex_config/encryption_spec.rb".freeze, "spec/complex_config/key_source_spec.rb".freeze, "spec/complex_config/plugins_spec.rb".freeze, "spec/complex_config/provider_spec.rb".freeze, "spec/complex_config/settings_spec.rb".freeze, "spec/complex_config/shortcuts_spec.rb".freeze, "spec/config/broken_config.yml".freeze, "spec/config/config.yml".freeze, "spec/config/config_with_alias.yml".freeze, "spec/config/empty_config.yml".freeze, "spec/config/legacy_classes.yml".freeze, "spec/config/master.key".freeze, "spec/config/with-key-file.yml.enc".freeze, "spec/config/with-key-file.yml.key".freeze, "spec/config/without-key-file.yml.enc".freeze, "spec/spec_helper.rb".freeze]
17
17
  s.homepage = "https://github.com/flori/complex_config".freeze
18
18
  s.licenses = ["Apache-2.0".freeze]
19
19
  s.rdoc_options = ["--title".freeze, "ComplexConfig -- configuration library".freeze, "--main".freeze, "README.md".freeze]
20
- s.rubygems_version = "3.5.18".freeze
20
+ s.rubygems_version = "3.6.9".freeze
21
21
  s.summary = "configuration library".freeze
22
22
  s.test_files = ["spec/complex_config/config_spec.rb".freeze, "spec/complex_config/encryption_spec.rb".freeze, "spec/complex_config/key_source_spec.rb".freeze, "spec/complex_config/plugins_spec.rb".freeze, "spec/complex_config/provider_spec.rb".freeze, "spec/complex_config/settings_spec.rb".freeze, "spec/complex_config/shortcuts_spec.rb".freeze, "spec/spec_helper.rb".freeze]
23
23
 
24
24
  s.specification_version = 4
25
25
 
26
- s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.17.1".freeze])
26
+ s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 2.4".freeze])
27
27
  s.add_development_dependency(%q<rake>.freeze, [">= 0".freeze])
28
28
  s.add_development_dependency(%q<simplecov>.freeze, [">= 0".freeze])
29
29
  s.add_development_dependency(%q<rspec>.freeze, [">= 0".freeze])
30
30
  s.add_development_dependency(%q<monetize>.freeze, [">= 0".freeze])
31
31
  s.add_development_dependency(%q<debug>.freeze, [">= 0".freeze])
32
+ s.add_development_dependency(%q<all_images>.freeze, ["~> 0.8".freeze])
32
33
  s.add_runtime_dependency(%q<json>.freeze, [">= 0".freeze])
33
- s.add_runtime_dependency(%q<tins>.freeze, [">= 0".freeze])
34
- s.add_runtime_dependency(%q<mize>.freeze, ["~> 0.3".freeze, ">= 0.3.4".freeze])
34
+ s.add_runtime_dependency(%q<tins>.freeze, ["~> 1".freeze])
35
+ s.add_runtime_dependency(%q<mize>.freeze, ["~> 0.6".freeze])
35
36
  s.add_runtime_dependency(%q<base64>.freeze, [">= 0".freeze])
36
37
  end
@@ -24,7 +24,7 @@ class ComplexConfig::KeySource
24
24
  elsif @pathname
25
25
  IO.binread(@pathname + '.key').chomp
26
26
  end
27
- rescue Errno::ENOENT
27
+ rescue Errno::ENOENT, Errno::ENOTDIR
28
28
  end
29
29
 
30
30
  def key_bytes
@@ -213,8 +213,6 @@ class ComplexConfig::Provider
213
213
 
214
214
  attr_writer :key
215
215
 
216
- attr_writer :master_key_pathname
217
-
218
216
  def new_key
219
217
  SecureRandom.hex(16)
220
218
  end
@@ -1,6 +1,6 @@
1
1
  module ComplexConfig
2
2
  # ComplexConfig version
3
- VERSION = '0.22.1'
3
+ VERSION = '0.22.3'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- RSpec.describe ComplexConfig::Config do
3
+ describe ComplexConfig::Config do
4
4
  let :plugin_code do
5
5
  -> id { skip }
6
6
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- RSpec.describe ComplexConfig::Encryption do
3
+ describe ComplexConfig::Encryption do
4
4
  let :secret do
5
5
  "\x1A8\x9E\xA8\xC2\x7F@@6\xB2W\a\x9A)\xCDw"
6
6
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- RSpec.describe ComplexConfig::KeySource do
3
+ describe ComplexConfig::KeySource do
4
4
  it 'should provide key from pathname' do
5
5
  ks = described_class.new(pathname: asset('with-key-file.yml'))
6
6
  expect(ks.key).to eq '90ec1139596f9dfdb51e72277735ce9a'
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
  require 'complex_config/plugins/enable'
3
3
 
4
- RSpec.describe ComplexConfig::Plugins do
4
+ describe ComplexConfig::Plugins do
5
5
  let :provider do
6
6
  ComplexConfig::Provider
7
7
  end
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
  require 'fileutils'
3
3
 
4
- RSpec.describe ComplexConfig::Provider do
4
+ describe ComplexConfig::Provider do
5
5
  reset_new_config = -> * {
6
6
  described_class.config_dir = Pathname.new(__FILE__).dirname.dirname + 'config'
7
7
  described_class.key = nil
@@ -42,7 +42,6 @@ RSpec.describe ComplexConfig::Provider do
42
42
 
43
43
  it 'can apply plugins' do
44
44
  described_class.add_plugin plugin
45
- allow(setting).to receive(:skip).and_throw :skip
46
45
  expect(described_class.apply_plugins(setting, :evaluate_plugin)).to eq :evaluated
47
46
  end
48
47
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- RSpec.describe ComplexConfig::Settings do
3
+ describe ComplexConfig::Settings do
4
4
  before do
5
5
  # Disable all plugins for this spec b/c they interfere with how rspec works
6
6
  allow(ComplexConfig::Provider.instance).to receive(:plugins).and_return([])
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
  require 'complex_config/shortcuts'
3
3
 
4
- RSpec.describe 'shortcuts' do
4
+ describe 'shortcuts' do
5
5
  let :provider do
6
6
  ComplexConfig::Provider
7
7
  end
@@ -54,7 +54,7 @@ RSpec.describe 'shortcuts' do
54
54
  settings = complex_config_with_env.config
55
55
  expect(settings).to be_a ComplexConfig::Settings
56
56
  expect(settings.config.baz).to eq 'something'
57
- allow(provider).to receive(:env).and_return('test')
57
+ expect(provider).to receive(:env).and_return('test').at_least(:once)
58
58
  settings = complex_config_with_env.config
59
59
  expect(settings).to be_a ComplexConfig::Settings
60
60
  expect(settings.config.baz).to eq 'something else'
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: complex_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.1
4
+ version: 0.22.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-09-22 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: gem_hadar
@@ -16,14 +15,14 @@ dependencies:
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: 1.17.1
18
+ version: '2.4'
20
19
  type: :development
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: 1.17.1
25
+ version: '2.4'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: rake
29
28
  requirement: !ruby/object:Gem::Requirement
@@ -94,6 +93,20 @@ dependencies:
94
93
  - - ">="
95
94
  - !ruby/object:Gem::Version
96
95
  version: '0'
96
+ - !ruby/object:Gem::Dependency
97
+ name: all_images
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '0.8'
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '0.8'
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: json
99
112
  requirement: !ruby/object:Gem::Requirement
@@ -112,36 +125,30 @@ dependencies:
112
125
  name: tins
113
126
  requirement: !ruby/object:Gem::Requirement
114
127
  requirements:
115
- - - ">="
128
+ - - "~>"
116
129
  - !ruby/object:Gem::Version
117
- version: '0'
130
+ version: '1'
118
131
  type: :runtime
119
132
  prerelease: false
120
133
  version_requirements: !ruby/object:Gem::Requirement
121
134
  requirements:
122
- - - ">="
135
+ - - "~>"
123
136
  - !ruby/object:Gem::Version
124
- version: '0'
137
+ version: '1'
125
138
  - !ruby/object:Gem::Dependency
126
139
  name: mize
127
140
  requirement: !ruby/object:Gem::Requirement
128
141
  requirements:
129
142
  - - "~>"
130
143
  - !ruby/object:Gem::Version
131
- version: '0.3'
132
- - - ">="
133
- - !ruby/object:Gem::Version
134
- version: 0.3.4
144
+ version: '0.6'
135
145
  type: :runtime
136
146
  prerelease: false
137
147
  version_requirements: !ruby/object:Gem::Requirement
138
148
  requirements:
139
149
  - - "~>"
140
150
  - !ruby/object:Gem::Version
141
- version: '0.3'
142
- - - ">="
143
- - !ruby/object:Gem::Version
144
- version: 0.3.4
151
+ version: '0.6'
145
152
  - !ruby/object:Gem::Dependency
146
153
  name: base64
147
154
  requirement: !ruby/object:Gem::Requirement
@@ -182,7 +189,6 @@ extra_rdoc_files:
182
189
  - lib/complex_config/tree.rb
183
190
  - lib/complex_config/version.rb
184
191
  files:
185
- - ".all_images.yml"
186
192
  - CHANGES.md
187
193
  - Gemfile
188
194
  - LICENSE
@@ -231,7 +237,6 @@ homepage: https://github.com/flori/complex_config
231
237
  licenses:
232
238
  - Apache-2.0
233
239
  metadata: {}
234
- post_install_message:
235
240
  rdoc_options:
236
241
  - "--title"
237
242
  - ComplexConfig -- configuration library
@@ -250,8 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
250
255
  - !ruby/object:Gem::Version
251
256
  version: '0'
252
257
  requirements: []
253
- rubygems_version: 3.5.18
254
- signing_key:
258
+ rubygems_version: 3.6.9
255
259
  specification_version: 4
256
260
  summary: configuration library
257
261
  test_files:
data/.all_images.yml DELETED
@@ -1,16 +0,0 @@
1
- dockerfile: |-
2
- RUN apk add --no-cache build-base git
3
- RUN gem update --system
4
- RUN gem install gem_hadar bundler
5
- script: &script |-
6
- echo -e "\e[1m"
7
- ruby -v
8
- echo -e "\e[0m"
9
- bundle install --full-index
10
- rake spec
11
-
12
- images:
13
- ruby:3.3-alpine: *script
14
- ruby:3.2-alpine: *script
15
- ruby:3.1-alpine: *script
16
- ruby:3.0-alpine: *script