j7w1 0.0.20 → 0.0.21
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 +6 -7
- 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: 6613b07622016c00531818ef23c956ce9e5ed4b9
|
|
4
|
+
data.tar.gz: 2eb2d9a0ba09a4c2c90dad2c295584f9631e44c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d867e54750bbe4312761b44926f21c6fd41be2745fd9ceb54335701c80a94311bb626c6aaf926f9dc27ad135355d16847735a1be0148473cd1b2aa9f8e7f6b03
|
|
7
|
+
data.tar.gz: aeb795604200c42b35c4d35d48aef972d9ca866a5b88fcd16dbdcfbb678d3c59cc01719cd07bdf26409db37e759973306edf056e0d9bd063c819396e8b78070b
|
data/lib/j7w1/sns_push_client.rb
CHANGED
|
@@ -48,19 +48,17 @@ module J7W1
|
|
|
48
48
|
|
|
49
49
|
def create_device_endpoint(device_identifier, platform, options = {})
|
|
50
50
|
custom_user_data = options[:custom_user_data]
|
|
51
|
-
sns_configuration = options[:sns_configuration]
|
|
51
|
+
sns_configuration = options[:sns_configuration] || J7W1.configuration
|
|
52
52
|
sns_client = options[:sns_client]
|
|
53
53
|
|
|
54
|
-
sns_client ||= create_sns_client(sns_configuration
|
|
55
|
-
|
|
56
|
-
sns_config = J7W1.configuration
|
|
54
|
+
sns_client ||= create_sns_client(sns_configuration)
|
|
57
55
|
|
|
58
56
|
app_arn =
|
|
59
57
|
case platform
|
|
60
58
|
when :ios
|
|
61
|
-
|
|
59
|
+
sns_configuration.ios_endpoint.arn
|
|
62
60
|
when :android
|
|
63
|
-
|
|
61
|
+
sns_configuration.android_endpoint.arn
|
|
64
62
|
else
|
|
65
63
|
|
|
66
64
|
end
|
|
@@ -167,6 +165,7 @@ module J7W1
|
|
|
167
165
|
end
|
|
168
166
|
|
|
169
167
|
module_function :create_sns_client, :create_ios_application, :create_device_endpoint, :push,
|
|
170
|
-
:payload_for, :ios_payload_for, :android_payload_for, :content_from, :message_content_with_table
|
|
168
|
+
:payload_for, :ios_payload_for, :android_payload_for, :content_from, :message_content_with_table,
|
|
169
|
+
:destroy_device_endpoint, :destroy_application_endpoint
|
|
171
170
|
end
|
|
172
171
|
end
|
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.21
|
|
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-05-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk
|