delayed_job_mongoid_web 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. data/.document +5 -0
  2. data/Gemfile +15 -0
  3. data/LICENSE.txt +20 -0
  4. data/README.markdown +61 -0
  5. data/Rakefile +53 -0
  6. data/VERSION +1 -0
  7. data/bin/delayed_job_mongoid_web +10 -0
  8. data/delayed_job_mongoid_web.gemspec +95 -0
  9. data/lib/delayed_job_mongoid_web/application/app.rb +156 -0
  10. data/lib/delayed_job_mongoid_web/application/public/images/poll.png +0 -0
  11. data/lib/delayed_job_mongoid_web/application/public/javascripts/application.js +64 -0
  12. data/lib/delayed_job_mongoid_web/application/public/javascripts/jquery-1.7.1.min.js +4 -0
  13. data/lib/delayed_job_mongoid_web/application/public/javascripts/jquery.relatize_date.js +117 -0
  14. data/lib/delayed_job_mongoid_web/application/public/stylesheets/reset.css +44 -0
  15. data/lib/delayed_job_mongoid_web/application/public/stylesheets/style.css +89 -0
  16. data/lib/delayed_job_mongoid_web/application/views/enqueued.haml +10 -0
  17. data/lib/delayed_job_mongoid_web/application/views/error.haml +2 -0
  18. data/lib/delayed_job_mongoid_web/application/views/failed.haml +14 -0
  19. data/lib/delayed_job_mongoid_web/application/views/job.haml +42 -0
  20. data/lib/delayed_job_mongoid_web/application/views/layout.haml +23 -0
  21. data/lib/delayed_job_mongoid_web/application/views/next_more.haml +6 -0
  22. data/lib/delayed_job_mongoid_web/application/views/overview.haml +25 -0
  23. data/lib/delayed_job_mongoid_web/application/views/pending.haml +12 -0
  24. data/lib/delayed_job_mongoid_web/application/views/stats.haml +20 -0
  25. data/lib/delayed_job_mongoid_web/application/views/working.haml +9 -0
  26. data/lib/delayed_job_mongoid_web.rb +1 -0
  27. data/test/helper.rb +18 -0
  28. data/test/test_delayed_job_mongoid_web.rb +30 -0
  29. metadata +238 -0
