payload-translator 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/payload_translator/field_resolver.rb +2 -0
- data/lib/payload_translator.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7e0f8bfa9b529a0adb567c8ebccdad2edd6ad64a1853a3ff49cf772ee46cf76
|
4
|
+
data.tar.gz: 0e73870879ff49b8ec75976df58af3054206fdc77888588c6d863184350c8a78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53c2c2a1a96f8c6483b415655c2566efa85c401fa0ac3fec8e637c6277fec188def4a266d5349a6f16ccf000b0b7f2e54030870318c45fbfce633ea40043cee2
|
7
|
+
data.tar.gz: 2f8df32464185ef5c8c7169b931bd7961657d83814f346c3094b7b4ae9b248303ec201fcf7e8465a27cab7206069b49669d540770e0137069af7b60324087451
|
@@ -54,6 +54,8 @@ module PayloadTranslator
|
|
54
54
|
if field_or_fields.is_a?(Array)
|
55
55
|
field = field_or_fields.find { |field| payload[field] }
|
56
56
|
payload.fetch(field) { config["$default"] }
|
57
|
+
elsif field_or_fields =~ /\./
|
58
|
+
payload.dig(*field_or_fields.split(".")) || config["$default"]
|
57
59
|
else
|
58
60
|
payload.fetch(field_or_fields) { config["$default"] }
|
59
61
|
end
|
data/lib/payload_translator.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: payload-translator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Savignano
|
@@ -55,8 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: '0'
|
57
57
|
requirements: []
|
58
|
-
|
59
|
-
rubygems_version: 2.7.11
|
58
|
+
rubygems_version: 3.0.3
|
60
59
|
signing_key:
|
61
60
|
specification_version: 4
|
62
61
|
summary: PayloadTranslator
|