lead_zeppelin 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,26 @@
1
+ module LeadZeppelin
2
+ module APNS
3
+ class ErrorResponse
4
+ CODES = {
5
+ 0 => 'No errors encountered',
6
+ 1 => 'Processing error',
7
+ 2 => 'Missing device token',
8
+ 3 => 'Missing topic',
9
+ 4 => 'Missing payload',
10
+ 5 => 'Invalid token size',
11
+ 6 => 'Invalid topic size',
12
+ 7 => 'Invalid payload size',
13
+ 8 => 'Invalid token',
14
+ 255 => 'None (unknown)'
15
+ }
16
+
17
+ attr_reader :code, :identifier, :message, :notification
18
+
19
+ def initialize(packet, notification=nil)
20
+ command, @code, @identifier = packet.unpack 'ccA4'
21
+ @message = CODES[@code]
22
+ @notification = notification
23
+ end
24
+ end
25
+ end
26
+ end
@@ -1,3 +1,3 @@
1
1
  module LeadZeppelin
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lead_zeppelin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -76,6 +76,7 @@ files:
76
76
  - lib/lead_zeppelin/apns.rb
77
77
  - lib/lead_zeppelin/apns/application.rb
78
78
  - lib/lead_zeppelin/apns/client.rb
79
+ - lib/lead_zeppelin/apns/error_response.rb
79
80
  - lib/lead_zeppelin/apns/gateway.rb
80
81
  - lib/lead_zeppelin/apns/logger.rb
81
82
  - lib/lead_zeppelin/apns/notification.rb