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.
- checksums.yaml +4 -4
- data/lib/messaging/client.rb +12 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4832b8919a79622ff912d9ed48997fe089cdb914
|
4
|
+
data.tar.gz: 68be7c0847ea6a0ab02c436b4facc875fd2a2c7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe94210304cdee2c8a6cc4b6f953e0dc3f4d1f3618a9898ea395991b4cac06efb26bdd0dc37d6a055d5457b023e32f5f3078169a566582d5bff2ba972299cdf2
|
7
|
+
data.tar.gz: c05db72da9c85f2cece382016fdd3c67f1d3bf5343e59c7aced215c7dd855f92c30d8d9b64457f5e46058f267a9cef6457f45607bff5a5a1728ed67a9cf929ff
|
data/lib/messaging/client.rb
CHANGED
@@ -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
|
-
|
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.
|
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-
|
11
|
+
date: 2018-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|