fwt_push_notification_server 0.1.0.b8 → 0.1.0.b9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fwt_push_notification_server/version.rb +1 -1
- data/lib/notifier/apns.rb +6 -2
- 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: 42518a2e7027c0123ce96334cb740ac9f9404af6
|
4
|
+
data.tar.gz: 8dc64ec36256c85f7d0fb5d645bda60326bd0a49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2122598864483d198e471326f76508b8f4dbfc2ff5b41f82b774b5d797326f56adbf30e3c2a8184c9b2e6b8db8aa1d64371fe5858fb3b266f31a368125487bc0
|
7
|
+
data.tar.gz: ae8092dcc213b7aac66bbc869c7cba9b62a5d2e5efc13018253dcec3b3c5a2c9609c079a0c98da16a6ee7aca5175547816f4b270c6310a8d7ad47d2223d5d474
|
data/lib/notifier/apns.rb
CHANGED
@@ -21,11 +21,15 @@ module FwtPushNotificationServer
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
|
24
|
+
feedback_config = {
|
25
|
+
:gateway => config[:gateway].gsub('gateway', 'feedback'),
|
26
|
+
:certificate => config[:certificate]
|
27
|
+
}
|
28
|
+
feedback = Grocer.feedback(feedback_config)
|
25
29
|
feedback.each do |attempt|
|
26
30
|
token = attempt.device_token
|
27
31
|
device_token = DeviceToken.find_by_token(token)
|
28
|
-
device_token.update_attribute("is_valid", false) unless device_token.nil?
|
32
|
+
device_token.update_attribute("is_valid", false) unless device_token.nil? && device.token.update_at < attempt.timestamp
|
29
33
|
puts "APNS: Device #{token} failed at #{attempt.timestamp}"
|
30
34
|
end
|
31
35
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fwt_push_notification_server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.b9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kamil Kocemba
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|