resque-scheduler 1.0.6 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 1.8.0 (2010-04-14)
2
+
3
+ * Moving version to match corresponding resque version
4
+ * Sorting schedule on Scheduler tab
5
+ * Adding tests for resque-web (gravis)
6
+
1
7
  ## 1.0.5 (2010-03-01)
2
8
 
3
9
  * Fixed support for overriding queue from schedule config.
data/Rakefile CHANGED
@@ -36,10 +36,11 @@ begin
36
36
  gemspec.authors = ["Ben VandenBos"]
37
37
  gemspec.version = ResqueScheduler::Version
38
38
 
39
- gemspec.add_dependency "resque", ">= 1.5.0"
39
+ gemspec.add_dependency "resque", ">= 1.8.0"
40
40
  gemspec.add_dependency "rufus-scheduler"
41
41
  gemspec.add_development_dependency "jeweler"
42
42
  gemspec.add_development_dependency "mocha"
43
+ gemspec.add_development_dependency "rack-test"
43
44
  end
44
45
  end
45
46
 
@@ -15,7 +15,8 @@
15
15
  <th>Queue</th>
16
16
  <th>Arguments</th>
17
17
  </tr>
18
- <% Resque.schedule.each do |name, config| %>
18
+ <% Resque.schedule.keys.sort.each do |name| %>
19
+ <% config = Resque.schedule[name] %>
19
20
  <tr>
20
21
  <td>
21
22
  <form action="<%= url "/schedule/requeue" %>" method="post">
@@ -1,3 +1,3 @@
1
1
  module ResqueScheduler
2
- Version = '1.0.6'
2
+ Version = '1.8.0'
3
3
  end
@@ -0,0 +1,16 @@
1
+ require File.dirname(__FILE__) + '/test_helper'
2
+
3
+ # Pull in the server test_helper from resque
4
+ require 'resque/server/test_helper.rb'
5
+
6
+ context "on GET to /schedule" do
7
+ setup { get "/schedule" }
8
+
9
+ should_respond_with_success
10
+ end
11
+
12
+ context "on GET to /delayed" do
13
+ setup { get "/delayed" }
14
+
15
+ should_respond_with_success
16
+ end
data/test/test_helper.rb CHANGED
@@ -48,7 +48,25 @@ puts "Starting redis for testing at localhost:9736..."
48
48
  `redis-server #{dir}/redis-test.conf`
49
49
  Resque.redis = 'localhost:9736'
50
50
 
51
-
51
+ ##
52
+ # test/spec/mini 3
53
+ # http://gist.github.com/25455
54
+ # chris@ozmm.org
55
+ #
56
+ def context(*args, &block)
57
+ return super unless (name = args.first) && block
58
+ require 'test/unit'
59
+ klass = Class.new(defined?(ActiveSupport::TestCase) ? ActiveSupport::TestCase : Test::Unit::TestCase) do
60
+ def self.test(name, &block)
61
+ define_method("test_#{name.gsub(/\W/,'_')}", &block) if block
62
+ end
63
+ def self.xtest(*args) end
64
+ def self.setup(&block) define_method(:setup, &block) end
65
+ def self.teardown(&block) define_method(:teardown, &block) end
66
+ end
67
+ (class << klass; self end).send(:define_method, :name) { name.gsub(/\W/,'_') }
68
+ klass.class_eval &block
69
+ end
52
70
 
53
71
  class SomeJob
54
72
  def self.perform(repo_id, path)
@@ -57,4 +75,4 @@ end
57
75
 
58
76
  class SomeIvarJob < SomeJob
59
77
  @queue = :ivar
60
- end
78
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben VandenBos
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-04-07 00:00:00 -07:00
12
+ date: 2010-04-14 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 1.5.0
23
+ version: 1.8.0
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rufus-scheduler
@@ -52,6 +52,16 @@ dependencies:
52
52
  - !ruby/object:Gem::Version
53
53
  version: "0"
54
54
  version:
55
+ - !ruby/object:Gem::Dependency
56
+ name: rack-test
57
+ type: :development
58
+ version_requirement:
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: "0"
64
+ version:
55
65
  description: |-
56
66
  Light weight job scheduling on top of Resque.
57
67
  Adds methods enqueue_at/enqueue_in to schedule jobs in the future.
@@ -81,6 +91,7 @@ files:
81
91
  - tasks/resque_scheduler.rake
82
92
  - test/delayed_queue_test.rb
83
93
  - test/redis-test.conf
94
+ - test/resque-web_test.rb
84
95
  - test/scheduler_test.rb
85
96
  - test/test_helper.rb
86
97
  has_rdoc: true
@@ -113,5 +124,6 @@ specification_version: 3
113
124
  summary: Light weight job scheduling on top of Resque
114
125
  test_files:
115
126
  - test/delayed_queue_test.rb
127
+ - test/resque-web_test.rb
116
128
  - test/scheduler_test.rb
117
129
  - test/test_helper.rb