notifiable-apns-grocer 0.3.0 → 0.4.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 +1 -27
- data/lib/notifiable/apns/grocer/stream.rb +13 -1
- data/lib/notifiable/apns/grocer/version.rb +1 -1
- data/notifiable-apns-grocer.gemspec +1 -1
- data/spec/grocer_spec.rb +4 -2
- data/spec/support/db/migrate/20131229104039_create_notifiable_notification_statuses.rb +11 -0
- metadata +6 -6
- data/spec/support/db/migrate/20131229104039_create_notifiable_notification_device_tokens.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e19c4bbf5e02e47e354324afec0cc1be9f232c6
|
4
|
+
data.tar.gz: 18fdffde5e1c152d027b5ab11f6c5d8319426e38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d723b14a9077b39abba03a1635f9dac35a6596701c56ec12301fc35e920c8f6c986aefed38d5576aa0b0dbafd6ea0e8bdbe280342a8ba942ce7f772da64f3dd0
|
7
|
+
data.tar.gz: fcf5884e59438232282cdeda0eb6ec37524942561bf5d229f9edf996bb932f81afd41230463a43b61cc0e5e8d0f4765ce659389c391c22c78c05c5423678d183
|
data/README.md
CHANGED
@@ -1,29 +1,3 @@
|
|
1
1
|
# Notifiable::Apns::Grocer
|
2
2
|
|
3
|
-
|
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
|
3
|
+
Please refer to the [notifiable-rails](https://github.com/FutureWorkshops/notifiable-rails) Readme for further information.
|
@@ -24,8 +24,20 @@ module Notifiable
|
|
24
24
|
)
|
25
25
|
|
26
26
|
grocer_pusher.push(grocer_notification) unless Notifiable.delivery_method == :test
|
27
|
+
|
28
|
+
# TODO - add errors via enhanced interface
|
29
|
+
#0 - No errors encountered
|
30
|
+
#1 - Processing error
|
31
|
+
#2 - Missing device token
|
32
|
+
#3 - Missing topic
|
33
|
+
#4 - Missing payload
|
34
|
+
#5 - Invalid token size
|
35
|
+
#6 - Invalid topic size
|
36
|
+
#7 - Invalid payload size
|
37
|
+
#8 - Invalid token
|
38
|
+
#255 - None (unknown)
|
27
39
|
|
28
|
-
processed(notification, device_token)
|
40
|
+
processed(notification, device_token, 0)
|
29
41
|
end
|
30
42
|
|
31
43
|
def flush
|
@@ -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.6.0"
|
22
22
|
spec.add_dependency "grocer"
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.3"
|
data/spec/grocer_spec.rb
CHANGED
@@ -22,7 +22,8 @@ describe Notifiable::Apns::Grocer::Stream do
|
|
22
22
|
Notifiable.batch do |b|
|
23
23
|
b.add(n, u)
|
24
24
|
end
|
25
|
-
Notifiable::
|
25
|
+
Notifiable::NotificationStatus.count.should == 1
|
26
|
+
Notifiable::NotificationStatus.first.status.should == 0
|
26
27
|
|
27
28
|
Timeout.timeout(2) {
|
28
29
|
notification = @grocer.notifications.pop
|
@@ -36,7 +37,8 @@ describe Notifiable::Apns::Grocer::Stream do
|
|
36
37
|
Notifiable.batch do |b|
|
37
38
|
b.add(n, u)
|
38
39
|
end
|
39
|
-
Notifiable::
|
40
|
+
Notifiable::NotificationStatus.count.should == 1
|
41
|
+
Notifiable::NotificationStatus.first.status.should == 0
|
40
42
|
|
41
43
|
Timeout.timeout(2) {
|
42
44
|
notification = @grocer.notifications.pop
|
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.4.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-13 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.6.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.6.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: grocer
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -176,7 +176,7 @@ files:
|
|
176
176
|
- spec/spec_helper.rb
|
177
177
|
- spec/support/db/migrate/20131228225139_create_notifiable_device_tokens.rb
|
178
178
|
- spec/support/db/migrate/20131228225140_create_notifiable_notifications.rb
|
179
|
-
- spec/support/db/migrate/
|
179
|
+
- spec/support/db/migrate/20131229104039_create_notifiable_notification_statuses.rb
|
180
180
|
homepage: http://www.futureworkshops.com
|
181
181
|
licenses:
|
182
182
|
- Apache 2.0
|
@@ -206,4 +206,4 @@ test_files:
|
|
206
206
|
- spec/spec_helper.rb
|
207
207
|
- spec/support/db/migrate/20131228225139_create_notifiable_device_tokens.rb
|
208
208
|
- spec/support/db/migrate/20131228225140_create_notifiable_notifications.rb
|
209
|
-
- spec/support/db/migrate/
|
209
|
+
- spec/support/db/migrate/20131229104039_create_notifiable_notification_statuses.rb
|