pushr-gcm 1.0.0.rc.1 → 1.0.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 -1
- data/lib/pushr-gcm/version.rb +1 -1
- data/lib/pushr/daemon/gcm_support/response_handler.rb +2 -2
- data/spec/lib/pushr/feedback_gcm_spec.rb +5 -4
- 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: 5dd2a46d4a0325ec2971d546f9630eb661a92954
|
4
|
+
data.tar.gz: 8b8a58a24821ed6a9f73e1fba39196910b81911f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba804143ffb8ce78e9ab62f6ad348f20b436b20ea40379be109b7cd822feab3ccc06c37976c0e3c169690311cffa399ef6131dd5a6630e5ea321bbefb7e091b8
|
7
|
+
data.tar.gz: dc44d91122404a656d093770a9858f8213a76d9bd7d5a0a6dfa882a564776d4d9819f53da69ae13b5453c9de74fa7a7a1b488bce4ad895bba71596131244b374
|
data/README.md
CHANGED
@@ -4,4 +4,4 @@
|
|
4
4
|
[](https://codeclimate.com/github/9to5/pushr-gcm)
|
5
5
|
[](https://coveralls.io/r/9to5/pushr-gcm)
|
6
6
|
|
7
|
-
Please see [pushr-core](https://github.com/
|
7
|
+
Please see [pushr-core](https://github.com/9to5/pushr-core) for more information.
|
data/lib/pushr-gcm/version.rb
CHANGED
@@ -18,7 +18,7 @@ module Pushr
|
|
18
18
|
def handle_single(result, registration_id)
|
19
19
|
if result.key?('error')
|
20
20
|
if result['error'] == 'NotRegistered' || result['error'] == 'InvalidRegistration'
|
21
|
-
Pushr::FeedbackGcm.
|
21
|
+
Pushr::FeedbackGcm.create(app: message.app, failed_at: Time.now, device: registration_id, follow_up: 'delete')
|
22
22
|
end
|
23
23
|
|
24
24
|
if result['error'] == 'Unavailable'
|
@@ -35,7 +35,7 @@ module Pushr
|
|
35
35
|
# success, but update device token
|
36
36
|
hsh = { app: message.app, failed_at: Time.now, device: registration_id,
|
37
37
|
follow_up: 'update', update_to: result['registration_id'] }
|
38
|
-
Pushr::FeedbackGcm.
|
38
|
+
Pushr::FeedbackGcm.create(hsh)
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
@@ -17,11 +17,12 @@ describe Pushr::FeedbackGcm do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
describe 'save' do
|
20
|
-
let(:feedback)
|
20
|
+
let!(:feedback) do
|
21
|
+
Pushr::FeedbackGcm.create(app: 'app_name', device: 'ab' * 20, follow_up: 'delete', failed_at: Time.now,
|
22
|
+
update_to: nil)
|
23
|
+
end
|
21
24
|
it 'should save a feedback' do
|
22
|
-
|
23
|
-
feedback2 = Pushr::Feedback.next
|
24
|
-
expect(feedback2.class).to eql(Pushr::FeedbackGcm)
|
25
|
+
expect(Pushr::Feedback.next.class).to eql(Pushr::FeedbackGcm)
|
25
26
|
end
|
26
27
|
end
|
27
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pushr-gcm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Pesman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -238,9 +238,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
238
238
|
version: 1.9.3
|
239
239
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
240
240
|
requirements:
|
241
|
-
- - "
|
241
|
+
- - ">="
|
242
242
|
- !ruby/object:Gem::Version
|
243
|
-
version:
|
243
|
+
version: '0'
|
244
244
|
requirements: []
|
245
245
|
rubyforge_project:
|
246
246
|
rubygems_version: 2.1.11
|