mercurius 0.1.3 → 0.1.4

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: 770cfa0ddc12836b9e92eaec376949918e6b3f45
4
- data.tar.gz: 4f21ff49852f315976929e4909eb0a38e73f66e1
3
+ metadata.gz: a54e5187f1735963b3bb20d693ac7727b615eebf
4
+ data.tar.gz: 1ea72290aa7391f2514078ceb940779180b25b2e
5
5
  SHA512:
6
- metadata.gz: 9445e87cc176641987a28ca5beae772b235a0ea24ce352cac2bdb18a371fab1f95858784f627c1a21658365c4b0fce04d221d503d48c03523cf33b2d87b3a8f1
7
- data.tar.gz: b7ad5f7db52bf7bda6bc405a5c2334d60bc4d94ff7ef954e1bbf23bc03e857d8f9fc80dd86c6170a56551d6e3b867c014ae07b81814d3fd9d533ad6ab6d3133c
6
+ metadata.gz: 1353ad68cbbebaf2fd1465a7def0ae3398f15e333f9b32acf8c875294129f035ba1fcdfe4c1c96c5572f6d2cfe112d3fb581254edfc7cc7fa60a3a2295afb759
7
+ data.tar.gz: fe321d6a12ab874e635dcd8d7384fd5d353836cb07abb2e2fa54a48a0aa3675152152d63f9110c883f64486dc4dbede7c5213683673113925e2f3334ad43e85e
@@ -4,7 +4,7 @@ module APNS
4
4
 
5
5
  MAX_PAYLOAD_BYTES = 2048
6
6
 
7
- attr_accessor :alert, :badge, :sound, :other
7
+ attr_accessor :alert, :badge, :sound, :other, :content_available
8
8
  attr_reader :attributes
9
9
 
10
10
  def initialize(attributes = {})
@@ -14,10 +14,11 @@ module APNS
14
14
 
15
15
  def payload
16
16
  {
17
- alert: alert,
18
- badge: badge,
19
- sound: sound,
20
- other: other
17
+ 'alert' => alert,
18
+ 'badge' => badge,
19
+ 'sound' => sound,
20
+ 'other' => other,
21
+ 'content-available' => content_available,
21
22
  }.compact
22
23
  end
23
24
 
@@ -1,3 +1,3 @@
1
1
  module Mercurius
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
@@ -2,14 +2,14 @@ describe APNS::Notification do
2
2
 
3
3
  describe '#==' do
4
4
  it 'doesnt care about object equality' do
5
- a = APNS::Notification.new(alert: '1', badge: 1, other: { a: :b }, sound: 'default')
6
- b = APNS::Notification.new(alert: '1', badge: 1, other: { a: :b }, sound: 'default')
5
+ a = APNS::Notification.new(alert: '1', badge: 1, other: { a: :b }, sound: 'default', content_available: 0)
6
+ b = APNS::Notification.new(alert: '1', badge: 1, other: { a: :b }, sound: 'default', content_available: 0)
7
7
  expect(a == b).to eq true
8
8
  end
9
9
 
10
- %w(alert badge other sound).each do |attr|
10
+ %w(alert badge other sound content_available).each do |attr|
11
11
  it "must match #{attr} to be considered equal" do
12
- attributes = { alert: '1', badge: 1, other: { a: :b }, sound: 'default' }
12
+ attributes = { alert: '1', badge: 1, other: { a: :b }, sound: 'default', content_available: 0 }
13
13
  a = APNS::Notification.new(attributes)
14
14
  b = APNS::Notification.new(attributes.merge(attr => SecureRandom.hex))
15
15
  expect(a == b).to eq false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mercurius
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Beck
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-20 00:00:00.000000000 Z
11
+ date: 2015-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json