cloud_five_push 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/lib/cloud_five_push/notification.rb +3 -1
- data/lib/cloud_five_push/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: b1161c77c735f4cf6a5e3d53eb70f8eb9d021857
|
4
|
+
data.tar.gz: fd7cad40ea8caa147295e0014fa49cad09c21929
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4f99ec94334d1950b79fccbe1c5f3cd69feba2c63eaa850be1519c74280c97f28e5671e64e3f8ecbe2214efe3bca54e4818ba3ed7999d614007142bdfb6be93
|
7
|
+
data.tar.gz: ff9a28005772bec85b4f151793bd67c8c74d726576da328d3bdaf5746c2efb82f6da0f59cec355c95c979403c61c2c2ce34c82cf6798030ff28d0f24823bdad2
|
data/README.md
CHANGED
@@ -56,6 +56,8 @@ Send a notification with custom json payload
|
|
56
56
|
notification.user_identifiers = 123
|
57
57
|
notification.data = {foo: "bar", bizz: "buzz"}
|
58
58
|
|
59
|
+
## iOS Specific features
|
60
|
+
|
59
61
|
By default, all iOS notifications will be sent through the production APNs. To use the development service instead:
|
60
62
|
|
61
63
|
# set this globally, good for use in a local development server
|
@@ -66,6 +68,11 @@ By default, all iOS notifications will be sent through the production APNs. To
|
|
66
68
|
notification.alert = "testing, testing, 1 2 3"
|
67
69
|
notification.aps_environment = :development
|
68
70
|
|
71
|
+
You can also set the content-available flag if you have other plugins that rely on it:
|
72
|
+
|
73
|
+
notification = CloudFivePush::Notification.new
|
74
|
+
notification.content_available = 1
|
75
|
+
notification.notify!
|
69
76
|
|
70
77
|
|
71
78
|
## Contributing
|
@@ -1,7 +1,8 @@
|
|
1
1
|
require 'httparty'
|
2
2
|
module CloudFivePush
|
3
3
|
class Notification
|
4
|
-
attr_accessor :user_identifiers, :alert, :message, :badge, :scheduled_at, :broadcast,
|
4
|
+
attr_accessor :user_identifiers, :alert, :message, :badge, :scheduled_at, :broadcast,
|
5
|
+
:api_key, :data, :aps_environment, :content_available
|
5
6
|
|
6
7
|
include HTTParty
|
7
8
|
base_uri 'https://push.cloudfiveapp.com'
|
@@ -52,6 +53,7 @@ module CloudFivePush
|
|
52
53
|
params[:when] = @scheduled_at.iso8601 if @scheduled_at
|
53
54
|
params[:data] = @data.to_json if @data
|
54
55
|
params[:aps_environment] = @aps_environment.to_s if @aps_environment
|
56
|
+
params[:content_available] = @content_available.to_s if @content_available
|
55
57
|
|
56
58
|
if @broadcast
|
57
59
|
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.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Samson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|