ts_p8push 1.1.5 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c423539e7717bb1e16bff3656d75178920320d8b362b23c2739771ea9bcd5a6
4
- data.tar.gz: ff543ede6be5b447db771d2479b8b572a9f8f3565452ad3c3fc562e0ecdef88d
3
+ metadata.gz: 987a54ec404771c665d609995a166db88d46aae12f90300eac1e8cb0f0dab123
4
+ data.tar.gz: '0196ba5cd63e3ae311c5227740f2878fbf8c4fab644ef9997eb5399a1a17c92e'
5
5
  SHA512:
6
- metadata.gz: 4f15ba649c354fa9e539058d0ed2bf1d1328d98e41507f9895dfe441e6e88d286a47d0d786ce41a1ae03a3c0671bd8225b7a16227b4a708615647c6a98719419
7
- data.tar.gz: 3f54b234b2f55142cf0cc9e33fc94679309ce151c52430b3fa470f6df96d8dd093cd681e48af724bb5e8727be4de647f5ac2976a7028bb4c9d43e6df53591b0d
6
+ metadata.gz: e75167b99cc0841da4347b3d6d5af831cc51f478be876852c53ac1d3270b7114e61c122438ca578cc63c6804e521bf6f403c4bbc4413dd7292fa17c0ca5d868f
7
+ data.tar.gz: 5959fd46f0e5846fa68339be6927dba81a37cbc4075c16297296d5a8f1ec70476352c58bce57ddeda8fc7d1a9ad79ddfdce153c20a4e8b2b74f860013ff26b77
data/lib/p8push/client.rb CHANGED
@@ -46,7 +46,7 @@ module P8push
46
46
  headers: h)
47
47
  client.close
48
48
  return nil if res.status.to_i == 200
49
- res.body
49
+ [res.body, res.status.to_i]
50
50
  end
51
51
 
52
52
  def push(*notifications)
@@ -61,12 +61,12 @@ module P8push
61
61
 
62
62
  notification.id = index
63
63
 
64
- err = jwt_http2_post(notification.topic, notification.payload, notification.token)
64
+ err, status = jwt_http2_post(notification.topic, notification.payload, notification.token)
65
65
  if err == nil
66
66
  notification.mark_as_sent!
67
67
  else
68
68
  puts err
69
- notification.apns_error_code = err
69
+ notification.apns_error_code = status
70
70
  notification.mark_as_unsent!
71
71
  end
72
72
  end
@@ -1,3 +1,3 @@
1
1
  module P8push
2
- VERSION = '1.1.5'
2
+ VERSION = '1.1.6'
3
3
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ts_p8push
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Arrow
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-06-04 00:00:00.000000000 Z
14
+ date: 2021-06-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: jwt
@@ -93,6 +93,7 @@ files:
93
93
  - "./ts_p8push-1.1.2.gem"
94
94
  - "./ts_p8push-1.1.3.gem"
95
95
  - "./ts_p8push-1.1.4.gem"
96
+ - "./ts_p8push-1.1.5.gem"
96
97
  homepage: https://talhashoaib.me
97
98
  licenses:
98
99
  - MIT