anyway_config 2.0.5 → 2.0.6

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: f02fb138555d439b5a745b894f2b617db2614cd7955b41f477297b7c03182e02
4
- data.tar.gz: 5aa678eda25139e77e8ac6714a046ff3fa19510ec6110e6f0c25e2caa63c2bfa
3
+ metadata.gz: b3fcc40e50bfd285e686ca346ff5ddb3f4039104f1b5a79a8a4dd305d5d53707
4
+ data.tar.gz: 1f43073daee8706d7c9be2161bd226cb07f04a92929e6cdd81d64c8303f029da
5
5
  SHA512:
6
- metadata.gz: f03c321ea4f77e1c2fac334fe38efed8aa6555f56c6c38971d554a70c1b5f8d82d75293782f4a06c7818901a4094050bb7edc8cd5d70f7f506ba15a84ebb4375
7
- data.tar.gz: aaf7d26cc3ab82e903a1302ee6cddc2d15f0f9db0e3453421e95c0d3067a81b0e039f6d783e45c78549caa2785c989dd8cc424373316a408778bcba50d0b00d8
6
+ metadata.gz: 8125fbf4c4c592f673eca184d74ec3e02e1217016e4fa5a5d6371a24d13b9b092c48220dcd0bc57e33cbf7b0b28f0a1f5d2b9ce4c2f33aba42506e3444855bc9
7
+ data.tar.gz: 5076ec06d2dd7acbcb8a002653eb5e8df80a666ef83e7820d9ba9dd19103ac70db9560c818774bc8d8a26ea5f4b67b929c9e192c487f3e1785a5ed3f0d85b00a
@@ -1,5 +1,9 @@
1
1
  # Change log
2
2
 
3
+ ## 2.0.6 (2020-07-7)
4
+
5
+ - Fix Ruby 2.7 warnings. ([@palkan][])
6
+
3
7
  ## 2.0.5 (2020-05-15)
4
8
 
