pushbots 0.5.0 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/pushbots/all.rb +3 -1
- data/lib/pushbots/device.rb +2 -2
- data/lib/pushbots/push.rb +2 -2
- data/lib/pushbots/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5980368f58bcb8c298543f9ce4cee01cffc2fc6
|
4
|
+
data.tar.gz: 4146dcd8de2f1f5f83eaa0a59711633cc0e968d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66ff9c0d2de4cb29ad4f325db3304fa9209df16f868c76685ad2bf0da229ab590ce5173a329d3e8a2d5bf081f88b57ac7e823553b82a25440c342b1bbc053e22
|
7
|
+
data.tar.gz: 1fd2b77dc978b1b423804332005aba1b04f7bbc8cab9031f734868b2c18867cce1da079422ff7c2256f05c0647120eae21075bc7b1688cf4e0f4491b04c9cdaa
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Pushbots
|
2
2
|
|
3
|
-
Ruby Wrapper for
|
3
|
+
Ruby Wrapper for Pushbots Rest API made with love by Kandiie
|
4
4
|
|
5
|
-
|
5
|
+
Pushbots is a Light SDK for mobile push notifications and now you can use
|
6
6
|
this gem on your favorite Ruby on Rails Projects.
|
7
7
|
|
8
8
|
## Table of Contents
|
@@ -115,7 +115,7 @@ message = 'Hello World!!!'
|
|
115
115
|
# Build up the notification
|
116
116
|
# platform, message, token and sound (required parameters).
|
117
117
|
# options (custom fields) (optional parameter)
|
118
|
-
push =
|
118
|
+
push = Pushbots::One.new(platform, token, message, sound, options)
|
119
119
|
push.send # Delivers the notification
|
120
120
|
```
|
121
121
|
|
@@ -131,7 +131,7 @@ schedule = DateTime.now
|
|
131
131
|
# Build up the notification
|
132
132
|
# platform, message, schedule (required parameters).
|
133
133
|
# options (custom fields) (optional parameter)
|
134
|
-
push =
|
134
|
+
push = Pushbots::All.new(platforms, message, schedule, options = {})
|
135
135
|
push.send # Delivers the notification
|
136
136
|
```
|
137
137
|
|
data/lib/pushbots/all.rb
CHANGED
@@ -11,7 +11,7 @@ module Pushbots
|
|
11
11
|
self.sound = options[:sound]
|
12
12
|
self.badge = options[:badge]
|
13
13
|
self.except_tags = options[:except_tags]
|
14
|
-
self.
|
14
|
+
self.device_alias = options[:alias]
|
15
15
|
self.except_alias = options[:except_alias]
|
16
16
|
self.payload = options[:payload]
|
17
17
|
end
|
@@ -30,6 +30,8 @@ module Pushbots
|
|
30
30
|
}
|
31
31
|
data[:tags] if tags
|
32
32
|
data[:badge] if badge
|
33
|
+
data[:alias] if device_alias
|
34
|
+
data[:except_tags] if except_tags
|
33
35
|
data[:payload] if payload
|
34
36
|
data
|
35
37
|
end
|
data/lib/pushbots/device.rb
CHANGED
@@ -2,8 +2,8 @@ module Pushbots
|
|
2
2
|
# Device class
|
3
3
|
class Device
|
4
4
|
attr_accessor :token, :platform, :tags
|
5
|
-
PLATFORM_TYPE = { ios: 0, android: 1 }.freeze
|
6
|
-
PLATFORM_TYPE_R = [:ios, :android].freeze
|
5
|
+
PLATFORM_TYPE = { ios: 0, android: 1, chrome: 2 }.freeze
|
6
|
+
PLATFORM_TYPE_R = [:ios, :android, :chrome].freeze
|
7
7
|
|
8
8
|
def initialize(token, platform = nil)
|
9
9
|
self.token = token
|
data/lib/pushbots/push.rb
CHANGED
@@ -3,8 +3,8 @@ module Pushbots
|
|
3
3
|
# Holds shared data between single and batch push notifications
|
4
4
|
class Push
|
5
5
|
attr_accessor :platform, :message, :status, :response, :type
|
6
|
-
PLATFORM_TYPE = { ios: 0, android: 1 }.freeze
|
7
|
-
PLATFORM_TYPE_R = [:ios, :android].freeze
|
6
|
+
PLATFORM_TYPE = { ios: 0, android: 1, chrome: 2 }.freeze
|
7
|
+
PLATFORM_TYPE_R = [:ios, :android, :chrome].freeze
|
8
8
|
|
9
9
|
STATUS = { created: 'created', delivered: 'delivered',
|
10
10
|
failed: 'failed' }.freeze
|
data/lib/pushbots/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pushbots
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Omana
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-07-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|