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 +4 -4
- data/Gemfile.lock +6 -6
- data/app/services/push_notification_sender.rb +19 -8
- data/lib/hertz/fcm/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52def1ed100e79064a6db8b3cd2cd5c833104746d8d2097ad80313132a7087b0
|
4
|
+
data.tar.gz: 4a63e2d8481fb9265e66c4a8bf53cbc57f6918222e6cd54466f3fa978a7325e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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 (
|
70
|
-
activesupport (>=
|
71
|
-
factory_bot_rails (
|
72
|
-
factory_bot (~>
|
73
|
-
railties (>=
|
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
|
data/lib/hertz/fcm/version.rb
CHANGED
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.
|
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-
|
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
|
-
|
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.
|