ts_p8push 1.1.0 → 1.1.1

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: 9157428f246ccf247d785321bac8acdda1e80e7669f36ca23c952b89630d82ab
4
- data.tar.gz: 16075c32def63a69fa676cb614326ec50237b5c268955f1b1c6d8e56ae49d063
3
+ metadata.gz: cc7e5c00d962713f16f0311086658d77ae9166564b86c2e20f57788c81fb7ef0
4
+ data.tar.gz: 0700a0a33f24d259cebec7b0462db717be39fd688cb8595c2b30ce48cba05a53
5
5
  SHA512:
6
- metadata.gz: a2e4c7da29520fd8fea6f27ba46005579ca796dfc9a30012e22ed5b8f4a0b56562936826565640dd39ed7976bd2d00cecc851851c0be861a5408818c59f15a1b
7
- data.tar.gz: a655dc32e991d469395c0cff8c398017a1272a6a0f5c5e1be624f1ed09720cc2252700b00ddfd1e7ab746134aae08a2bc96a4b2e6337bf995291338f710049c7
6
+ metadata.gz: 838dbcc895fe5dd98c16bd8d87226f7c1b88e3e557172d692192660eff4153ac6abf49b752f1a5009bbc5987682cdb21d311e0862463b4e2c4bdd13e483f2302
7
+ data.tar.gz: fb650a5297aa0848de7a21cc7ddbca8d7d0c123aba950f383dd6527d6bc0453e0f5203ccb75c3aca2d6220b785429a9e013c959590968186226feda09087a783
data/lib/p8push/client.rb CHANGED
@@ -44,7 +44,7 @@ module P8push
44
44
 
45
45
 
46
46
  puts payload.inspect
47
-
47
+
48
48
  res = client.call(:post, '/3/device/'+token, body: payload.to_json, timeout: @timeout,
49
49
  headers: h)
50
50
  client.close
@@ -29,7 +29,7 @@ module P8push
29
29
  MAXIMUM_PAYLOAD_SIZE = 2048
30
30
 
31
31
  attr_accessor :topic, :token, :alert, :badge, :sound, :category, :content_available, :mutable_content,
32
- :custom_data, :id, :expiry, :priority, :title, :body
32
+ :custom_data, :id, :expiry, :priority
33
33
  attr_reader :sent_at
34
34
  attr_writer :apns_error_code
35
35
 
@@ -39,8 +39,6 @@ module P8push
39
39
  def initialize(options = {})
40
40
  @token = options.delete(:token) || options.delete(:device)
41
41
  @alert = options.delete(:alert)
42
- @title = options.delete(:title)
43
- @body = options.delete(:body)
44
42
  @topic = options.delete(:topic) || ENV['APN_BUNDLE_ID']
45
43
  @badge = options.delete(:badge)
46
44
  @sound = options.delete(:sound)
@@ -58,8 +56,7 @@ module P8push
58
56
  json = {}.merge(@custom_data || {}).inject({}) { |h, (k, v)| h[k.to_s] = v; h }
59
57
 
60
58
  json['aps'] ||= {}
61
- # json['aps']['alert'] = @alert if @alert
62
- json['aps']['alert'] = {'title': @title, 'body': @body}
59
+ json['aps']['alert'] = @alert if @alert
63
60
  json['aps']['badge'] = @badge.to_i rescue 0 if @badge
64
61
  json['aps']['sound'] = @sound if @sound
65
62
  json['aps']['category'] = @category if @category
@@ -1,3 +1,3 @@
1
1
  module P8push
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
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.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Arrow
@@ -88,6 +88,7 @@ files:
88
88
  - "./ts_p8push-1.0.7.gem"
89
89
  - "./ts_p8push-1.0.8.gem"
90
90
  - "./ts_p8push-1.0.9.gem"
91
+ - "./ts_p8push-1.1.0.gem"
91
92
  homepage: https://talhashoaib.me
92
93
  licenses:
93
94
  - MIT