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 +4 -4
- data/lib/em-apn/notification.rb +5 -4
- data/lib/em-apn/version.rb +1 -1
- data/spec/em-apn/client_spec.rb +1 -0
- 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: 8fba17d49998c5aecbd434d50494704fcc1d86b7
|
4
|
+
data.tar.gz: b384fa4c6249140b06373ef9be306b3a8a876f36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 486f0691e19a1aeb1ef50d6a8f00e4da5dab2c7b63aaee6d2b93c5bd837e6120964663da20438a595e14ba8a7426a7e3a6ce9ed769953f2229b47b4e194807e5
|
7
|
+
data.tar.gz: cb440a684c11a42be93870defeb395c119f611e3e1b271ffa43f43db3052fd59ffb583983f5dfb7e00b51683b9f7931325caed7b96dad3f8cbe5d9413b268745
|
data/lib/em-apn/notification.rb
CHANGED
@@ -23,7 +23,7 @@ module EventMachine
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def payload
|
26
|
-
MultiJson.encode(@
|
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
|
-
|
35
|
-
|
36
|
-
data_array
|
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!
|
data/lib/em-apn/version.rb
CHANGED
data/spec/em-apn/client_spec.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|