aws_sns_manager 0.0.5.pre.alpha.pre.68 → 0.0.6.pre.alpha.pre.68
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/aws_sns_manager.gemspec +2 -2
- data/lib/aws_sns_manager/client.rb +17 -6
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c46220c66f169b2e3d2b6ac107f8a17742c41e26cf7480e7588280981e13a2a
|
4
|
+
data.tar.gz: af9764c3f042f5077a42fe128d26bfc66c3e72ddc4c16862e7cd82d17b05ae36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3810d7eda3ede60ad474cf7a508d1a77d4fdab666d5c8118c57e456780c5c019d1c31a9da038a3599dcd69512ddbb07e8f25b5d9f8cdb3b2d6ddc31c5c6a0974
|
7
|
+
data.tar.gz: 12ed3945a27aa4758570be414debdd8400212570803ae62c7eeaa70088e1944be025eb23451e63736701a5f2bfd06edb842e1e425f14e541600bc56aeb058b9c
|
data/Gemfile.lock
CHANGED
data/aws_sns_manager.gemspec
CHANGED
@@ -16,8 +16,8 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.require_paths = %w[lib]
|
17
17
|
s.required_rubygems_version = '>= 1.3.5'
|
18
18
|
s.summary = s.description
|
19
|
-
s.version =
|
20
|
-
s.version = "
|
19
|
+
# s.version = '0.0.6.pre'
|
20
|
+
s.version = "0.0.6.pre.alpha.pre.68"
|
21
21
|
|
22
22
|
s.required_ruby_version = '>= 2.7'
|
23
23
|
|
@@ -42,8 +42,9 @@ module AwsSnsManager
|
|
42
42
|
elsif type == :nosound
|
43
43
|
data = nosound_notification(text, options)
|
44
44
|
end
|
45
|
-
|
46
|
-
|
45
|
+
gcm_payload = gcm_notification(text, options)
|
46
|
+
return dev_json(data, gcm_payload) if env == :dev
|
47
|
+
prod_json(data, gcm_payload)
|
47
48
|
end
|
48
49
|
|
49
50
|
# rubocop:disable Metrics/MethodLength
|
@@ -93,14 +94,24 @@ module AwsSnsManager
|
|
93
94
|
end
|
94
95
|
# rubocop:enable Metrics/MethodLength
|
95
96
|
|
97
|
+
def gcm_notification(text, options = {})
|
98
|
+
{
|
99
|
+
notification: {
|
100
|
+
title: nil,
|
101
|
+
body: text
|
102
|
+
},
|
103
|
+
data: options
|
104
|
+
}
|
105
|
+
end
|
106
|
+
|
96
107
|
private
|
97
108
|
|
98
|
-
def dev_json(data)
|
99
|
-
{ default: data.to_json, APNS_SANDBOX: data.to_json }
|
109
|
+
def dev_json(data, gcm_paylod)
|
110
|
+
{ default: data.to_json, APNS_SANDBOX: data.to_json, GCM: gcm_paylod.to_json }
|
100
111
|
end
|
101
112
|
|
102
|
-
def prod_json(data)
|
103
|
-
{ default: data.to_json, APNS: data.to_json, GCM:
|
113
|
+
def prod_json(data, gcm_paylod)
|
114
|
+
{ default: data.to_json, APNS: data.to_json, GCM: gcm_paylod.to_json }
|
104
115
|
end
|
105
116
|
end
|
106
117
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws_sns_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6.pre.alpha.pre.68
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fumiya Nakamura
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-sns
|
@@ -160,7 +160,7 @@ homepage: http://github.com/nafu/aws_sns_manager
|
|
160
160
|
licenses:
|
161
161
|
- MIT
|
162
162
|
metadata: {}
|
163
|
-
post_install_message:
|
163
|
+
post_install_message:
|
164
164
|
rdoc_options: []
|
165
165
|
require_paths:
|
166
166
|
- lib
|
@@ -175,8 +175,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
175
|
- !ruby/object:Gem::Version
|
176
176
|
version: 1.3.1
|
177
177
|
requirements: []
|
178
|
-
rubygems_version: 3.
|
179
|
-
signing_key:
|
178
|
+
rubygems_version: 3.2.33
|
179
|
+
signing_key:
|
180
180
|
specification_version: 4
|
181
181
|
summary: Utility for Amazon Simple Notification Service
|
182
182
|
test_files: []
|