cloud_five_push 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjdjMmQzNTFhNjFhNTI0MWM3NTQyNTU4Mzg3MGVlYjcwMTEzYTQ5Yw==
4
+ N2Y1NjJkYjA0ZDgzOThkNzk5MzNlY2VkNDk3YmU4NWFkOTcyODZlZQ==
5
5
  data.tar.gz: !binary |-
6
- MDQ2NmExZWRjNDZiZWVkYjg0YjMxN2YxYjIzODMyZjI4OTc1MjgzZQ==
6
+ Y2NlMDc5OTFiNjA4ODhkZjk4ODhiZWQ4OGI0NTg2NDBjYmQ4M2ExYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmRkYTJjMTIwNTY5ZDBhOTE4YjAzODYwOWM1MjkyNWYzZjY2OGIyMWU3YzMw
10
- MTk1NDc2ZTdmN2E3ODRjYjQ5YjhiNWY0MGI5YzlmOWRiYTBkODZlYzFkZTg1
11
- MjZhOTY4YzllMDQzNmJkOTBmZjliNGYyMTgwM2NlOGE0YTEyMzk=
9
+ NGQ1Y2Q2NzJjMzU5OTUxYTUzNTgyZjA1OWU5NjFiMTE2MjA0YTg5ZmE2ODRj
10
+ Nzg1NDkzZmIyZDdkN2I4MWEyNjExOGYzZTEyMDBhYzczMWNiOTA4YWIyMGZh
11
+ ZWQ4NzI1MzRmMjM5MTc0NDQzN2Y1YjlkZWUyYTZlMGMwZDFkZDE=
12
12
  data.tar.gz: !binary |-
13
- ZjE4M2MzMGRkNjUyMGQwNDYxMjIwMDNiOTE1ZmIzOTVmMTVmMTM5ZDM4OTZh
14
- ODVmYjU3NGM3ZjkzOGQxNDM2ZGRkMjU0NjM1OTFmNTA5ZmQ0NTU2OGI2NTEx
15
- OWNjYWViZmJiMmRlNTM0NzAxMGYyNmNkNzZjZTFhNmEwZGZiNGE=
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 )
@@ -23,4 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "rspec"
24
24
 
25
25
  spec.add_dependency "httparty"
26
+ spec.add_dependency "json"
26
27
  end
@@ -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"
@@ -1,3 +1,3 @@
1
1
  module CloudFivePush
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
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.3
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-07-30 00:00:00.000000000 Z
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