anyway_config 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/.rbnext/2.7/anyway/config.rb +1 -1
- data/lib/.rbnext/2.7/anyway/tracing.rb +5 -5
- data/lib/.rbnext/2.8/anyway/config.rb +1 -1
- data/lib/.rbnext/2.8/anyway/tracing.rb +5 -5
- data/lib/anyway/config.rb +1 -1
- data/lib/anyway/tracing.rb +5 -5
- data/lib/anyway/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3fcc40e50bfd285e686ca346ff5ddb3f4039104f1b5a79a8a4dd305d5d53707
|
4
|
+
data.tar.gz: 1f43073daee8706d7c9be2161bd226cb07f04a92929e6cdd81d64c8303f029da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8125fbf4c4c592f673eca184d74ec3e02e1217016e4fa5a5d6371a24d13b9b092c48220dcd0bc57e33cbf7b0b28f0a1f5d2b9ce4c2f33aba42506e3444855bc9
|
7
|
+
data.tar.gz: 5076ec06d2dd7acbcb8a002653eb5e8df80a666ef83e7820d9ba9dd19103ac70db9560c818774bc8d8a26ea5f4b67b929c9e192c487f3e1785a5ed3f0d85b00a
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[](
|
1
|
+
[](https://cultofmartians.com/tasks/anyway-config-options-parse.html#task)
|
2
2
|
[](https://rubygems.org/gems/anyway_config) [](https://github.com/palkan/anyway_config/actions)
|
3
3
|
[](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,
|
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, **
|
174
|
+
Tracing.current_trace.merge_values(val, type: type, **opts)
|
175
175
|
else
|
176
|
-
Tracing.current_trace.record_value(val, *path, **
|
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,
|
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, **
|
174
|
+
Tracing.current_trace.merge_values(val, type: type, **opts)
|
175
175
|
else
|
176
|
-
Tracing.current_trace.record_value(val, *path, **
|
176
|
+
Tracing.current_trace.record_value(val, *path, type: type, **opts)
|
177
177
|
end
|
178
178
|
val
|
179
179
|
end
|
data/lib/anyway/config.rb
CHANGED
@@ -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
|
data/lib/anyway/tracing.rb
CHANGED
@@ -32,7 +32,8 @@ module Anyway
|
|
32
32
|
value.dig(...)
|
33
33
|
end
|
34
34
|
|
35
|
-
def record_value(val, *path,
|
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, **
|
174
|
+
Tracing.current_trace.merge_values(val, type: type, **opts)
|
175
175
|
else
|
176
|
-
Tracing.current_trace.record_value(val, *path, **
|
176
|
+
Tracing.current_trace.record_value(val, *path, type: type, **opts)
|
177
177
|
end
|
178
178
|
val
|
179
179
|
end
|
data/lib/anyway/version.rb
CHANGED
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.
|
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-
|
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
|