5
9
  - Use `YAML.load` instead of `YAML.safe_laad`. ([@palkan][])
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Cult Of Martians](http://cultofmartians.com/assets/badges/badge.svg)](http://cultofmartians.com)
1
+ [![Cult Of Martians](http://cultofmartians.com/assets/badges/badge.svg)](https://cultofmartians.com/tasks/anyway-config-options-parse.html#task)
2
2
  [![Gem Version](https://badge.fury.io/rb/anyway_config.svg)](https://rubygems.org/gems/anyway_config) [![Build](https://github.com/palkan/anyway_config/workflows/Build/badge.svg)](https://github.com/palkan/anyway_config/actions)
3
3
  [![JRuby Build](https://github.com/palkan/anyway_config/workflows/JRuby%20Build/badge.svg)](https://github.com/palkan/anyway_config/actions)
4
4
 
@@ -200,7 +200,7 @@ module Anyway # :nodoc:
200
200
  names.each do |name|
201
201
  accessors_module.module_eval <<~RUBY, __FILE__, __LINE__ + 1
202
202
  def #{name}=(val)
203
- __trace__&.record_value(val, \"#{name}\", Tracing.current_trace_source)
203
+ __trace__&.record_value(val, \"#{name}\", **Tracing.current_trace_source)
204
204
  # DEPRECATED: instance variable set will be removed in 2.1
205
205
  @#{name} = values[:#{name}] = val
206
206
  end
@@ -32,7 +32,8 @@ module Anyway
32
32
  value.dig(*__rest__, &__block__)
33
33
  end
34
34
 
35
- def record_value(val, *path, key, **opts)
35
+ def record_value(val, *path, **opts)
36
+ key = path.pop
36
37
  trace = if val.is_a?(Hash)
37
38
  Trace.new.tap { |_1| _1.merge_values(val, **opts) }
38
39
  else
@@ -89,7 +90,7 @@ module Anyway
89
90
  end
90
91
  end
91
92
 
92
- def dup() ; self.class.new(type, value.dup, source); end
93
+ def dup() ; self.class.new(type, value.dup, **source); end
93
94
 
94
95
  def pretty_print(q)
95
96
  if trace?
@@ -168,12 +169,11 @@ module Anyway
168
169
 
169
170
  def trace!(type, *path, **opts)
170
171
  return yield unless Tracing.tracing?
171
- source = {type: type}.merge(opts)
172
172
  val = yield
173
173
  if val.is_a?(Hash)
174
- Tracing.current_trace.merge_values(val, **source)
174
+ Tracing.current_trace.merge_values(val, type: type, **opts)
175
175
  else
176
- Tracing.current_trace.record_value(val, *path, **source)
176
+ Tracing.current_trace.record_value(val, *path, type: type, **opts)
177
177
  end
178
178
  val
179
179
  end
@@ -200,7 +200,7 @@ module Anyway # :nodoc:
200
200
  names.each do |name|
201
201
  accessors_module.module_eval <<~RUBY, __FILE__, __LINE__ + 1
202
202
  def #{name}=(val)
203
- __trace__&.record_value(val, \"#{name}\", Tracing.current_trace_source)
203
+ __trace__&.record_value(val, \"#{name}\", **Tracing.current_trace_source)
204
204
  # DEPRECATED: instance variable set will be removed in 2.1
205
205
  @#{name} = values[:#{name}] = val
206
206
  end
@@ -32,7 +32,8 @@ module Anyway
32
32
  value.dig(...)
33
33
  end
34
34
 
35
- def record_value(val, *path, key, **opts)
35
+ def record_value(val, *path, **opts)
36
+ key = path.pop
36
37
  trace = if val.is_a?(Hash)
37
38
  Trace.new.tap { _1.merge_values(val, **opts) }
38
39
  else
@@ -89,7 +90,7 @@ module Anyway
89
90
  end
90
91
  end
91
92
 
92
- def dup() ; self.class.new(type, value.dup, source); end
93
+ def dup() ; self.class.new(type, value.dup, **source); end
93
94
 
94
95
  def pretty_print(q)
95
96
  if trace?
@@ -168,12 +169,11 @@ module Anyway
168
169
 
169
170
  def trace!(type, *path, **opts)
170
171
  return yield unless Tracing.tracing?
171
- source = {type: type}.merge(opts)
172
172
  val = yield
173
173
  if val.is_a?(Hash)
174
- Tracing.current_trace.merge_values(val, **source)
174
+ Tracing.current_trace.merge_values(val, type: type, **opts)
175
175
  else
176
- Tracing.current_trace.record_value(val, *path, **source)
176
+ Tracing.current_trace.record_value(val, *path, type: type, **opts)
177
177
  end
178
178
  val
179
179
  end
@@ -200,7 +200,7 @@ module Anyway # :nodoc:
200
200
  names.each do |name|
201
201
  accessors_module.module_eval <<~RUBY, __FILE__, __LINE__ + 1
202
202
  def #{name}=(val)
203
- __trace__&.record_value(val, \"#{name}\", Tracing.current_trace_source)
203
+ __trace__&.record_value(val, \"#{name}\", **Tracing.current_trace_source)
204
204
  # DEPRECATED: instance variable set will be removed in 2.1
205
205
  @#{name} = values[:#{name}] = val
206
206
  end
@@ -32,7 +32,8 @@ module Anyway
32
32
  value.dig(...)
33
33
  end
34
34
 
35
- def record_value(val, *path, key, **opts)
35
+ def record_value(val, *path, **opts)
36
+ key = path.pop
36
37
  if val.is_a?(Hash)
37
38
  Trace.new.tap { _1.merge_values(val, **opts) }
38
39
  else
@@ -89,7 +90,7 @@ module Anyway
89
90
  end
90
91
  end
91
92
 
92
- def dup() = self.class.new(type, value.dup, source)
93
+ def dup() = self.class.new(type, value.dup, **source)
93
94
 
94
95
  def pretty_print(q)
95
96
  if trace?
@@ -168,12 +169,11 @@ module Anyway
168
169
 
169
170
  def trace!(type, *path, **opts)
170
171
  return yield unless Tracing.tracing?
171
- source = {type: type}.merge(opts)
172
172
  val = yield
173
173
  if val.is_a?(Hash)
174
- Tracing.current_trace.merge_values(val, **source)
174
+ Tracing.current_trace.merge_values(val, type: type, **opts)
175
175
  else
176
- Tracing.current_trace.record_value(val, *path, **source)
176
+ Tracing.current_trace.record_value(val, *path, type: type, **opts)
177
177
  end
178
178
  val
179
179
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Anyway # :nodoc:
4
- VERSION = "2.0.5"
4
+ VERSION = "2.0.6"
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.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Dementyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-15 00:00:00.000000000 Z
11
+ date: 2020-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-next-core