mcmire-delayed_job_web 1.1.3.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,25 @@
1
+ %h1
2
+ Overview
3
+ %p.sub
4
+ The list below shows an overview of the jobs in the delayed_job queue.
5
+ %table.overview
6
+ %tr
7
+ %th Status
8
+ %th Count
9
+ %tr
10
+ %td.status
11
+ %a{:href => u('/enqueued')} Enqueued Jobs
12
+ %td= delayed_job.count
13
+ %tr
14
+ %td.status
15
+ %a{:href => u('/working')} Working Jobs
16
+ %td= delayed_jobs(:working).count
17
+ %tr
18
+ %td.status
19
+ %a{:href => u('/pending')} Pending Jobs
20
+ %td= delayed_jobs(:pending).count
21
+ %tr{:class => delayed_jobs(:failed).count > 0 ? 'failure' : ''}
22
+ %td.status
23
+ %a{:href => u('/failed')} Failed Jobs
24
+ %td= delayed_jobs(:failed).count
25
+ = poll
@@ -0,0 +1,12 @@
1
+ %h1
2
+ Pending
3
+ - if @jobs.any?
4
+ %form{:method => 'POST', :action => u('requeue/all')}
5
+ %input{:type => 'submit', :value => 'Enqueue All Immediately'}
6
+ %p.sub
7
+ The list below contains jobs currently being processed.
8
+ %p.sub= "Showing #{start} to #{start + per_page} of #{@all_jobs.count} pending jobs."
9
+ %ul.job
10
+ - @jobs.each do |job|
11
+ = partial :job, {:job => job}
12
+ = partial :next_more, :start => start, :total_size => @all_jobs.count, :per_page => per_page
@@ -0,0 +1,20 @@
1
+ %h1
2
+ Stats
3
+ %table.stats
4
+ %tr
5
+ %th.status
6
+ environment
7
+ %th= Sinatra::Application.environment.to_s
8
+ %tr
9
+ %th.status
10
+ failed
11
+ %th= delayed_jobs(:failed).count
12
+ %tr
13
+ %th.status
14
+ pending
15
+ %th= delayed_jobs(:pending).count
16
+ %tr
17
+ %th.status
18
+ working
19
+ %th= delayed_jobs(:working).count
20
+ = poll
@@ -0,0 +1,9 @@
1
+ %h1
2
+ Working
3
+ %p.sub
4
+ The list below contains jobs currently being processed.
5
+ %p.sub= "Showing #{start} to #{start + per_page} of #{@all_jobs.count} working jobs."
6
+ %ul.job
7
+ - @jobs.each do |job|
8
+ = partial :job, {:job => job}
9
+ = partial :next_more, :start => start, :total_size => @all_jobs.count, :per_page => per_page
@@ -0,0 +1 @@
1
+ require 'delayed_job_web/application/app'
@@ -0,0 +1,96 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{mcmire-delayed_job_web}
8
+ s.version = "1.1.3.rc1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Erick Schmitt", "Elliot Winkler"]
12
+ s.date = %q{2012-11-11}
13
+ s.default_executable = %q{delayed_job_web}
14
+ s.description = %q{Web interface for delayed_job inspired by resque}
15
+ s.email = %q{ejschmitt@gmail.com}
16
+ s.executables = ["delayed_job_web"]
17
+ s.extra_rdoc_files = [
18
+ "LICENSE.txt",
19
+ "README.markdown"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ "Gemfile",
24
+ "LICENSE.txt",
25
+ "README.markdown",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "bin/delayed_job_web",
29
+ "lib/delayed_job_web.rb",
30
+ "lib/delayed_job_web/application/app.rb",
31
+ "lib/delayed_job_web/application/public/images/poll.png",
32
+ "lib/delayed_job_web/application/public/javascripts/application.js",
33
+ "lib/delayed_job_web/application/public/javascripts/jquery-1.7.1.min.js",
34
+ "lib/delayed_job_web/application/public/javascripts/jquery.relatize_date.js",
35
+ "lib/delayed_job_web/application/public/stylesheets/reset.css",
36
+ "lib/delayed_job_web/application/public/stylesheets/style.css",
37
+ "lib/delayed_job_web/application/views/enqueued.haml",
38
+ "lib/delayed_job_web/application/views/error.haml",
39
+ "lib/delayed_job_web/application/views/failed.haml",
40
+ "lib/delayed_job_web/application/views/job.haml",
41
+ "lib/delayed_job_web/application/views/layout.haml",
42
+ "lib/delayed_job_web/application/views/next_more.haml",
43
+ "lib/delayed_job_web/application/views/overview.haml",
44
+ "lib/delayed_job_web/application/views/pending.haml",
45
+ "lib/delayed_job_web/application/views/stats.haml",
46
+ "lib/delayed_job_web/application/views/working.haml",
47
+ "mcmire-delayed_job_web.gemspec",
48
+ "test/helper.rb",
49
+ "test/test_delayed_job_web.rb"
50
+ ]
51
+ s.homepage = %q{http://github.com/ejschmitt/delayed_job_web}
52
+ s.licenses = ["MIT"]
53
+ s.require_paths = ["lib"]
54
+ s.rubygems_version = %q{1.6.2}
55
+ s.summary = %q{Web interface for delayed_job}
56
+
57
+ if s.respond_to? :specification_version then
58
+ s.specification_version = 3
59
+
60
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
61
+ s.add_runtime_dependency(%q<sinatra>, [">= 0.9.2"])
62
+ s.add_runtime_dependency(%q<haml>, ["~> 3.1.3"])
63
+ s.add_runtime_dependency(%q<activerecord>, ["> 2.0.0"])
64
+ s.add_runtime_dependency(%q<delayed_job>, ["> 2.0.3"])
65
+ s.add_runtime_dependency(%q<rdoc>, [">= 0"])
66
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
67
+ s.add_development_dependency(%q<bundler>, ["> 1.0.0"])
68
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
69
+ s.add_development_dependency(%q<rcov>, [">= 0"])
70
+ s.add_development_dependency(%q<rack-test>, [">= 0"])
71
+ else
72
+ s.add_dependency(%q<sinatra>, [">= 0.9.2"])
73
+ s.add_dependency(%q<haml>, ["~> 3.1.3"])
74
+ s.add_dependency(%q<activerecord>, ["> 2.0.0"])
75
+ s.add_dependency(%q<delayed_job>, ["> 2.0.3"])
76
+ s.add_dependency(%q<rdoc>, [">= 0"])
77
+ s.add_dependency(%q<shoulda>, [">= 0"])
78
+ s.add_dependency(%q<bundler>, ["> 1.0.0"])
79
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
80
+ s.add_dependency(%q<rcov>, [">= 0"])
81
+ s.add_dependency(%q<rack-test>, [">= 0"])
82
+ end
83
+ else
84
+ s.add_dependency(%q<sinatra>, [">= 0.9.2"])
85
+ s.add_dependency(%q<haml>, ["~> 3.1.3"])
86
+ s.add_dependency(%q<activerecord>, ["> 2.0.0"])
87
+ s.add_dependency(%q<delayed_job>, ["> 2.0.3"])
88
+ s.add_dependency(%q<rdoc>, [">= 0"])
89
+ s.add_dependency(%q<shoulda>, [">= 0"])
90
+ s.add_dependency(%q<bundler>, ["> 1.0.0"])
91
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
92
+ s.add_dependency(%q<rcov>, [">= 0"])
93
+ s.add_dependency(%q<rack-test>, [">= 0"])
94
+ end
95
+ end
96
+
data/test/helper.rb ADDED
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'test/unit'
11
+ require 'shoulda'
12
+
13
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
15
+ require 'delayed_job_web'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -0,0 +1,48 @@
1
+ require 'helper'
2
+ require 'rack/test'
3
+ require 'delayed_job_web/application/app'
4
+ ENV['RACK_ENV'] = 'test'
5
+
6
+ class Delayed::Job
7
+ class DelayedJobFake < Array
8
+ # fake out arel
9
+ def order(*args)
10
+ DelayedJobFake.new
11
+ end
12
+
13
+ def offset(*args)
14
+ DelayedJobFake.new
15
+ end
16
+
17
+ def limit(*args)
18
+ DelayedJobFake.new
19
+ end
20
+ end
21
+
22
+ def self.where(*args)
23
+ DelayedJobFake.new
24
+ end
25
+
26
+ def self.count(*args)
27
+ 0
28
+ end
29
+ end
30
+
31
+ class TestDelayedJobWeb < Test::Unit::TestCase
32
+ include Rack::Test::Methods
33
+ def app
34
+ DelayedJobWeb.new
35
+ end
36
+
37
+ def should_respond_with_success
38
+ assert last_response.ok?, last_response.errors
39
+ end
40
+
41
+ # basic smoke test all the tabs
42
+ %w(overview enqueued working pending failed stats).each do |tab|
43
+ should "get '/#{tab}'" do
44
+ get "/#{tab}"
45
+ should_respond_with_success
46
+ end
47
+ end
48
+ end
metadata ADDED
@@ -0,0 +1,251 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mcmire-delayed_job_web
3
+ version: !ruby/object:Gem::Version
4
+ hash: 15424063
5
+ prerelease: 6
6
+ segments:
7
+ - 1
8
+ - 1
9
+ - 3
10
+ - rc
11
+ - 1
12
+ version: 1.1.3.rc1
13
+ platform: ruby
14
+ authors:
15
+ - Erick Schmitt
16
+ - Elliot Winkler
17
+ autorequire:
18
+ bindir: bin
19
+ cert_chain: []
20
+
21
+ date: 2012-11-11 00:00:00 -07:00
22
+ default_executable: delayed_job_web
23
+ dependencies:
24
+ - !ruby/object:Gem::Dependency
25
+ prerelease: false
26
+ type: :runtime
27
+ requirement: &id001 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ hash: 63
33
+ segments:
34
+ - 0
35
+ - 9
36
+ - 2
37
+ version: 0.9.2
38
+ name: sinatra
39
+ version_requirements: *id001
40
+ - !ruby/object:Gem::Dependency
41
+ prerelease: false
42
+ type: :runtime
43
+ requirement: &id002 !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ~>
47
+ - !ruby/object:Gem::Version
48
+ hash: 5
49
+ segments:
50
+ - 3
51
+ - 1
52
+ - 3
53
+ version: 3.1.3
54
+ name: haml
55
+ version_requirements: *id002
56
+ - !ruby/object:Gem::Dependency
57
+ prerelease: false
58
+ type: :runtime
59
+ requirement: &id003 !ruby/object:Gem::Requirement
60
+ none: false
61
+ requirements:
62
+ - - ">"
63
+ - !ruby/object:Gem::Version
64
+ hash: 15
65
+ segments:
66
+ - 2
67
+ - 0
68
+ - 0
69
+ version: 2.0.0
70
+ name: activerecord
71
+ version_requirements: *id003
72
+ - !ruby/object:Gem::Dependency
73
+ prerelease: false
74
+ type: :runtime
75
+ requirement: &id004 !ruby/object:Gem::Requirement
76
+ none: false
77
+ requirements:
78
+ - - ">"
79
+ - !ruby/object:Gem::Version
80
+ hash: 9
81
+ segments:
82
+ - 2
83
+ - 0
84
+ - 3
85
+ version: 2.0.3
86
+ name: delayed_job
87
+ version_requirements: *id004
88
+ - !ruby/object:Gem::Dependency
89
+ prerelease: false
90
+ type: :runtime
91
+ requirement: &id005 !ruby/object:Gem::Requirement
92
+ none: false
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ hash: 3
97
+ segments:
98
+ - 0
99
+ version: "0"
100
+ name: rdoc
101
+ version_requirements: *id005
102
+ - !ruby/object:Gem::Dependency
103
+ prerelease: false
104
+ type: :development
105
+ requirement: &id006 !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ hash: 3
111
+ segments:
112
+ - 0
113
+ version: "0"
114
+ name: shoulda
115
+ version_requirements: *id006
116
+ - !ruby/object:Gem::Dependency
117
+ prerelease: false
118
+ type: :development
119
+ requirement: &id007 !ruby/object:Gem::Requirement
120
+ none: false
121
+ requirements:
122
+ - - ">"
123
+ - !ruby/object:Gem::Version
124
+ hash: 23
125
+ segments:
126
+ - 1
127
+ - 0
128
+ - 0
129
+ version: 1.0.0
130
+ name: bundler
131
+ version_requirements: *id007
132
+ - !ruby/object:Gem::Dependency
133
+ prerelease: false
134
+ type: :development
135
+ requirement: &id008 !ruby/object:Gem::Requirement
136
+ none: false
137
+ requirements:
138
+ - - ~>
139
+ - !ruby/object:Gem::Version
140
+ hash: 7
141
+ segments:
142
+ - 1
143
+ - 6
144
+ - 4
145
+ version: 1.6.4
146
+ name: jeweler
147
+ version_requirements: *id008
148
+ - !ruby/object:Gem::Dependency
149
+ prerelease: false
150
+ type: :development
151
+ requirement: &id009 !ruby/object:Gem::Requirement
152
+ none: false
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ hash: 3
157
+ segments:
158
+ - 0
159
+ version: "0"
160
+ name: rcov
161
+ version_requirements: *id009
162
+ - !ruby/object:Gem::Dependency
163
+ prerelease: false
164
+ type: :development
165
+ requirement: &id010 !ruby/object:Gem::Requirement
166
+ none: false
167
+ requirements:
168
+ - - ">="
169
+ - !ruby/object:Gem::Version
170
+ hash: 3
171
+ segments:
172
+ - 0
173
+ version: "0"
174
+ name: rack-test
175
+ version_requirements: *id010
176
+ description: Web interface for delayed_job inspired by resque
177
+ email: ejschmitt@gmail.com
178
+ executables:
179
+ - delayed_job_web
180
+ extensions: []
181
+
182
+ extra_rdoc_files:
183
+ - LICENSE.txt
184
+ - README.markdown
185
+ files:
186
+ - .document
187
+ - Gemfile
188
+ - LICENSE.txt
189
+ - README.markdown
190
+ - Rakefile
191
+ - VERSION
192
+ - bin/delayed_job_web
193
+ - lib/delayed_job_web.rb
194
+ - lib/delayed_job_web/application/app.rb
195
+ - lib/delayed_job_web/application/public/images/poll.png
196
+ - lib/delayed_job_web/application/public/javascripts/application.js
197
+ - lib/delayed_job_web/application/public/javascripts/jquery-1.7.1.min.js
198
+ - lib/delayed_job_web/application/public/javascripts/jquery.relatize_date.js
199
+ - lib/delayed_job_web/application/public/stylesheets/reset.css
200
+ - lib/delayed_job_web/application/public/stylesheets/style.css
201
+ - lib/delayed_job_web/application/views/enqueued.haml
202
+ - lib/delayed_job_web/application/views/error.haml
203
+ - lib/delayed_job_web/application/views/failed.haml
204
+ - lib/delayed_job_web/application/views/job.haml
205
+ - lib/delayed_job_web/application/views/layout.haml
206
+ - lib/delayed_job_web/application/views/next_more.haml
207
+ - lib/delayed_job_web/application/views/overview.haml
208
+ - lib/delayed_job_web/application/views/pending.haml
209
+ - lib/delayed_job_web/application/views/stats.haml
210
+ - lib/delayed_job_web/application/views/working.haml
211
+ - mcmire-delayed_job_web.gemspec
212
+ - test/helper.rb
213
+ - test/test_delayed_job_web.rb
214
+ has_rdoc: true
215
+ homepage: http://github.com/ejschmitt/delayed_job_web
216
+ licenses:
217
+ - MIT
218
+ post_install_message:
219
+ rdoc_options: []
220
+
221
+ require_paths:
222
+ - lib
223
+ required_ruby_version: !ruby/object:Gem::Requirement
224
+ none: false
225
+ requirements:
226
+ - - ">="
227
+ - !ruby/object:Gem::Version
228
+ hash: 3
229
+ segments:
230
+ - 0
231
+ version: "0"
232
+ required_rubygems_version: !ruby/object:Gem::Requirement
233
+ none: false
234
+ requirements:
235
+ - - ">"
236
+ - !ruby/object:Gem::Version
237
+ hash: 25
238
+ segments:
239
+ - 1
240
+ - 3
241
+ - 1
242
+ version: 1.3.1
243
+ requirements: []
244
+
245
+ rubyforge_project:
246
+ rubygems_version: 1.6.2
247
+ signing_key:
248
+ specification_version: 3
249
+ summary: Web interface for delayed_job
250
+ test_files: []
251
+