ts_p8push 1.1.4 → 1.1.5

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: 54b02ef4e92b6a3054868dfffd8613e8a0dd97a8b48617dcec455d59f8108c11
4
- data.tar.gz: e9bf28c09bf2eca5bd804a9da891d1432a1def41013527b6a9995367c8ab0bd4
3
+ metadata.gz: 8c423539e7717bb1e16bff3656d75178920320d8b362b23c2739771ea9bcd5a6
4
+ data.tar.gz: ff543ede6be5b447db771d2479b8b572a9f8f3565452ad3c3fc562e0ecdef88d
5
5
  SHA512:
6
- metadata.gz: bb7f937b42df63ba627aaa64d50ea893e7f0e3078e88247af6537a2ba783ae78cd3d693d51462b87f96dfdaca70bbb3f41b7863395748b1496469e3c8ccbbdb2
7
- data.tar.gz: f1c2d45ac5397e0d1bb6ad72293f4ecc4e2eb4e74471b59725bbbc4be9196d8421a73604a72fa3ad1f8aafce3df42bc34615bc51a79d54997087b68be933c1df
6
+ metadata.gz: 4f15ba649c354fa9e539058d0ed2bf1d1328d98e41507f9895dfe441e6e88d286a47d0d786ce41a1ae03a3c0671bd8225b7a16227b4a708615647c6a98719419
7
+ data.tar.gz: 3f54b234b2f55142cf0cc9e33fc94679309ce151c52430b3fa470f6df96d8dd093cd681e48af724bb5e8727be4de647f5ac2976a7028bb4c9d43e6df53591b0d
data/lib/p8push/client.rb CHANGED
@@ -42,9 +42,6 @@ module P8push
42
42
  h['authorization'] = "bearer #{jwt_token}"
43
43
  h['content-type'] = 'application/json'
44
44
 
45
-
46
- puts payload.inspect
47
-
48
45
  res = client.call(:post, '/3/device/'+token, body: payload.to_json, timeout: @timeout,
49
46
  headers: h)
50
47
  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
32
+ :custom_data, :id, :expiry, :priority, :media_url
33
33
  attr_reader :sent_at
34
34
  attr_writer :apns_error_code
35
35
 
@@ -39,6 +39,7 @@ module P8push
39
39
  def initialize(options = {})
40
40
  @token = options.delete(:token) || options.delete(:device)
41
41
  @alert = options.delete(:alert)
42
+ @media_url = options.delete(:media_url)
42
43
  @topic = options.delete(:topic) || ENV['APN_BUNDLE_ID']
43
44
  @badge = options.delete(:badge)
44
45
  @sound = options.delete(:sound)
@@ -62,6 +63,7 @@ module P8push
62
63
  json['aps']['category'] = @category if @category
63
64
  json['aps']['content-available'] = 1 if @content_available
64
65
  json['aps']['mutable-content'] = 1 if @mutable_content
66
+ json['media-url'] = @media_url.present? ? "#{@media_url}" : ""
65
67
 
66
68
  json
67
69
  end
@@ -1,3 +1,3 @@
1
1
  module P8push
2
- VERSION = '1.1.4'
2
+ VERSION = '1.1.5'
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.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Arrow
@@ -92,6 +92,7 @@ files:
92
92
  - "./ts_p8push-1.1.1.gem"
93
93
  - "./ts_p8push-1.1.2.gem"
94
94
  - "./ts_p8push-1.1.3.gem"
95
+ - "./ts_p8push-1.1.4.gem"
95
96
  homepage: https://talhashoaib.me
96
97
  licenses:
97
98
  - MIT