messaging_client 0.1.3 → 0.1.4
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 +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53aee60c590183fe4d36042156b1fec5ce8ffada
|
4
|
+
data.tar.gz: 8a6aace9d5d714761fc0f0e8ed04b71d34d2dbef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 507beb1c204bd54e5eb364ed615982cb18f4b5361ae9f13c3c43fd39ff310aa394c0c03f94a6c5a6afa42035f31ae374c4cb132ff511bec4acb03e7f3ce4cf1a
|
7
|
+
data.tar.gz: 267877d19f0f940279b76db438c33218e3c21a872103bedcfb357532d29e2f3f846826a2fe5184812d52ac277518b9525276735deb3d3aeb01d488b0ff75934a
|
data/lib/messaging/client.rb
CHANGED
@@ -30,7 +30,7 @@ module Messaging
|
|
30
30
|
access_key_id: SNS_KEY_ID,
|
31
31
|
secret_access_key: SNS_SECRET_ACCESS_KEY
|
32
32
|
)
|
33
|
-
topic_arn = sns.topics.select{|t| t.arn.match(/([^:]*)$/)[0] == key.to_s }.first
|
33
|
+
topic_arn = sns.topics.select{|t| t.arn.match(/([^:]*)$/)[0] == key.to_s }.first.try(:arn)
|
34
34
|
topic = sns.topic(topic_arn)
|
35
35
|
topic.publish({ message: data.to_json })
|
36
36
|
end
|