smailer 0.2.12 → 0.2.13

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.
@@ -13,7 +13,14 @@ module Smailer
13
13
  max_lifetime = (Smailer::Models::Property.get('queue.max_lifetime') || 172800).to_i
14
14
 
15
15
  results = []
16
- Smailer::Models::QueuedMail.order(:retries.asc, :id.asc).limit(batch_size).each do |queue_item|
16
+
17
+ items_to_process = if Compatibility.rails_3?
18
+ Smailer::Models::QueuedMail.order(:retries.asc, :id.asc).limit(batch_size)
19
+ else
20
+ Smailer::Models::QueuedMail.all(:order => 'retries ASC, id ASC', :limit => batch_size)
21
+ end
22
+
23
+ items_to_process.each do |queue_item|
17
24
  # try to send the email
18
25
  mail = Mail.new do
19
26
  from queue_item.from
@@ -1,3 +1,3 @@
1
1
  module Smailer
2
- VERSION = "0.2.12"
2
+ VERSION = "0.2.13"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smailer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 12
10
- version: 0.2.12
9
+ - 13
10
+ version: 0.2.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dimitar Dimitrov