anyway_config 2.6.1 → 2.6.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: ddc4b1bdc750d6aa71030a8140e25127d20ec041254bdf79e239c44d1804d5eb
4
- data.tar.gz: 42be794c396f2c861707560b8d63e6d51350f458c4da10e650006f2e6b6cbf0e
3
+ metadata.gz: e761c4c95eec2740f7db9c02482f4ffbcfdcf2493e0085a281f5a12d24b467fd
4
+ data.tar.gz: 1eddf63bbb44cb50e510fdab9b5a5bfeb68029c7a827fda96a7ea452aa35a985
5
5
  SHA512:
6
- metadata.gz: 3a8ef640dd47a01fa5bf5fb6d755b46996286ab772ae094e3ccc1bede6156f16259296e9f2a48766c1debc7052e83c8ffd3ed1de329642264295bcb0b934b5bc
7
- data.tar.gz: 1822daadbcb3ffcfdf4cae76bf306396aa794d2fbea2f13191e76b0320443a839af5aeeab3cfd44077a327ddc8d21fb3710adc81947bb8df9e551a9b09e8691d
6
+ metadata.gz: 455e2745b78c356e8baa57a504a5be3fa84cd4d9f166a5bb9352fe195cce2c1f44babe59615a8f6c87398020b91307f06b82bbb46c3286c5c2a0719cf1017ea4
7
+ data.tar.gz: f595fb6da6d1e7b9b3f8581dfcb776c1437f0ea0414e4e82728d36f60c7875ddf32c570f1910a823125c50d016d6fb1a5e3e61b2857c4d1ec6f3c9f93e5dcfef
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 2.6.2 (2024-01-08)
6
+
7
+ - Fix Ruby 3.3.0 compatibility issues (caused by [Ruby bug](https://bugs.ruby-lang.org/issues/20090)) ([@palkan][])
8
+
5
9
  ## 2.6.1 (2023-12-22)
6
10
 
7
11
  - Fix Ruby Next version requirements. ([@palkan][])
@@ -334,7 +338,7 @@ attr_config :host, :port, :url, :meta
334
338
 
335
339
  # override writer to handle type coercion
336
340
  def meta=(val)
337
- super JSON.parse(val)
341
+ super(JSON.parse(val))
338
342
  end
339
343
 
340
344
  # or override reader to handle missing values
data/README.md CHANGED
@@ -158,7 +158,7 @@ class MyConfig < Anyway::Config
158
158
 
159
159
  # override writer to handle type coercion
160
160
  def meta=(val)
161
- super JSON.parse(val)
161
+ super(JSON.parse(val))
162
162
  end
163
163
 
164
164
  # or override reader to handle missing values
@@ -389,9 +389,9 @@ module Anyway # :nodoc:
389
389
  self
390
390
  end
391
391
 
392
- def load_from_sources(base_config, **__kwrest__)
392
+ def load_from_sources(base_config, **opts)
393
393
  Anyway.loaders.each do |(_id, loader)|
394
- Utils.deep_merge!(base_config, loader.call(**__kwrest__))
394
+ Utils.deep_merge!(base_config, loader.call(**opts))
395
395
  end
396
396
  base_config
397
397
  end
@@ -26,12 +26,12 @@ module Anyway
26
26
  value.dig(*__rest__, &__block__)
27
27
  end; respond_to?(:ruby2_keywords, true) && (ruby2_keywords :dig)
28
28
 
29
- def record_value(val, *path, **__kwrest__)
29
+ def record_value(val, *path, **opts)
30
30
  key = path.pop
31
31
  trace = if val.is_a?(Hash)
32
- Trace.new.tap { |_1| it = _1;it.merge_values(val, **__kwrest__) }
32
+ Trace.new.tap { |_1| it = _1;it.merge_values(val, **opts) }
33
33
  else
34
- Trace.new(:value, val, **__kwrest__)
34
+ Trace.new(:value, val, **opts)
35
35
  end
36
36
 
37
37
  target_trace = path.empty? ? self : value.dig(*path)
@@ -40,14 +40,14 @@ module Anyway
40
40
  val
41
41
  end
42
42
 
43
- def merge_values(hash, **__kwrest__)
43
+ def merge_values(hash, **opts)
44
44
  return hash unless hash
45
45
 
46
46
  hash.each do |key, val|
47
47
  if val.is_a?(Hash)
48
- value[key.to_s].merge_values(val, **__kwrest__)
48
+ value[key.to_s].merge_values(val, **opts)
49
49
  else
50
- value[key.to_s] = Trace.new(:value, val, **__kwrest__)
50
+ value[key.to_s] = Trace.new(:value, val, **opts)
51
51
  end
52
52
  end
53
53
 
@@ -389,9 +389,9 @@ module Anyway # :nodoc:
389
389
  self
390
390
  end
391
391
 
392
- def load_from_sources(base_config, **__kwrest__)
392
+ def load_from_sources(base_config, **opts)
393
393
  Anyway.loaders.each do |(_id, loader)|
394
- Utils.deep_merge!(base_config, loader.call(**__kwrest__))
394
+ Utils.deep_merge!(base_config, loader.call(**opts))
395
395
  end
396
396
  base_config
397
397
  end
@@ -26,12 +26,12 @@ module Anyway
26
26
  value.dig(...)
27
27
  end; respond_to?(:ruby2_keywords, true) && (ruby2_keywords :dig)
28
28
 
29
- def record_value(val, *path, **__kwrest__)
29
+ def record_value(val, *path, **opts)
30
30
  key = path.pop
31
31
  trace = if val.is_a?(Hash)
32
- Trace.new.tap { it = _1;it.merge_values(val, **__kwrest__) }
32
+ Trace.new.tap { it = _1;it.merge_values(val, **opts) }
33
33
  else
34
- Trace.new(:value, val, **__kwrest__)
34
+ Trace.new(:value, val, **opts)
35
35
  end
36
36
 
37
37
  target_trace = path.empty? ? self : value.dig(*path)
@@ -40,14 +40,14 @@ module Anyway
40
40
  val
41
41
  end
42
42
 
43
- def merge_values(hash, **__kwrest__)
43
+ def merge_values(hash, **opts)
44
44
  return hash unless hash
45
45
 
46
46
  hash.each do |key, val|
47
47
  if val.is_a?(Hash)
48
- value[key.to_s].merge_values(val, **__kwrest__)
48
+ value[key.to_s].merge_values(val, **opts)
49
49
  else
50
- value[key.to_s] = Trace.new(:value, val, **__kwrest__)
50
+ value[key.to_s] = Trace.new(:value, val, **opts)
51
51
  end
52
52
  end
53
53
 
@@ -389,9 +389,9 @@ module Anyway # :nodoc:
389
389
  self
390
390
  end
391
391
 
392
- def load_from_sources(base_config, **__kwrest__)
392
+ def load_from_sources(base_config, **opts)
393
393
  Anyway.loaders.each do |(_id, loader)|
394
- Utils.deep_merge!(base_config, loader.call(**__kwrest__))
394
+ Utils.deep_merge!(base_config, loader.call(**opts))
395
395
  end
396
396
  base_config
397
397
  end
@@ -26,12 +26,12 @@ module Anyway
26
26
  value.dig(...)
27
27
  end
28
28
 
29
- def record_value(val, *path, **__kwrest__)
29
+ def record_value(val, *path, **opts)
30
30
  key = path.pop
31
31
  trace = if val.is_a?(Hash)
32
- Trace.new.tap { it = _1;it.merge_values(val, **__kwrest__) }
32
+ Trace.new.tap { it = _1;it.merge_values(val, **opts) }
33
33
  else
34
- Trace.new(:value, val, **__kwrest__)
34
+ Trace.new(:value, val, **opts)
35
35
  end
36
36
 
37
37
  target_trace = path.empty? ? self : value.dig(*path)
@@ -40,14 +40,14 @@ module Anyway
40
40
  val
41
41
  end
42
42
 
43
- def merge_values(hash, **__kwrest__)
43
+ def merge_values(hash, **opts)
44
44
  return hash unless hash
45
45
 
46
46
  hash.each do |key, val|
47
47
  if val.is_a?(Hash)
48
- value[key.to_s].merge_values(val, **__kwrest__)
48
+ value[key.to_s].merge_values(val, **opts)
49
49
  else
50
- value[key.to_s] = Trace.new(:value, val, **__kwrest__)
50
+ value[key.to_s] = Trace.new(:value, val, **opts)
51
51
  end
52
52
  end
53
53
 
@@ -389,9 +389,9 @@ module Anyway # :nodoc:
389
389
  self
390
390
  end
391
391
 
392
- def load_from_sources(base_config, **__kwrest__)
392
+ def load_from_sources(base_config, **opts)
393
393
  Anyway.loaders.each do |(_id, loader)|
394
- Utils.deep_merge!(base_config, loader.call(**__kwrest__))
394
+ Utils.deep_merge!(base_config, loader.call(**opts))
395
395
  end
396
396
  base_config
397
397
  end
@@ -26,12 +26,12 @@ module Anyway
26
26
  value.dig(...)
27
27
  end
28
28
 
29
- def record_value(val, *path, **__kwrest__)
29
+ def record_value(val, *path, **opts)
30
30
  key = path.pop
31
31
  trace = if val.is_a?(Hash)
32
- Trace.new.tap { it = _1;it.merge_values(val, **__kwrest__) }
32
+ Trace.new.tap { it = _1;it.merge_values(val, **opts) }
33
33
  else
34
- Trace.new(:value, val, **__kwrest__)
34
+ Trace.new(:value, val, **opts)
35
35
  end
36
36
 
37
37
  target_trace = path.empty? ? self : value.dig(*path)
@@ -40,14 +40,14 @@ module Anyway
40
40
  val
41
41
  end
42
42
 
43
- def merge_values(hash, **__kwrest__)
43
+ def merge_values(hash, **opts)
44
44
  return hash unless hash
45
45
 
46
46
  hash.each do |key, val|
47
47
  if val.is_a?(Hash)
48
- value[key.to_s].merge_values(val, **__kwrest__)
48
+ value[key.to_s].merge_values(val, **opts)
49
49
  else
50
- value[key.to_s] = Trace.new(:value, val, **__kwrest__)
50
+ value[key.to_s] = Trace.new(:value, val, **opts)
51
51
  end
52
52
  end
53
53
 
@@ -389,9 +389,9 @@ module Anyway # :nodoc:
389
389
  self
390
390
  end
391
391
 
392
- def load_from_sources(base_config, **)
392
+ def load_from_sources(base_config, **opts)
393
393
  Anyway.loaders.each do |(_id, loader)|
394
- Utils.deep_merge!(base_config, loader.call(**))
394
+ Utils.deep_merge!(base_config, loader.call(**opts))
395
395
  end
396
396
  base_config
397
397
  end
@@ -26,12 +26,12 @@ module Anyway
26
26
  value.dig(...)
27
27
  end
28
28
 
29
- def record_value(val, *path, **)
29
+ def record_value(val, *path, **opts)
30
30
  key = path.pop
31
31
  trace = if val.is_a?(Hash)
32
- Trace.new.tap { it = _1;it.merge_values(val, **) }
32
+ Trace.new.tap { it = _1;it.merge_values(val, **opts) }
33
33
  else
34
- Trace.new(:value, val, **)
34
+ Trace.new(:value, val, **opts)
35
35
  end
36
36
 
37
37
  target_trace = path.empty? ? self : value.dig(*path)
@@ -40,14 +40,14 @@ module Anyway
40
40
  val
41
41
  end
42
42
 
43
- def merge_values(hash, **)
43
+ def merge_values(hash, **opts)
44
44
  return hash unless hash
45
45
 
46
46
  hash.each do |key, val|
47
47
  if val.is_a?(Hash)
48
- value[key.to_s].merge_values(val, **)
48
+ value[key.to_s].merge_values(val, **opts)
49
49
  else
50
- value[key.to_s] = Trace.new(:value, val, **)
50
+ value[key.to_s] = Trace.new(:value, val, **opts)
51
51
  end
52
52
  end
53
53
 
data/lib/anyway/config.rb CHANGED
@@ -389,9 +389,9 @@ module Anyway # :nodoc:
389
389
  self
390
390
  end
391
391
 
392
- def load_from_sources(base_config, **)
392
+ def load_from_sources(base_config, **opts)
393
393
  Anyway.loaders.each do |(_id, loader)|
394
- Utils.deep_merge!(base_config, loader.call(**))
394
+ Utils.deep_merge!(base_config, loader.call(**opts))
395
395
  end
396
396
  base_config
397
397
  end
@@ -26,12 +26,12 @@ module Anyway
26
26
  value.dig(...)
27
27
  end
28
28
 
29
- def record_value(val, *path, **)
29
+ def record_value(val, *path, **opts)
30
30
  key = path.pop
31
31
  trace = if val.is_a?(Hash)
32
- Trace.new.tap { it.merge_values(val, **) }
32
+ Trace.new.tap { it.merge_values(val, **opts) }
33
33
  else
34
- Trace.new(:value, val, **)
34
+ Trace.new(:value, val, **opts)
35
35
  end
36
36
 
37
37
  target_trace = path.empty? ? self : value.dig(*path)
@@ -40,14 +40,14 @@ module Anyway
40
40
  val
41
41
  end
42
42
 
43
- def merge_values(hash, **)
43
+ def merge_values(hash, **opts)
44
44
  return hash unless hash
45
45
 
46
46
  hash.each do |key, val|
47
47
  if val.is_a?(Hash)
48
- value[key.to_s].merge_values(val, **)
48
+ value[key.to_s].merge_values(val, **opts)
49
49
  else
50
- value[key.to_s] = Trace.new(:value, val, **)
50
+ value[key.to_s] = Trace.new(:value, val, **opts)
51
51
  end
52
52
  end
53
53
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Anyway # :nodoc:
4
- VERSION = "2.6.1"
4
+ VERSION = "2.6.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anyway_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Dementyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-22 00:00:00.000000000 Z
11
+ date: 2024-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-next-core