complex_config 0.22.1 → 0.22.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d25e925267a755f28ea324b3ed2f43d737659124e097ae52ac48bd87aedd9173
4
- data.tar.gz: f68858a3bba577915b3d602093363f1143b29be84cfe42f4ac4c64056baa5551
3
+ metadata.gz: dec152dd05a3915da90c6145950d4339a75949644a92c562e8e0ebded4419ec8
4
+ data.tar.gz: 8cd0e2f3f8bf856bec3eb327bd9c4047e7529c226daf8ede5bf10351cf7e8e5a
5
5
  SHA512:
6
- metadata.gz: c9cb2d7480057aa2685952e8c272c8a10245664c0e30fbdf83d76c1fd5c2ff196eb84bec265baa5fae19283acdcb9efd5c25e90721e40df4fe185fa5c2273bf9
7
- data.tar.gz: 463827352c5df8655b58ea371c57733b78aa2a00ca28ac0e77516cb2b7edaf43919f5b5c93cf27e32d3add7d8eec53b8204af9b862871ba3d9a0037220ce34ae
6
+ metadata.gz: d4eff35fd9725c6b0e2df22f8ccc74c8d0883abca52ad67217e2de50f6c368a474ec957a7540106f546f0f7720431502736f0107b14670c9839e0dc82370b7d2
7
+ data.tar.gz: 59010f4928055d8ca065efc50c120d89804429c21aaf34cb9ce47bedb5b28f15698222c565c39d1bb16fdfebde0d9f6899e03c8d2ff8cd2921640c33a63929f0
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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.22.1
1
+ 0.22.2
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: complex_config 0.22.1 ruby lib
2
+ # stub: complex_config 0.22.2 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.2".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 = "2024-10-21"
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]
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
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, ["~> 1.19".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])
@@ -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
@@ -1,6 +1,6 @@
1
1
  module ComplexConfig
2
2
  # ComplexConfig version
3
- VERSION = '0.22.1'
3
+ VERSION = '0.22.2'
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:
@@ -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
@@ -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,14 @@
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-22 00:00:00.000000000 Z
11
+ date: 2024-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.17.1
19
+ version: '1.19'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.17.1
26
+ version: '1.19'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement