j7w1 0.0.16 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/j7w1/sns_push_client.rb +8 -1
- data/lib/j7w1/version.rb +1 -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: 015073b124bf0e8f9a4a37f2c553c1238be903ca
|
|
4
|
+
data.tar.gz: 6e1cd196723d5d748a530d0c6db2c05fc47e005e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2f110d6d06ec461d4055d8eaac0c6863e7d0f4f3ba4a1911b11c87a1dddf2b7562cae90293c3fb40548b98c7fcd11bf148c24819bfd0fab6d4634c597c83082e
|
|
7
|
+
data.tar.gz: 6ec532b203caa78acc6d65dda12c85f1406783cc59054f5d932debbf42f32a57762286a4d3b745d7c63c9033b93769bccf86ed94696c7e8f641ed99ebd0f68e6
|
data/lib/j7w1/sns_push_client.rb
CHANGED
|
@@ -97,7 +97,14 @@ module J7W1
|
|
|
97
97
|
payload = payload_for(message_value, platform)
|
|
98
98
|
|
|
99
99
|
sns_client ||= create_sns_client(sns_configuration || J7W1.configuration)
|
|
100
|
-
sns_client.client
|
|
100
|
+
client = sns_client.client
|
|
101
|
+
|
|
102
|
+
enabled = (client.get_endpoint_attributes(endpoint_arn: endpoint_arn)[:attributes]['Enabled'] == 'true')
|
|
103
|
+
unless enabled
|
|
104
|
+
client.set_endpoint_attributes endpoint_arn: endpoint_arn, attributes: {'Enabled' => 'true'}
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
client.publish(
|
|
101
108
|
target_arn: endpoint_arn,
|
|
102
109
|
message: payload.to_json,
|
|
103
110
|
message_structure: 'json',
|
data/lib/j7w1/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: j7w1
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.17
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- condor
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-03-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk
|