hertz-fcm 1.1.2 → 1.1.3

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: 4e3a88bb1961b0f8323b615f5b9356b0a659c911eab48d637ac1495dc32ae3c5
4
- data.tar.gz: 5c49fde30b3c587b1d9f15018d2b2e53fba90b11eda1e3fe632085b8b5f1e9b3
3
+ metadata.gz: 52def1ed100e79064a6db8b3cd2cd5c833104746d8d2097ad80313132a7087b0
4
+ data.tar.gz: 4a63e2d8481fb9265e66c4a8bf53cbc57f6918222e6cd54466f3fa978a7325e1
5
5
  SHA512:
6
- metadata.gz: d99175755c499b5b78633be13d9e7191fc8b7253a7f130aa87da1759b6dde0fe311f17eae8d16cc62abafd2861c9b82b014947dd30f7267ea9bbf5efb66bf812
7
- data.tar.gz: 208b8ea4591ffcd190c4aa858b87dabe94fbbfdcf44d806d2df9ba0e2e2d8fb069782243c16871686f4474b24cf38925ffc56e1478012e2ca8bef0596fc3501a
6
+ metadata.gz: f62cd812337464958c63cd0162455e5c078073cc963a5b0fa650401774a47afe34567ca762751d8af6a3b563967db682905f76d9cb561cd7dcea817b4c350a8c
7
+ data.tar.gz: 9500b06006b23fdc082b7adf7fcf4eeecba6dbfba8d69d6fbd8a337778da0f2d30e336620f3f5d906d50b3a87880d6db4cf32b2d7d93317de4ac2541365f1596
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hertz-fcm (1.1.1)
4
+ hertz-fcm (1.1.3)
5
5
  firebase_cloud_messenger (>= 0.4.0, < 1)
6
6
  hertz (~> 2.0)
7
7
  rails (>= 4.0.0, < 6)
@@ -66,11 +66,11 @@ GEM
66
66
  diff-lcs (1.3)
67
67
  docile (1.3.1)
68
68
  erubi (1.8.0)
69
- factory_bot (4.11.1)
70
- activesupport (>= 3.0.0)
71
- factory_bot_rails (4.11.1)
72
- factory_bot (~> 4.11.1)
73
- railties (>= 3.0.0)
69
+ factory_bot (5.0.0)
70
+ activesupport (>= 4.2.0)
71
+ factory_bot_rails (5.0.0)
72
+ factory_bot (~> 5.0.0)
73
+ railties (>= 4.2.0)
74
74
  faraday (0.15.4)
75
75
  multipart-post (>= 1.2, < 3)
76
76
  firebase_cloud_messenger (0.4.0)
@@ -40,17 +40,28 @@ class PushNotificationSender
40
40
  .merge!(notification.send(:data)),
41
41
  apns: {
42
42
  payload: {
43
- aps: {
44
- alert: {
45
- title: notification.send(:title),
46
- body: notification.send(:body)
47
- },
48
- sound: notification.send(:sound),
49
- category: notification.send(:click_action)
50
- }
43
+ aps: aps
51
44
  }
52
45
  },
53
46
  token: token
54
47
  }
55
48
  end
49
+
50
+ def aps
51
+ if notification.send(:silent?)
52
+ return {
53
+ category: notification.send(:click_action),
54
+ 'content-available' => 1
55
+ }
56
+ end
57
+
58
+ {
59
+ alert: {
60
+ title: notification.send(:title),
61
+ body: notification.send(:body)
62
+ },
63
+ sound: notification.send(:sound),
64
+ category: notification.send(:click_action)
65
+ }
66
+ end
56
67
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Hertz
4
4
  module Fcm
5
- VERSION = '1.1.2'
5
+ VERSION = '1.1.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hertz-fcm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Petkovic
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-28 00:00:00.000000000 Z
11
+ date: 2019-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: firebase_cloud_messenger
@@ -235,8 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0'
237
237
  requirements: []
238
- rubyforge_project:
239
- rubygems_version: 2.7.6
238
+ rubygems_version: 3.0.2
240
239
  signing_key:
241
240
  specification_version: 4
242
241
  summary: A Hertz courier for sending push notifications with Firebase Cloud Messaging.