messaging_client 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/messaging/client.rb +12 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d2600a9ae786acedfa54c1127f25f8ec8a79efa
4
- data.tar.gz: 32b5b018cd58ec5a45f4c11b40db565336d9fad5
3
+ metadata.gz: 4832b8919a79622ff912d9ed48997fe089cdb914
4
+ data.tar.gz: 68be7c0847ea6a0ab02c436b4facc875fd2a2c7a
5
5
  SHA512:
6
- metadata.gz: fb9455aa2578ff5e660dffd57bd232a85c7584a1c16985b675c3330e9082c2b217bc3eadce8d05f95ba8c9ce7a0302d0f68d9fb182b3d546cf70c091992960b5
7
- data.tar.gz: 664821a09122eaf7ee083a8172a689cb47cbcf5c1cd0350e8c09e85c41120702faf7c54f861aed998bf16c0ab9af92be11b13680484e3bf067bc8fe9c5e37e44
6
+ metadata.gz: fe94210304cdee2c8a6cc4b6f953e0dc3f4d1f3618a9898ea395991b4cac06efb26bdd0dc37d6a055d5457b023e32f5f3078169a566582d5bff2ba972299cdf2
7
+ data.tar.gz: c05db72da9c85f2cece382016fdd3c67f1d3bf5343e59c7aced215c7dd855f92c30d8d9b64457f5e46058f267a9cef6457f45607bff5a5a1728ed67a9cf929ff
@@ -36,7 +36,18 @@ module Messaging
36
36
  )
37
37
  topic_arn = sns.topics.select{|t| t.arn.match(/([^:]*)$/)[0] == key.to_s }.first.try(:arn)
38
38
  topic = sns.topic(topic_arn)
39
- topic.publish({ message: data.to_json })
39
+
40
+ msg = { message: data.to_json }
41
+ if data['account_name']
42
+ msg[:message_attributes] = {
43
+ account_name: {
44
+ data_type: 'String',
45
+ string_value: data['account_name']
46
+ }
47
+ }
48
+ end
49
+
50
+ topic.publish(msg)
40
51
  end
41
52
 
42
53
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: messaging_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dwayne Macgowan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-30 00:00:00.000000000 Z
11
+ date: 2018-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties