cloud_five_push 0.0.3 → 0.0.4
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 +8 -8
- data/README.md +8 -0
- data/cloud_five_push.gemspec +1 -0
- data/lib/cloud_five_push/notification.rb +2 -1
- data/lib/cloud_five_push/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2Y1NjJkYjA0ZDgzOThkNzk5MzNlY2VkNDk3YmU4NWFkOTcyODZlZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2NlMDc5OTFiNjA4ODhkZjk4ODhiZWQ4OGI0NTg2NDBjYmQ4M2ExYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NGQ1Y2Q2NzJjMzU5OTUxYTUzNTgyZjA1OWU5NjFiMTE2MjA0YTg5ZmE2ODRj
|
10
|
+
Nzg1NDkzZmIyZDdkN2I4MWEyNjExOGYzZTEyMDBhYzczMWNiOTA4YWIyMGZh
|
11
|
+
ZWQ4NzI1MzRmMjM5MTc0NDQzN2Y1YjlkZWUyYTZlMGMwZDFkZDE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGQxMGU4MmU0Nzg0ZmExM2EzN2MxNmJlY2ZjZmFjZjY4MWU0YjA0MTUxNWVk
|
14
|
+
MzBmNzRlMzQ2NmNjYTE4YWNiYTFlNDBlNjA5NDRjNjc0YzQwYWMyOWFiZGMx
|
15
|
+
OTAwM2Q3ZGY4YTJlNDc4N2FlMjI2M2JlNjllOGYwMTIyOTZjOTA=
|
data/README.md
CHANGED
@@ -49,6 +49,14 @@ Schedule a notification to be sent in the future:
|
|
49
49
|
notification.scheduled_at = Time.now + 3600
|
50
50
|
notification.notify!
|
51
51
|
|
52
|
+
Send a notification with custom json payload
|
53
|
+
|
54
|
+
notification = CloudFivePush::Notification.new
|
55
|
+
notification.alert = "Check out this foo"
|
56
|
+
notification.user_identifiers = 123
|
57
|
+
notification.data = {foo: "bar", bizz: "buzz"}
|
58
|
+
|
59
|
+
|
52
60
|
## Contributing
|
53
61
|
|
54
62
|
1. Fork it ( http://github.com/cloudfive/pushapi-ruby/fork )
|
data/cloud_five_push.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'httparty'
|
2
2
|
module CloudFivePush
|
3
3
|
class Notification
|
4
|
-
attr_accessor :user_identifiers, :alert, :message, :badge, :scheduled_at, :broadcast, :api_key
|
4
|
+
attr_accessor :user_identifiers, :alert, :message, :badge, :scheduled_at, :broadcast, :api_key, :data
|
5
5
|
|
6
6
|
include HTTParty
|
7
7
|
base_uri 'https://www.cloudfiveapp.com'
|
@@ -35,6 +35,7 @@ module CloudFivePush
|
|
35
35
|
|
36
36
|
params[:message] = @message if @message
|
37
37
|
params[:when] = @scheduled_at.iso8601 if @scheduled_at
|
38
|
+
params[:data] = @data.to_json if @data
|
38
39
|
|
39
40
|
if @broadcast
|
40
41
|
params[:audience] = "broadcast"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloud_five_push
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Samson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ! '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: json
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ! '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
description: Dead simple push notifications
|
70
84
|
email:
|
71
85
|
- brian@tenforwardconsulting.com
|