push_to_sns 0.4.1 → 0.5.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: 35b13e0d6f94b98c1cc5a2b92500ae3c67e9659d
4
- data.tar.gz: 87152bf1149e76634f7c40ca35bae63f00c85b4b
3
+ metadata.gz: f1a8d5ec7628d6dd7b935c81bc55b91e502c4c5a
4
+ data.tar.gz: 81fe3af04feb4345961a45d7347c01b1deba0ec1
5
5
  SHA512:
6
- metadata.gz: 775586983f97ac438ed93f74c32ec10f5680c0bb96c921255a466cd4428a86245188cbc3f83d5f79484f71bd084be1880da843af85287100ef089b8b282f7907
7
- data.tar.gz: ddf03a9b1b3ca6ceac62db943ff753befd9e2d0e52b86c6342fe18ff0f5538f864c1f0eac5c5cd37e6212a37f0e4818ee2b8f9502888542a834df841c29a3eb4
6
+ metadata.gz: 946b9d34f279d6bc9705cf5545e047cfb9f9326d086f3851395f47b77afbafeb9d7d484a0e7b6701f0503718152e77fd41d02e2863bef3ddffd4604d7dbdf72e
7
+ data.tar.gz: d57644ae831d984f4ddc2f3d3a6d1ddc6c57db58401d72952a766d6b7b7c3ba720e79f26391d0c9b39059a07c326894af0b46fd76ac5e62f70cce19c248e4725
@@ -12,6 +12,7 @@ module PushToSNS
12
12
  basic_payload[:message] = payload[:message] if payload[:message]
13
13
  basic_payload[:smallIcon] = payload[:small_icon] if payload[:small_icon]
14
14
  basic_payload[:sound] = payload[:sound] if payload[:sound]
15
+ basic_payload[:image] = payload[:image] if payload[:image]
15
16
 
16
17
  basic_payload
17
18
  end
@@ -15,6 +15,7 @@ module PushToSNS
15
15
  basic_payload[:alert] = payload[:message] if payload[:message]
16
16
  basic_payload[:badge] = payload[:badge] if payload[:badge]
17
17
  basic_payload[:sound] = payload[:sound] if payload[:sound]
18
+ basic_payload[:image] = payload[:image] if payload[:image]
18
19
  basic_payload
19
20
  end
20
21
 
@@ -33,7 +33,8 @@ module PushToSNS
33
33
  badge: call_or_read(badge, device),
34
34
  sound: call_or_read(sound, device),
35
35
  small_icon: call_or_read(small_icon, device),
36
- title: call_or_read(title, device)
36
+ title: call_or_read(title, device),
37
+ image: call_or_read(image, device)
37
38
  }.reject { |key, value| value.nil? }
38
39
  defaults.merge(notification(device))
39
40
  end
@@ -58,6 +59,10 @@ module PushToSNS
58
59
  @title ||= self.class.title
59
60
  end
60
61
 
62
+ def image
63
+ @image ||= self.class.image
64
+ end
65
+
61
66
  def small_icon
62
67
  @small_icon ||= self.class.small_icon
63
68
  end
@@ -73,7 +78,7 @@ module PushToSNS
73
78
  end
74
79
 
75
80
  class << self
76
- [:type, :message, :badge, :sound, :title, :small_icon].each do |method_name|
81
+ [:type, :message, :badge, :sound, :title, :small_icon, :image].each do |method_name|
77
82
  property_name = "input_#{method_name}".to_sym
78
83
  attr_accessor property_name
79
84
 
@@ -1,3 +1,3 @@
1
1
  module PushToSNS
2
- VERSION = "0.4.1"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: push_to_sns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - juliogarciag
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-18 00:00:00.000000000 Z
11
+ date: 2015-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler