wolf_core 0.1.97 → 0.1.98

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: b4cc996a7b18eea5664773996e709afcce3f5f1645e7f8feb57e659d0a72b063
4
- data.tar.gz: cdb96b24ac5894141469a7de98122bb80c6addd171c25f85586d3c5a24e5ae4e
3
+ metadata.gz: 0e3d081c4b356d9b3bee8084b26251a3540c6884dba594cedc404d5a346dff22
4
+ data.tar.gz: 8b9e86ead216520b002ebaaea42b621a188569e8a05c717ec3ad2e7df205290c
5
5
  SHA512:
6
- metadata.gz: 329e6f0352682c6b2ff6c9bc4d0fd4fcded60341de35a63fc582afd04c27f02e018b07c499ce6784999e712e834007f80ff504b719a9931182e361f9fee9acb3
7
- data.tar.gz: 0152cd4ccb41678178a65c78ccfcab6b0d2cd08869d8d33469cbda9c41c92bb335ea55b4db9a2984d7d02633c102b33d759791346ce6760bae2f1d1dfdd10deb
6
+ metadata.gz: 613f563fdceb49519c12ce40d68e0a38f099d96f121ef63f71e305d8bce4b2f1bdab8057978dc8f2bbb305b13fb17c90b81d026971477bfb3517d8288763e8ba
7
+ data.tar.gz: e1e40740f03748298dcc6430237bae7c7d4e6d73e8acf32cd521aefd2e9e3e8fdf5c3418e1169c35fc45993afdf7ce93291b81782ae15c85d87224ab6067fee8
@@ -4,7 +4,7 @@ module WolfCore
4
4
  def get_payload(event_type:, params:)
5
5
  return if event_type == 'SubscriptionConfirmation'
6
6
  params = JSON.parse(params['Message'] || '{}')
7
- params['payload'] = JSON.parse(params['payload'] || '{}')
7
+ JSON.parse(params['payload'] || '{}')
8
8
  end
9
9
 
10
10
  def get_event_type(params:)
@@ -46,9 +46,15 @@ module WolfCore
46
46
  end
47
47
 
48
48
  def build_body_from_params(params:, id_key:)
49
- params.slice(
50
- 'event_name', 'payload'
51
- ).merge({ id_key => params['object_id'] })
49
+ {
50
+ event_name: get_event_name(params: params),
51
+ id_key => get_object_id(params: params)
52
+ }
53
+ end
54
+
55
+ def get_object_id(params:)
56
+ params = JSON.parse(params['Message'] || '{}')
57
+ params['object_id']
52
58
  end
53
59
  end
54
60
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "0.1.97"
4
+ VERSION = "0.1.98"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wolf_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.97
4
+ version: 0.1.98
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Roncallo