ghazel-em-apn 0.0.3.2 → 0.0.3.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
  SHA1:
3
- metadata.gz: 098d0d6b13af09bc82922cf43ea69135a4cbadf0
4
- data.tar.gz: 8ef261fbfd5df33979545c1d38f3a89e86c346d2
3
+ metadata.gz: 8fba17d49998c5aecbd434d50494704fcc1d86b7
4
+ data.tar.gz: b384fa4c6249140b06373ef9be306b3a8a876f36
5
5
  SHA512:
6
- metadata.gz: a6d03c9a1a3d812c078dea4b17a2bc3df49c8346ea8066c4807453a9ddf9c34feb585527a69227c01ee4a3c2300b84c5f6c1eb83d39b251595782c9b767bfcb4
7
- data.tar.gz: 2bccd5bb54fdf31a785b7c43f7b5ebc39a413cfdcc4e574940b6b9165e6152bd670356434c8fc346183848a5d878e33cb82cd9e37822b2e06e67e979c93288cc
6
+ metadata.gz: 486f0691e19a1aeb1ef50d6a8f00e4da5dab2c7b63aaee6d2b93c5bd837e6120964663da20438a595e14ba8a7426a7e3a6ce9ed769953f2229b47b4e194807e5
7
+ data.tar.gz: cb440a684c11a42be93870defeb395c119f611e3e1b271ffa43f43db3052fd59ffb583983f5dfb7e00b51683b9f7931325caed7b96dad3f8cbe5d9413b268745
@@ -23,7 +23,7 @@ module EventMachine
23
23
  end
24
24
 
25
25
  def payload
26
- MultiJson.encode(@custom.merge(:aps => @aps))
26
+ MultiJson.encode({aps: @aps}.merge(@custom))
27
27
  end
28
28
 
29
29
  # Documentation about this format is here:
@@ -31,9 +31,10 @@ module EventMachine
31
31
  def data
32
32
  identifier = @identifier || 0
33
33
  expiry = @expiry || 0
34
- size = [payload].pack("a*").size
35
- data_array = [1, identifier, expiry, 32, token, size, payload]
36
- data_array.pack("cNNnH*na*")
34
+ encoded_payload = payload
35
+ size = encoded_payload.bytesize
36
+ data_array = [1, identifier, expiry, 32, token, size, encoded_payload]
37
+ data_array.pack("cNNnH64na*")
37
38
  end
38
39
 
39
40
  def validate!
@@ -1,5 +1,5 @@
1
1
  module EventMachine
2
2
  module APN
3
- VERSION = "0.0.3.2"
3
+ VERSION = "0.0.3.3"
4
4
  end
5
5
  end
@@ -1,4 +1,5 @@
1
1
  require "spec_helper"
2
+ require 'em-apn'
2
3
 
3
4
  describe EventMachine::APN::Client do
4
5
  def new_client(*args)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ghazel-em-apn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3.2
4
+ version: 0.0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Yeu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-23 00:00:00.000000000 Z
11
+ date: 2014-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine