notifiable-apns-grocer 0.2.1 → 0.3.0
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 +4 -4
- data/README.md +27 -1
- data/lib/notifiable/apns/grocer/stream.rb +2 -2
- data/lib/notifiable/apns/grocer/version.rb +1 -1
- data/notifiable-apns-grocer.gemspec +1 -1
- data/spec/grocer_spec.rb +2 -2
- data/spec/support/db/migrate/20131228225140_create_notifiable_notifications.rb +5 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 271fd66d0979be18ef74de7a71498ce5854c7f04
|
4
|
+
data.tar.gz: 483d6053170fb8b0fbe295982cf16fe4a0fbdb7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6034bc65225803584ac711f02729b95e8fa148ce62d094f41f68e4a376ea23c4c2350767c8b99604462f2a02f4c09ccd8d511c7f395b6ca73e426f366c9644c
|
7
|
+
data.tar.gz: fd078c55737c88056f91bdc5695ba7dff20fe41cf738e34a572fee54cc313b5a04d3382de64cc47d4e0b070058e0f927d9e10ef775a051d8fc0579e32ede8ee0
|
data/README.md
CHANGED
@@ -1,3 +1,29 @@
|
|
1
1
|
# Notifiable::Apns::Grocer
|
2
2
|
|
3
|
-
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'notifiable-apns-grocer'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install notifiable-apns-grocer
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
@@ -19,8 +19,8 @@ module Notifiable
|
|
19
19
|
|
20
20
|
grocer_notification = ::Grocer::Notification.new(
|
21
21
|
device_token: device_token.token,
|
22
|
-
alert: notification.
|
23
|
-
custom: notification.
|
22
|
+
alert: notification.message,
|
23
|
+
custom: notification.params
|
24
24
|
)
|
25
25
|
|
26
26
|
grocer_pusher.push(grocer_notification) unless Notifiable.delivery_method == :test
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "notifiable-rails", ">=0.
|
21
|
+
spec.add_dependency "notifiable-rails", ">=0.5.0"
|
22
22
|
spec.add_dependency "grocer"
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.3"
|
data/spec/grocer_spec.rb
CHANGED
@@ -17,7 +17,7 @@ describe Notifiable::Apns::Grocer::Stream do
|
|
17
17
|
}
|
18
18
|
end
|
19
19
|
|
20
|
-
it "sends a single grocer notification in a batch" do
|
20
|
+
it "sends a single grocer notification in a batch" do
|
21
21
|
|
22
22
|
Notifiable.batch do |b|
|
23
23
|
b.add(n, u)
|
@@ -31,7 +31,7 @@ describe Notifiable::Apns::Grocer::Stream do
|
|
31
31
|
end
|
32
32
|
|
33
33
|
it "supports custom properties" do
|
34
|
-
n.
|
34
|
+
n.params = {:flag => true}
|
35
35
|
|
36
36
|
Notifiable.batch do |b|
|
37
37
|
b.add(n, u)
|
@@ -2,8 +2,12 @@ class CreateNotifiableNotifications < ActiveRecord::Migration
|
|
2
2
|
|
3
3
|
def change
|
4
4
|
create_table :notifiable_notifications do |t|
|
5
|
+
t.text :title
|
5
6
|
t.text :message
|
6
|
-
t.text :
|
7
|
+
t.text :params
|
8
|
+
t.integer :badge
|
9
|
+
t.text :sound
|
10
|
+
t.datetime :expiry
|
7
11
|
t.timestamps
|
8
12
|
end
|
9
13
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notifiable-apns-grocer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kamil Kocemba
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-02-
|
12
|
+
date: 2014-02-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: notifiable-rails
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '>='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.
|
20
|
+
version: 0.5.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '>='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.
|
27
|
+
version: 0.5.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: grocer
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|