@@ -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_mongoid_web/application/app'
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_mongoid_web'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -0,0 +1,30 @@
1
+ require 'helper'
2
+ require 'rack/test'
3
+ require 'delayed_job_mongoid_web/application/app'
4
+
5
+ ENV['RACK_ENV'] = 'test'
6
+ require 'delayed_job_mongoid'
7
+
8
+
9
+ Mongoid.configure do |config|
10
+ config.connect_to("dl_spec")
11
+ end
12
+
13
+ class TestDelayedJobWeb < Test::Unit::TestCase
14
+ include Rack::Test::Methods
15
+ def app
16
+ DelayedJobMongoidWeb.new
17
+ end
18
+
19
+ def should_respond_with_success
20
+ assert last_response.ok?, last_response.errors
21
+ end
22
+
23
+ # basic smoke test all the tabs
24
+ %w(overview enqueued working pending failed stats).each do |tab|
25
+ should "get '/#{tab}'" do
26
+ get "/#{tab}"
27
+ should_respond_with_success
28
+ end
29
+ end
30
+ end
metadata ADDED
@@ -0,0 +1,238 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: delayed_job_mongoid_web
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.3
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Erick Schmitt
9
+ - Rob Dingwell
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2012-05-18 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: sinatra
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: 0.9.2
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: 0.9.2
31
+ - !ruby/object:Gem::Dependency
32
+ name: haml
33
+ requirement: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ~>
37
+ - !ruby/object:Gem::Version
38
+ version: 3.1.3
39
+ type: :runtime
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ version: 3.1.3
47
+ - !ruby/object:Gem::Dependency
48
+ name: activerecord
49
+ requirement: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>'
53
+ - !ruby/object:Gem::Version
54
+ version: 3.0.0
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>'
61
+ - !ruby/object:Gem::Version
62
+ version: 3.0.0
63
+ - !ruby/object:Gem::Dependency
64
+ name: delayed_job
65
+ requirement: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ! '>'
69
+ - !ruby/object:Gem::Version
70
+ version: 2.0.3
71
+ type: :runtime
72
+ prerelease: false
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ! '>'
77
+ - !ruby/object:Gem::Version
78
+ version: 2.0.3
79
+ - !ruby/object:Gem::Dependency
80
+ name: rdoc
81
+ requirement: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ! '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ type: :runtime
88
+ prerelease: false
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ - !ruby/object:Gem::Dependency
96
+ name: shoulda
97
+ requirement: !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ! '>='
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: bundler
113
+ requirement: !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ~>
117
+ - !ruby/object:Gem::Version
118
+ version: 1.0.0
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ none: false
123
+ requirements:
124
+ - - ~>
125
+ - !ruby/object:Gem::Version
126
+ version: 1.0.0
127
+ - !ruby/object:Gem::Dependency
128
+ name: jeweler
129
+ requirement: !ruby/object:Gem::Requirement
130
+ none: false
131
+ requirements:
132
+ - - ~>
133
+ - !ruby/object:Gem::Version
134
+ version: 1.6.4
135
+ type: :development
136
+ prerelease: false
137
+ version_requirements: !ruby/object:Gem::Requirement
138
+ none: false
139
+ requirements:
140
+ - - ~>
141
+ - !ruby/object:Gem::Version
142
+ version: 1.6.4
143
+ - !ruby/object:Gem::Dependency
144
+ name: rcov
145
+ requirement: !ruby/object:Gem::Requirement
146
+ none: false
147
+ requirements:
148
+ - - ! '>='
149
+ - !ruby/object:Gem::Version
150
+ version: '0'
151
+ type: :development
152
+ prerelease: false
153
+ version_requirements: !ruby/object:Gem::Requirement
154
+ none: false
155
+ requirements:
156
+ - - ! '>='
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ - !ruby/object:Gem::Dependency
160
+ name: rack-test
161
+ requirement: !ruby/object:Gem::Requirement
162
+ none: false
163
+ requirements:
164
+ - - ! '>='
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ type: :development
168
+ prerelease: false
169
+ version_requirements: !ruby/object:Gem::Requirement
170
+ none: false
171
+ requirements:
172
+ - - ! '>='
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ description: Web interface for delayed_job inspired by resque
176
+ email: ejschmitt@gmail.com
177
+ executables:
178
+ - delayed_job_mongoid_web
179
+ extensions: []
180
+ extra_rdoc_files:
181
+ - LICENSE.txt
182
+ - README.markdown
183
+ files:
184
+ - .document
185
+ - Gemfile
186
+ - LICENSE.txt
187
+ - README.markdown
188
+ - Rakefile
189
+ - VERSION
190
+ - bin/delayed_job_mongoid_web
191
+ - delayed_job_mongoid_web.gemspec
192
+ - lib/delayed_job_mongoid_web.rb
193
+ - lib/delayed_job_mongoid_web/application/app.rb
194
+ - lib/delayed_job_mongoid_web/application/public/images/poll.png
195
+ - lib/delayed_job_mongoid_web/application/public/javascripts/application.js
196
+ - lib/delayed_job_mongoid_web/application/public/javascripts/jquery-1.7.1.min.js
197
+ - lib/delayed_job_mongoid_web/application/public/javascripts/jquery.relatize_date.js
198
+ - lib/delayed_job_mongoid_web/application/public/stylesheets/reset.css
199
+ - lib/delayed_job_mongoid_web/application/public/stylesheets/style.css
200
+ - lib/delayed_job_mongoid_web/application/views/enqueued.haml
201
+ - lib/delayed_job_mongoid_web/application/views/error.haml
202
+ - lib/delayed_job_mongoid_web/application/views/failed.haml
203
+ - lib/delayed_job_mongoid_web/application/views/job.haml
204
+ - lib/delayed_job_mongoid_web/application/views/layout.haml
205
+ - lib/delayed_job_mongoid_web/application/views/next_more.haml
206
+ - lib/delayed_job_mongoid_web/application/views/overview.haml
207
+ - lib/delayed_job_mongoid_web/application/views/pending.haml
208
+ - lib/delayed_job_mongoid_web/application/views/stats.haml
209
+ - lib/delayed_job_mongoid_web/application/views/working.haml
210
+ - test/helper.rb
211
+ - test/test_delayed_job_mongoid_web.rb
212
+ homepage: http://github.com/rdingwell/delayed_job_mongoid_web
213
+ licenses:
214
+ - MIT
215
+ post_install_message:
216
+ rdoc_options: []
217
+ require_paths:
218
+ - lib
219
+ required_ruby_version: !ruby/object:Gem::Requirement
220
+ none: false
221
+ requirements:
222
+ - - ! '>='
223
+ - !ruby/object:Gem::Version
224
+ version: '0'
225
+ required_rubygems_version: !ruby/object:Gem::Requirement
226
+ none: false
227
+ requirements:
228
+ - - ! '>='
229
+ - !ruby/object:Gem::Version
230
+ version: '0'
231
+ requirements: []
232
+ rubyforge_project:
233
+ rubygems_version: 1.8.24
234
+ signing_key:
235
+ specification_version: 3
236
+ summary: Web interface for delayed_job
237
+ test_files: []
238
+ has_rdoc: