delayed_job_web 1.2.9 → 1.2.10

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of delayed_job_web might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 64765045ff23c2d82edb694c0b43c789d2c1bf53
4
- data.tar.gz: adca16793350ca13765734007509fb4272962ee0
3
+ metadata.gz: dbcba0ad96175e81e6fae7a52cf978605d65e2c6
4
+ data.tar.gz: f3065d7b9dea29396b9f9727c4391e464f4b2737
5
5
  SHA512:
6
- metadata.gz: e3393593ccd0f51136ec99ed5f693961e4dac89435abf58f7d4b72ef364408f0d64cf13587af04ac9d5e561584172cae12f0da22818d36ae090d988b6b8c7968
7
- data.tar.gz: 305ce84cc7e3de232a17d42094b4f6d4221ce6d0ea096ad309f2a42e817ee778a70f15b39ffbc12cbe87bde9f394c14b40c6bbc9d63674f34a66ade6d7c143dd
6
+ metadata.gz: 9dfeb2edec1976930a999cc798de7d00facfce2bb024d10c7e32877f83553ec50fb3c8fbb7b0404e4111f1b3e7a29d722517d33251c15d578c61a30aaea9cdd3
7
+ data.tar.gz: dea580745305488adb0c1dbf9661392f1fbbc00cb0031b0e4c1958db21a713b86418a48ce338aff2b1636bc0302ee9bd95cf7fc5bafb260f36dc6999acde7a28
@@ -50,7 +50,7 @@ if Rails.env.production?
50
50
  end
51
51
  ```
52
52
 
53
- `delayed_job_web` runs as a Sinatra application within the rails application. Visit it at `/delayed_job_web`.
53
+ `delayed_job_web` runs as a Sinatra application within the rails application. Visit it at `/delayed_job`.
54
54
 
55
55
  ## Serving static assets
56
56
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "delayed_job_web"
3
- gem.version = "1.2.9"
3
+ gem.version = "1.2.10"
4
4
  gem.author = "Erick Schmitt"
5
5
  gem.email = "ejschmitt@gmail.com"
6
6
  gem.homepage = "https://github.com/ejschmitt/delayed_job_web"
@@ -115,9 +115,11 @@ class DelayedJobWeb < Sinatra::Base
115
115
  redirect back
116
116
  end
117
117
 
118
- post "/requeue/all" do
119
- delayed_jobs(:failed, @queues).update_all(:run_at => Time.now, :failed_at => nil)
120
- redirect back
118
+ %w(pending failed).each do |page|
119
+ post "/requeue/#{page}" do
120
+ delayed_jobs(page.to_sym, @queues).update_all(:run_at => Time.now, :failed_at => nil)
121
+ redirect back
122
+ end
121
123
  end
122
124
 
123
125
  post "/requeue/:id" do
@@ -4,7 +4,7 @@
4
4
  <%= csrf_token_tag %>
5
5
  <input type="submit" value="Clear Failed Jobs"></input>
6
6
  </form>
7
- <form action="<%= u('requeue/all') %>" method="POST">
7
+ <form action="<%= u('requeue/failed') %>" method="POST">
8
8
  <%= csrf_token_tag %>
9
9
  <input type="submit" value="Retry Failed Jobs"></input>
10
10
  </form>
@@ -1,6 +1,6 @@
1
1
  <h1>Pending</h1>
2
2
  <% if @jobs.any? %>
3
- <form action="<%= u('requeue/all') %>" method="POST">
3
+ <form action="<%= u('requeue/pending') %>" method="POST">
4
4
  <%= csrf_token_tag %>
5
5
  <input type="submit" value="Enqueue All Immediately"></input>
6
6
  </form>
@@ -10,7 +10,7 @@ class TestDelayedJobWeb < MiniTest::Unit::TestCase
10
10
  DelayedJobWeb
11
11
  end
12
12
 
13
- def test_requeue_all
13
+ def test_requeue_failed
14
14
 
15
15
  dataset = Minitest::Mock.new
16
16
  where = lambda { | criteria |
@@ -22,7 +22,28 @@ class TestDelayedJobWeb < MiniTest::Unit::TestCase
22
22
 
23
23
  Time.stub(:now, time) do
24
24
  Delayed::Job.stub(:where, where) do
25
- post "/requeue/all", request_data, rack_env
25
+ post "/requeue/failed", request_data, rack_env
26
+ last_response.status.must_equal 302
27
+ end
28
+ end
29
+
30
+ dataset.verify
31
+
32
+ end
33
+
34
+ def test_requeue_pending
35
+
36
+ dataset = Minitest::Mock.new
37
+ where = lambda { | criteria |
38
+ criteria.must_equal 'last_error IS NOT NULL'
39
+ dataset
40
+ }
41
+
42
+ dataset.expect(:update_all, nil, [:run_at => time, :failed_at => nil])
43
+
44
+ Time.stub(:now, time) do
45
+ Delayed::Job.stub(:where, where) do
46
+ post "/requeue/failed", request_data, rack_env
26
47
  last_response.status.must_equal 302
27
48
  end
28
49
  end
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delayed_job_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9
4
+ version: 1.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erick Schmitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-28 00:00:00.000000000 Z
11
+ date: 2015-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.4.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.4.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activerecord
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>'
31
+ - - ">"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 3.0.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>'
38
+ - - ">"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 3.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: delayed_job
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>'
45
+ - - ">"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 2.0.3
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>'
52
+ - - ">"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 2.0.3
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '4.2'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '4.2'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rack-test
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0.6'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.6'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rails
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '4.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '4.0'
97
97
  description: Web interface for delayed_job inspired by resque
@@ -107,8 +107,8 @@ files:
107
107
  - LICENSE.txt
108
108
  - README.markdown
109
109
  - Rakefile
110
- - delayed_job_web.gemspec
111
110
  - bin/delayed_job_web
111
+ - delayed_job_web.gemspec
112
112
  - lib/delayed_job_web.rb
113
113
  - lib/delayed_job_web/application/app.rb
114
114
  - lib/delayed_job_web/application/public/images/poll.png
@@ -143,17 +143,17 @@ require_paths:
143
143
  - lib
144
144
  required_ruby_version: !ruby/object:Gem::Requirement
145
145
  requirements:
146
- - - '>='
146
+ - - ">="
147
147
  - !ruby/object:Gem::Version
148
148
  version: '0'
149
149
  required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - '>='
151
+ - - ">="
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
154
  requirements: []
155
155
  rubyforge_project:
156
- rubygems_version: 2.0.14
156
+ rubygems_version: 2.2.2
157
157
  signing_key:
158
158
  specification_version: 4
159
159
  summary: Web interface for delayed_job inspired by resque