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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3206b7709924d5083703c830e34788d17236b4f34f750a0bb137789eea916da
4
- data.tar.gz: c79f0c21be7dc9ca5745048d310ea4804ecf0e7a3fbeb2071e93a5c94120b654
3
+ metadata.gz: 5c46220c66f169b2e3d2b6ac107f8a17742c41e26cf7480e7588280981e13a2a
4
+ data.tar.gz: af9764c3f042f5077a42fe128d26bfc66c3e72ddc4c16862e7cd82d17b05ae36
5
5
  SHA512:
6
- metadata.gz: a0b6b3fafe539206ffcd4f2e327a70d3ce3e87bb30b5dae8555714994c5b1076f872f82e6a0c8c9974d0fc9f8a3dacba1a7f67b18abe2b875425aac6d6af2150
7
- data.tar.gz: b738ecc838ef10eb6c51cc0d50bd744bc6ac152ac6acdedbfe4de29557adbe20f73f404d7aa5076d90d4328e53ee3e7888f34e7eeb9a6c81a54081cc97dd1642
6
+ metadata.gz: 3810d7eda3ede60ad474cf7a508d1a77d4fdab666d5c8118c57e456780c5c019d1c31a9da038a3599dcd69512ddbb07e8f25b5d9f8cdb3b2d6ddc31c5c6a0974
7
+ data.tar.gz: 12ed3945a27aa4758570be414debdd8400212570803ae62c7eeaa70088e1944be025eb23451e63736701a5f2bfd06edb842e1e425f14e541600bc56aeb058b9c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aws_sns_manager (0.0.4)
4
+ aws_sns_manager (0.0.5)
5
5
  aws-sdk-sns (~> 1)
6
6
  json (~> 2)
7
7
  oga (~> 3)
@@ -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 = AwsSnsManager::VERSION
20
- s.version = "#{s.version}-alpha-#{ENV['TRAVIS_BUILD_NUMBER']}" if ENV['TRAVIS']
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
- return dev_json(data) if env == :dev
46
- prod_json(data)
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: { data: data }.to_json }
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.5.pre.alpha.pre.68
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: 2022-11-22 00:00:00.000000000 Z
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.0.8
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: []