anyway_config 2.6.0 → 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: 9b60f98c1d44ca23fb8c0c822aca4220791c280e814ff2e3e7b1013e857c53bd
4
- data.tar.gz: 564d6f9e3ec6f78d796f7ce36892ec54bd55b2d3485b2ce9717de153fe968e28
3
+ metadata.gz: e761c4c95eec2740f7db9c02482f4ffbcfdcf2493e0085a281f5a12d24b467fd
4
+ data.tar.gz: 1eddf63bbb44cb50e510fdab9b5a5bfeb68029c7a827fda96a7ea452aa35a985
5
5
  SHA512:
6
- metadata.gz: 995ab4acf51e8bc9ac989a50d307c6a2a3cec924f3ccce9b09246de0d87b1930b5cb3b62f1eee74c8a6ba5f00f1eb5efee1e8ea1257418b47bb1074e9a7df683
7
- data.tar.gz: 0372ae383cfe16192b69bf42ac183a6a8291074bfd07282e8bf4a9efce803a151151091194d58a002481cfd16d56aa5cc226b5a5d5b1cf9d103c7009ff9eee17
6
+ metadata.gz: 455e2745b78c356e8baa57a504a5be3fa84cd4d9f166a5bb9352fe195cce2c1f44babe59615a8f6c87398020b91307f06b82bbb46c3286c5c2a0719cf1017ea4
7
+ data.tar.gz: f595fb6da6d1e7b9b3f8581dfcb776c1437f0ea0414e4e82728d36f60c7875ddf32c570f1910a823125c50d016d6fb1a5e3e61b2857c4d1ec6f3c9f93e5dcfef
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
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
+
9
+ ## 2.6.1 (2023-12-22)
10
+
11
+ - Fix Ruby Next version requirements. ([@palkan][])
12
+
5
13
  ## 2.6.0 (2023-12-18)
6
14
 
7
15
  - Add `rails local_credentials:edit` command to manipulate local credentials in Rails 7.1+. ([@palkan][])
@@ -330,7 +338,7 @@ attr_config :host, :port, :url, :meta
330
338
 
331
339
  # override writer to handle type coercion
332
340
  def meta=(val)
333
- super JSON.parse(val)
341
+ super(JSON.parse(val))
334
342
  end
335
343
 
336
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.0"
4
+ VERSION = "2.6.2"
5
5
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anyway_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
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-18 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
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.15'
19
+ version: '1.0'
20
20
  type: :runtime
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: '0.15'
26
+ version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ammeter
29
29
  requirement: !ruby/object:Gem::Requirement