fireinc-apn_on_rails 0.4.2.10 → 0.4.2.11

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.10"
8
+ s.version = "0.4.2.11"
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"]
@@ -45,15 +45,15 @@ class APN::App < APN::Base
45
45
  conditions = ["app_id = ?", app_id]
46
46
  end
47
47
  begin
48
- APN::Device.find_each(:conditions => conditions) do |dev|
49
- APN::Connection.open_for_delivery({:cert => the_cert}) do |conn, sock|
48
+ APN::Connection.open_for_delivery({:cert => the_cert}) do |conn, sock|
49
+ APN::Device.find_each(:conditions => conditions) do |dev|
50
50
  dev.unsent_notifications.each do |noty|
51
51
  conn.write(noty.message_for_sending)
52
52
  noty.sent_at = Time.now
53
53
  noty.save
54
54
  end
55
+ sleep(1)
55
56
  end
56
- sleep(1)
57
57
  end
58
58
  rescue Exception => e
59
59
  log_connection_exception(e)
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: 115
4
+ hash: 113
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
9
  - 2
10
- - 10
11
- version: 0.4.2.10
10
+ - 11
11
+ version: 0.4.2.11
12
12
  platform: ruby
13
13
  authors:
14
14
  - markbates