j7w1 0.0.16 → 0.0.17

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
  SHA1:
3
- metadata.gz: d54a3e9b7746f9838f0fde8d600acfe88c84a6b2
4
- data.tar.gz: fba9d3d45e48d5a9e2db7b9940da28cc036214d1
3
+ metadata.gz: 015073b124bf0e8f9a4a37f2c553c1238be903ca
4
+ data.tar.gz: 6e1cd196723d5d748a530d0c6db2c05fc47e005e
5
5
  SHA512:
6
- metadata.gz: 9e8e1a2962332dd517432c64c05d08da75abf06055bed5a524725c495509dcbd6538e0ba3baf8e6380086d32921f73bb6aa6911fd6ddfb04dee3b28e09aaaca6
7
- data.tar.gz: 74ccdeb010980c1e90ff6381947dfd006853c9d48aae583079d58d24afa47b3aff4930cf5970dcae2313a8883fa0e5058b36a5d045af91143bcaeb200928950a
6
+ metadata.gz: 2f110d6d06ec461d4055d8eaac0c6863e7d0f4f3ba4a1911b11c87a1dddf2b7562cae90293c3fb40548b98c7fcd11bf148c24819bfd0fab6d4634c597c83082e
7
+ data.tar.gz: 6ec532b203caa78acc6d65dda12c85f1406783cc59054f5d932debbf42f32a57762286a4d3b745d7c63c9033b93769bccf86ed94696c7e8f641ed99ebd0f68e6
@@ -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.publish(
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
@@ -1,3 +1,3 @@
1
1
  module J7W1
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
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.16
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-02-24 00:00:00.000000000 Z
11
+ date: 2014-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk