resque-cleaner 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ ## 0.1.1 (2010-12-30)
2
+
3
+ * Fix for ruby 1.9.2
4
+ * Fix a bug on #retried? method
5
+
1
6
  ## 0.1.0 (2010-11-24)
2
7
 
3
8
  * First official release
@@ -133,7 +133,7 @@ module Resque
133
133
  # Returns true if the job has been already retried. Otherwise returns
134
134
  # false.
135
135
  def retried?
136
- self['retried_at'].blank?
136
+ !self['retried_at'].nil?
137
137
  end
138
138
  alias :requeued? :retried?
139
139
 
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/test_helper'
1
+ require File.expand_path(File.dirname(__FILE__) + '/test_helper')
2
2
  require 'time'
3
3
  context "ResqueCleaner" do
4
4
  def create_and_process_jobs(queue,worker,num,date,job,*args)
@@ -137,6 +137,11 @@ context "ResqueCleaner" do
137
137
  # combination 2
138
138
  ret = @cleaner.select {|j| j['payload']['args']==['Jason'] && j.queue?(:jobs2)}
139
139
  assert_equal 13, ret.size
140
+
141
+ # retried?
142
+ requeued = @cleaner.requeue{|j| j["payload"]["args"][0]=="Johnson"}
143
+ ret = @cleaner.select {|j| j.retried?}
144
+ assert_equal 1, ret.size
140
145
  end
141
146
 
142
147
  test "#stats_by_date returns stats grouped by date" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-cleaner
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tatsuya Ono
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-24 00:00:00 +00:00
18
+ date: 2010-12-30 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency