ts_p8push 1.1.1 → 1.1.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
  SHA256:
3
- metadata.gz: cc7e5c00d962713f16f0311086658d77ae9166564b86c2e20f57788c81fb7ef0
4
- data.tar.gz: 0700a0a33f24d259cebec7b0462db717be39fd688cb8595c2b30ce48cba05a53
3
+ metadata.gz: eb6241c6d144d5d9b02eb5db21bc6dc35d6871d1f9021c5fd4e32c452bbb1541
4
+ data.tar.gz: de79a6b99b372c16dffd49c87ac1dd7a4be1a8df5e5eab2aeed7d3836b847586
5
5
  SHA512:
6
- metadata.gz: 838dbcc895fe5dd98c16bd8d87226f7c1b88e3e557172d692192660eff4153ac6abf49b752f1a5009bbc5987682cdb21d311e0862463b4e2c4bdd13e483f2302
7
- data.tar.gz: fb650a5297aa0848de7a21cc7ddbca8d7d0c123aba950f383dd6527d6bc0453e0f5203ccb75c3aca2d6220b785429a9e013c959590968186226feda09087a783
6
+ metadata.gz: 98b8e98e8c684b2ba8f424c0d4f602881ba587c875aefbbb92b87baf5813e01d0782f9a5b6dcf06d9947b0ba91f5f5851c55127d439a36010c14177be657305d
7
+ data.tar.gz: 9cb446dfbd4b5bbe4995ebf14f0ea816160f8adb89ca67a6be46daeeeb7b5ad0226bdd45e6c1159549d9d7a6e1ddc1a1e848fc1c0852f4c099c1b6fbb61daff6
data/lib/p8push/client.rb CHANGED
@@ -45,7 +45,7 @@ module P8push
45
45
 
46
46
  puts payload.inspect
47
47
 
48
- res = client.call(:post, '/3/device/'+token, body: payload.to_json, timeout: @timeout,
48
+ res = client.call(:post, '/3/device/'+token, body: payload.as_json, timeout: @timeout,
49
49
  headers: h)
50
50
  client.close
51
51
  return nil if res.status.to_i == 200
@@ -56,7 +56,7 @@ module P8push
56
56
  json = {}.merge(@custom_data || {}).inject({}) { |h, (k, v)| h[k.to_s] = v; h }
57
57
 
58
58
  json['aps'] ||= {}
59
- json['aps']['alert'] = @alert if @alert
59
+ json['aps']['alert'] = @alert.as_json if @alert
60
60
  json['aps']['badge'] = @badge.to_i rescue 0 if @badge
61
61
  json['aps']['sound'] = @sound if @sound
62
62
  json['aps']['category'] = @category if @category
@@ -1,3 +1,3 @@
1
1
  module P8push
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
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.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Arrow
@@ -89,6 +89,7 @@ files:
89
89
  - "./ts_p8push-1.0.8.gem"
90
90
  - "./ts_p8push-1.0.9.gem"
91
91
  - "./ts_p8push-1.1.0.gem"
92
+ - "./ts_p8push-1.1.1.gem"
92
93
  homepage: https://talhashoaib.me
93
94
  licenses:
94
95
  - MIT