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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c9500acd73c6ee6bd0d744666e9a8711a1cd7455
4
- data.tar.gz: 4906e27524d3a89132a85f456b280e1272b37e64
3
+ metadata.gz: 42518a2e7027c0123ce96334cb740ac9f9404af6
4
+ data.tar.gz: 8dc64ec36256c85f7d0fb5d645bda60326bd0a49
5
5
  SHA512:
6
- metadata.gz: 3d645aa48611067f0df1c1a53f6846a0001d1ea73fd18d4d9e6b384242e9fec119c8a28e4cf4a1284cdeeee212cba214ef315dfcf8c1fd455528d7da59d77cda
7
- data.tar.gz: 661789dcb2824cf10dffbc987193a2fb827220ed94a58d35e6da8811ebc69540dab7bfed9a4f1019f906b2a0c27367b556e8087ff646bcfb8340df44e200e510
6
+ metadata.gz: 2122598864483d198e471326f76508b8f4dbfc2ff5b41f82b774b5d797326f56adbf30e3c2a8184c9b2e6b8db8aa1d64371fe5858fb3b266f31a368125487bc0
7
+ data.tar.gz: ae8092dcc213b7aac66bbc869c7cba9b62a5d2e5efc13018253dcec3b3c5a2c9609c079a0c98da16a6ee7aca5175547816f4b270c6310a8d7ad47d2223d5d474
@@ -1,3 +1,3 @@
1
1
  module FwtPushNotificationServer
2
- VERSION = "0.1.0.b8"
2
+ VERSION = "0.1.0.b9"
3
3
  end
data/lib/notifier/apns.rb CHANGED
@@ -21,11 +21,15 @@ module FwtPushNotificationServer
21
21
  end
22
22
  end
23
23
 
24
- feedback = Grocer.feedback(config)
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.b8
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-10-28 00:00:00.000000000 Z
11
+ date: 2013-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails