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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4fb5b4d4204409750bec9061b05d34c2476cb154
4
- data.tar.gz: b9996430ce446adf4f0c8adf05688392b26da5f0
3
+ metadata.gz: 30d48e8f30aa6282220f97dfdfa644c3c842d2da
4
+ data.tar.gz: c867dafb4b9481fbb78ab61b682eab5a748cafdf
5
5
  SHA512:
6
- metadata.gz: 6fe71cfbdd8bd0169147d3e258504123a5ca74493354c7a51655cb1b873a3ff7cd3b6b4ae82c292cd6471fe2f990b0e0c9093bb78ed1afe18410c746ba5035f8
7
- data.tar.gz: b1d431a6628fa757b0339a7dea16bf6a34823dcbec61c5aa370dd3f01a61d14fe81b04c0dfd49702749b8e1deafb3b5ff3e9f106b6d31e0a115532e2498bfe52
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 if 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
@@ -1,7 +1,7 @@
1
1
  module Notifiable
2
2
  module Apns
3
3
  module Grocer
4
- VERSION = "0.15.1"
4
+ VERSION = "0.15.2"
5
5
  end
6
6
  end
7
7
  end
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).to_not include(:sound) }
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.1
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-13 00:00:00.000000000 Z
12
+ date: 2018-04-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: notifiable-rails