push_to_sns 0.5.0 → 0.6.0

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
  SHA1:
3
- metadata.gz: f1a8d5ec7628d6dd7b935c81bc55b91e502c4c5a
4
- data.tar.gz: 81fe3af04feb4345961a45d7347c01b1deba0ec1
3
+ metadata.gz: fd68d6529eb56ca17a307939358f7ee77af6b5e5
4
+ data.tar.gz: a2bf968915bd995e579df7f967d0e54b1532e12f
5
5
  SHA512:
6
- metadata.gz: 946b9d34f279d6bc9705cf5545e047cfb9f9326d086f3851395f47b77afbafeb9d7d484a0e7b6701f0503718152e77fd41d02e2863bef3ddffd4604d7dbdf72e
7
- data.tar.gz: d57644ae831d984f4ddc2f3d3a6d1ddc6c57db58401d72952a766d6b7b7c3ba720e79f26391d0c9b39059a07c326894af0b46fd76ac5e62f70cce19c248e4725
6
+ metadata.gz: 535d6f1ec7cae02b9237ee0d18c6dcf967ef6de9cc203817d963ffc6cd368ee71e8fa2b7adfa932142194c4e9f93694762caadaa574476493ad9e39bf12c2822
7
+ data.tar.gz: 98b57a59333784e801ccd82f9cde55f6362fe4165fec03be5df66b5eeffdd0325eb5510e5699bedf22838a2b8d09b53d99282b2ebbaa68341123d8c3ad04f448
@@ -13,6 +13,7 @@ module PushToSNS
13
13
  basic_payload[:smallIcon] = payload[:small_icon] if payload[:small_icon]
14
14
  basic_payload[:sound] = payload[:sound] if payload[:sound]
15
15
  basic_payload[:image] = payload[:image] if payload[:image]
16
+ basic_payload[:notId] = payload[:notification_id] if payload[:notification_id]
16
17
 
17
18
  basic_payload
18
19
  end
@@ -34,7 +34,8 @@ module PushToSNS
34
34
  sound: call_or_read(sound, device),
35
35
  small_icon: call_or_read(small_icon, device),
36
36
  title: call_or_read(title, device),
37
- image: call_or_read(image, device)
37
+ image: call_or_read(image, device),
38
+ notId: call_or_read(notification_id, device)
38
39
  }.reject { |key, value| value.nil? }
39
40
  defaults.merge(notification(device))
40
41
  end
@@ -63,6 +64,10 @@ module PushToSNS
63
64
  @image ||= self.class.image
64
65
  end
65
66
 
67
+ def notification_id
68
+ @notification_id ||= self.class.notification_id
69
+ end
70
+
66
71
  def small_icon
67
72
  @small_icon ||= self.class.small_icon
68
73
  end
@@ -78,7 +83,7 @@ module PushToSNS
78
83
  end
79
84
 
80
85
  class << self
81
- [:type, :message, :badge, :sound, :title, :small_icon, :image].each do |method_name|
86
+ [:type, :message, :badge, :sound, :title, :small_icon, :image, :notification_id].each do |method_name|
82
87
  property_name = "input_#{method_name}".to_sym
83
88
  attr_accessor property_name
84
89
 
@@ -1,3 +1,3 @@
1
1
  module PushToSNS
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: push_to_sns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - juliogarciag