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 +4 -4
- data/CHANGES.md +97 -88
- data/VERSION +1 -1
- data/complex_config.gemspec +4 -4
- data/lib/complex_config/key_source.rb +1 -1
- data/lib/complex_config/version.rb +1 -1
- data/spec/complex_config/provider_spec.rb +0 -1
- data/spec/complex_config/shortcuts_spec.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dec152dd05a3915da90c6145950d4339a75949644a92c562e8e0ebded4419ec8
|
4
|
+
data.tar.gz: 8cd0e2f3f8bf856bec3eb327bd9c4047e7529c226daf8ede5bf10351cf7e8e5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
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
|
-
|
31
|
-
|
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
|
-
|
44
|
-
|
45
|
-
|
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
|
-
|
49
|
-
|
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
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
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
|
-
|
95
|
-
|
103
|
+
+ Added support for newest Psych 4 library
|
104
|
+
+ Defaults to disabling YAML alias feature
|
96
105
|
* **Psych API Update**
|
97
|
-
|
98
|
-
|
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
|
-
|
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
|
-
|
111
|
-
|
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
|
-
|
129
|
-
|
130
|
-
|
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
|
-
|
133
|
-
|
134
|
-
|
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
|
-
|
158
|
+
+ Implemented a new logic to handle intricate cases
|
150
159
|
* Improved error handling and reporting
|
151
|
-
|
160
|
+
+ Enhanced logging to provide more detailed information about errors
|
152
161
|
* Minor code refactoring
|
153
|
-
|
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
|
-
|
165
|
-
|
166
|
-
|
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
|
-
|
169
|
-
|
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
|
-
|
187
|
-
|
195
|
+
+ Improved error handling if key isn't valid
|
196
|
+
+ Raises `ComplexConfig::DecryptionFailed` for encrypted files
|
188
197
|
* **Compatibility**:
|
189
|
-
|
198
|
+
+ Make this run on older rubies
|
190
199
|
* **Documentation**:
|
191
|
-
|
200
|
+
+ Cleanup documentation
|
192
201
|
* **RubyGems**:
|
193
|
-
|
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
|
-
|
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
|
-
|
208
|
-
|
209
|
-
|
216
|
+
+ Be compatible with ancient rubies^3
|
217
|
+
+ Be compatible with ancient rubies^2
|
218
|
+
+ Be compatible with ancient rubies
|
210
219
|
* **Refactoring**
|
211
|
-
|
220
|
+
+ Refactor key provision with source object
|
212
221
|
|
213
222
|
## 2018-02-09 v0.13.1
|
214
223
|
|
215
224
|
* **New Features**
|
216
|
-
|
225
|
+
+ Added information to README file
|
217
226
|
* **Significant Changes**
|
218
|
-
|
219
|
-
|
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
|
-
|
247
|
+
+ Add support for writing configurations (encrypted or not)
|
239
248
|
* **Version Bump**
|
240
|
-
|
249
|
+
+ Bump version to 0.12.0
|
241
250
|
* **Compatibility Improvements**
|
242
|
-
|
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
|
-
|
280
|
+
+ Memoized proxy object for improved performance.
|
272
281
|
|
273
282
|
## 2016-11-23 v0.9.1
|
274
283
|
|
275
284
|
* **New Features**
|
276
|
-
|
277
|
-
|
285
|
+
+ Use newest RubyGems
|
286
|
+
+ Test on Ruby 2.3.3
|
278
287
|
* **Bug Fixes**
|
279
|
-
|
280
|
-
|
288
|
+
+ Fix Travis builds
|
289
|
+
+ travis fiddles with RAILS_ENV variable, breaking specs (resolved)
|
281
290
|
* **Testing Improvements**
|
282
|
-
|
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
|
-
|
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
|
-
|
313
|
+
+ Updated README.md with new changes
|
305
314
|
|
306
315
|
## 2016-07-15 v0.6.0
|
307
316
|
|
308
317
|
* **Caching Improvements**
|
309
|
-
|
318
|
+
+ Use `mize` for caching
|
310
319
|
|
311
320
|
## 2016-06-23 v0.5.2
|
312
321
|
|
313
322
|
* **Index Access Feature**
|
314
|
-
|
315
|
-
|
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
|
-
|
333
|
+
+ Use new infrastructure
|
325
334
|
* **Bug Fixes**
|
326
|
-
|
335
|
+
+ Fix typo
|
327
336
|
|
328
337
|
## 2015-11-19 v0.5.0
|
329
338
|
|
330
339
|
* **New Features**
|
331
|
-
|
332
|
-
|
340
|
+
+ Add configure method
|
341
|
+
+ Add configuration example to README
|
333
342
|
* **Bug Fixes**
|
334
|
-
|
335
|
-
|
343
|
+
+ Flush cache for every request in rails development
|
344
|
+
+ Change the Changes
|
336
345
|
* **Improvements**
|
337
|
-
|
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
|
-
|
347
|
-
|
348
|
-
|
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
|
-
|
351
|
-
|
359
|
+
+ Use newest gem hadar
|
360
|
+
+ Add some development_dependencies (including tins)
|
352
361
|
* **Code Improvements**
|
353
|
-
|
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
|
-
|
385
|
-
|
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
|
-
|
399
|
+
+ Added Apache license file
|
391
400
|
|
392
401
|
## 2015-01-01 v0.1.1
|
393
402
|
|
394
403
|
* **New Version Summary**
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
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
|
-
|
404
|
-
|
405
|
-
|
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
|
+
0.22.2
|
data/complex_config.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: complex_config 0.22.
|
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.
|
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-
|
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.
|
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])
|
@@ -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
|
-
|
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.
|
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-
|
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.
|
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.
|
26
|
+
version: '1.19'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|