ghazel-em-apn 0.0.3.1 → 0.0.3.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: d304846e4e9cb3d8b7da79ef8a0e721dfb3a3ba0
4
- data.tar.gz: bb079ada2ab1b5a9a1234a0ea698ba889c2bedfb
3
+ metadata.gz: 098d0d6b13af09bc82922cf43ea69135a4cbadf0
4
+ data.tar.gz: 8ef261fbfd5df33979545c1d38f3a89e86c346d2
5
5
  SHA512:
6
- metadata.gz: cbdc74902f15c6f187fb0cb2a2ce9aba4954f4a20d42df0950636a45fc52a0b58c918a2d2a98dff32467f84c0aec41cba171f67617cb89fe02b8d5d9e116c238
7
- data.tar.gz: 8670311ae9a6c723bdb82471c6b1651fcd89f439b9a2dbe1a1f915f0c3715be6295496748d8cdb6642b1e5044fa37faee2d19011fa3e74c49f44faa80dc18d5c
6
+ metadata.gz: a6d03c9a1a3d812c078dea4b17a2bc3df49c8346ea8066c4807453a9ddf9c34feb585527a69227c01ee4a3c2300b84c5f6c1eb83d39b251595782c9b767bfcb4
7
+ data.tar.gz: 2bccd5bb54fdf31a785b7c43f7b5ebc39a413cfdcc4e574940b6b9165e6152bd670356434c8fc346183848a5d878e33cb82cd9e37822b2e06e67e979c93288cc
@@ -14,6 +14,7 @@ module EventMachine
14
14
  end
15
15
 
16
16
  def post_init
17
+ @buf = ''
17
18
  start_tls(
18
19
  :private_key_file => client.key,
19
20
  :cert_chain_file => client.cert,
@@ -26,11 +27,14 @@ module EventMachine
26
27
  end
27
28
 
28
29
  def receive_data(data)
29
- attempt = FailedDeliveryAttempt.new(data)
30
- EM::APN.logger.warn(attempt.to_s)
30
+ @buf << data
31
+ while @buf.size >= 38
32
+ attempt = FailedDeliveryAttempt.new(@buf.slice!(0,38))
33
+ EM::APN.logger.warn(attempt.to_s)
31
34
 
32
- if client.feedback_callback
33
- client.feedback_callback.call(attempt)
35
+ if client.feedback_callback
36
+ client.feedback_callback.call(attempt)
37
+ end
34
38
  end
35
39
  end
36
40
 
@@ -1,5 +1,5 @@
1
1
  module EventMachine
2
2
  module APN
3
- VERSION = "0.0.3.1"
3
+ VERSION = "0.0.3.2"
4
4
  end
5
5
  end
@@ -232,6 +232,7 @@ describe EventMachine::APN::Client do
232
232
  client = EM::APN::Client.new
233
233
  client.connect_feedback
234
234
  client.on_feedback { |data | failed_attempt = data }
235
+ client.feedback_connection.receive_data(tuple.slice!(0,10))
235
236
  client.feedback_connection.receive_data(tuple)
236
237
  end
237
238
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ghazel-em-apn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3.1
4
+ version: 0.0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Yeu