notifiable-apns-grocer 0.15.1 → 0.15.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/notifiable/apns/grocer/stream.rb +1 -1
- data/lib/notifiable/apns/grocer/version.rb +1 -1
- data/spec/stream_spec.rb +4 -4
- 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: 30d48e8f30aa6282220f97dfdfa644c3c842d2da
|
4
|
+
data.tar.gz: c867dafb4b9481fbb78ab61b682eab5a748cafdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a565c57625f0b2f548905d917a23f5df7d928ef37e9d3a872593b8e9bda5251cc5be3081fa374c39bdb17cc295f67b1ad9d1821c727c892b223bb75a6e3041f
|
7
|
+
data.tar.gz: 078547b7854ed7e50e11b2538dae59595e27740230b7bc075e972ab8c7da7d11c846f4ecdbc8d2634e80c76d4e43424114e7ba4818b9a744d8ac2a5d7c325086
|
@@ -88,7 +88,7 @@ module Notifiable
|
|
88
88
|
payload = {device_token: device.token, custom: notification.send_params, alert: {}}
|
89
89
|
payload[:alert][:title] = notification.title if notification.title
|
90
90
|
payload[:alert][:body] = notification.message if notification.message
|
91
|
-
payload[:sound] = notification.sound
|
91
|
+
payload[:sound] = notification.sound || 'default'
|
92
92
|
payload[:badge] = notification.badge_count if notification.badge_count
|
93
93
|
payload[:identifier] = notification.identifier if notification.identifier
|
94
94
|
payload[:content_available] = notification.content_available if notification.content_available
|
data/spec/stream_spec.rb
CHANGED
@@ -17,18 +17,18 @@ describe Notifiable::Apns::Grocer::Stream do
|
|
17
17
|
|
18
18
|
context "message" do
|
19
19
|
let(:n1) { Notifiable::Notification.create! app: a1, message: "New deals!" }
|
20
|
-
it { expect(@grocer_payload).to include(alert: {body: "New deals!"}) }
|
21
20
|
it { expect(@grocer_payload).to include(device_token: "abc123") }
|
22
|
-
it { expect(@grocer_payload).
|
21
|
+
it { expect(@grocer_payload[:alert]).to include({body: "New deals!"}) }
|
22
|
+
it { expect(@grocer_payload).to include({sound: 'default'}) }
|
23
23
|
it { expect(@grocer_payload[:custom]).to include(n_id: n1.id) }
|
24
24
|
end
|
25
25
|
|
26
26
|
context "title and message" do
|
27
27
|
let(:n1) { Notifiable::Notification.create! app: a1, title: 'Shopping', message: "New deals!" }
|
28
28
|
it { expect(@grocer_payload[:alert]).to include({title: 'Shopping'}) }
|
29
|
-
it { expect(@grocer_payload[:alert]).to include({body: 'New deals!'}) }
|
29
|
+
it { expect(@grocer_payload[:alert]).to include({body: 'New deals!'}) }
|
30
|
+
it { expect(@grocer_payload).to include({sound: 'default'}) }
|
30
31
|
it { expect(@grocer_payload).to include(device_token: "abc123") }
|
31
|
-
it { expect(@grocer_payload).to_not include(:sound) }
|
32
32
|
it { expect(@grocer_payload[:custom]).to include(n_id: n1.id) }
|
33
33
|
end
|
34
34
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notifiable-apns-grocer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kamil Kocemba
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-04-
|
12
|
+
date: 2018-04-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: notifiable-rails
|