fireinc-apn_on_rails 0.4.2.8 → 0.4.2.9
Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{fireinc-apn_on_rails}
|
8
|
-
s.version = "0.4.2.
|
8
|
+
s.version = "0.4.2.9"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["markbates", "Rebecca Nesson", "Caleb Adam Haye"]
|
@@ -48,7 +48,13 @@ class APN::App < APN::Base
|
|
48
48
|
APN::Connection.open_for_delivery({:cert => the_cert}) do |conn, sock|
|
49
49
|
APN::Device.find_each(:conditions => conditions) do |dev|
|
50
50
|
dev.unsent_notifications.each do |noty|
|
51
|
-
|
51
|
+
begin
|
52
|
+
conn.write(noty.message_for_sending)
|
53
|
+
rescue => e
|
54
|
+
Rails.logger.error "Cannot send notification ##{noty.id}: " + e.message
|
55
|
+
return if e.message == "Broken pipe"
|
56
|
+
end
|
57
|
+
|
52
58
|
noty.sent_at = Time.now
|
53
59
|
noty.save
|
54
60
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fireinc-apn_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 117
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
9
|
- 2
|
10
|
-
-
|
11
|
-
version: 0.4.2.
|
10
|
+
- 9
|
11
|
+
version: 0.4.2.9
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- markbates
|