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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 02ed271a4ef7404262e5cd5379853e948470c28d515d0e4f7ef2bbe7e05bc401
4
- data.tar.gz: 07ca8129f964945d42f033426fb90646560516ddfdfbdc73db0efc131f537605
3
+ metadata.gz: c7e0f8bfa9b529a0adb567c8ebccdad2edd6ad64a1853a3ff49cf772ee46cf76
4
+ data.tar.gz: 0e73870879ff49b8ec75976df58af3054206fdc77888588c6d863184350c8a78
5
5
  SHA512:
6
- metadata.gz: fb0b462ede9e4bd3b68381a4e08ce963d4f685761e2b35d4871cbb84423511eeaebdf391f8c6055a0aa10649de0cebebeeafad51bfcdada0e2bf7b68615c0f97
7
- data.tar.gz: 59b5335db5bbebeb535e31cdf6c1caec6c4e9464963e2d9a0ea72d1c4dd27221a6ae25b54cd451e6e37ad4845752a6f6ab8edbfc207321f02f5c8dd4c1905b06
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
@@ -13,5 +13,5 @@ module PayloadTranslator
13
13
  configuration
14
14
  end
15
15
 
16
- VERSION = "0.1.0"
16
+ VERSION = "0.2.0"
17
17
  end
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.1.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
- rubyforge_project:
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