pushbots 0.5.0 → 0.5.2

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
  SHA1:
3
- metadata.gz: 9a70f662bdddb8da1d0eeae97de09d2db4632f4a
4
- data.tar.gz: 0f0048266baac821779b8afa47f50adb88ccf4e5
3
+ metadata.gz: e5980368f58bcb8c298543f9ce4cee01cffc2fc6
4
+ data.tar.gz: 4146dcd8de2f1f5f83eaa0a59711633cc0e968d1
5
5
  SHA512:
6
- metadata.gz: acd6f809ab13f15929229deb0d4ef8d0b2f1f4cdf030dc87e818fdc067addd5c8124e4cb81b0593e0a709ac439f29c3708da50b7065fa5cc5480c76bad442349
7
- data.tar.gz: 1b22944ba80950c5e1d3c03a2aac5df6487b6f87fb3ad3d2b408bd27c3a390d493144fc274cc5d2cdd3ae3adb411dfd0d6e174583693063d2bc3c7876b91c7c3
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 PushBots Rest API made with love by Kandiie
3
+ Ruby Wrapper for Pushbots Rest API made with love by Kandiie
4
4
 
5
- PushBots is a Light SDK for mobile push notifications and now you can use
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 = PushBots::One.new(platform, token, message, sound, options)
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 = PushBots::All.new(platforms, message, schedule, options = {})
134
+ push = Pushbots::All.new(platforms, message, schedule, options = {})
135
135
  push.send # Delivers the notification
136
136
  ```
137
137
 
@@ -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.alias = options[:alias]
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
@@ -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
@@ -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
@@ -1,4 +1,4 @@
1
1
  # Pushbots gem version
2
2
  module Pushbots
3
- VERSION = '0.5.0'.freeze
3
+ VERSION = '0.5.2'.freeze
4
4
  end
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.0
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-03-21 00:00:00.000000000 Z
12
+ date: 2016-07-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler