ncr-background_fu 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -0
- data/Manifest.txt +3 -0
- data/background-fu.gemspec +1 -1
- data/generators/background/background_generator.rb +5 -2
- data/generators/background/templates/scaffold/index.html.erb +1 -9
- data/generators/background/templates/scaffold/jobs.html.erb +1 -1
- data/lib/background_fu.rb +1 -1
- data/rails/init.rb +1 -1
- metadata +1 -1
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -12,14 +12,17 @@ generators/background/templates/daemons.yml
|
|
12
12
|
generators/background/templates/example_monitored_worker.rb
|
13
13
|
generators/background/templates/example_worker.rb
|
14
14
|
generators/background/templates/migration.rb
|
15
|
+
generators/background/templates/scaffold/_form.html.erb
|
15
16
|
generators/background/templates/scaffold/_job.html.erb
|
16
17
|
generators/background/templates/scaffold/_job_deleted.html.erb
|
17
18
|
generators/background/templates/scaffold/_progress_indicator.html.erb
|
19
|
+
generators/background/templates/scaffold/application_controller.rb
|
18
20
|
generators/background/templates/scaffold/background_fu.css
|
19
21
|
generators/background/templates/scaffold/index.html.erb
|
20
22
|
generators/background/templates/scaffold/jobs.html.erb
|
21
23
|
generators/background/templates/scaffold/jobs_controller.rb
|
22
24
|
generators/background/templates/scaffold/jobs_helper.rb
|
25
|
+
generators/background/templates/scaffold/new.html.erb
|
23
26
|
lib/background_fu.rb
|
24
27
|
lib/background_fu/worker_monitoring.rb
|
25
28
|
lib/job.rb
|
data/background-fu.gemspec
CHANGED
@@ -28,10 +28,13 @@ class BackgroundGenerator < Rails::Generator::Base
|
|
28
28
|
m.directory 'app/views/admin/jobs'
|
29
29
|
m.directory 'app/views/layouts/admin'
|
30
30
|
|
31
|
-
m.file 'scaffold/
|
32
|
-
m.file 'scaffold/
|
31
|
+
m.file 'scaffold/application_controller.rb', 'app/controllers/admin/application_controller.rb'
|
32
|
+
m.file 'scaffold/jobs_controller.rb', 'app/controllers/admin/jobs_controller.rb'
|
33
|
+
m.file 'scaffold/jobs_helper.rb', 'app/helpers/admin/jobs_helper.rb'
|
33
34
|
|
34
35
|
m.file 'scaffold/index.html.erb', 'app/views/admin/jobs/index.html.erb'
|
36
|
+
m.file 'scaffold/new.html.erb', 'app/views/admin/jobs/new.html.erb'
|
37
|
+
m.file 'scaffold/_form.html.erb', 'app/views/admin/jobs/_form.html.erb'
|
35
38
|
m.file 'scaffold/_job.html.erb', 'app/views/admin/jobs/_job.html.erb'
|
36
39
|
m.file 'scaffold/_job_deleted.html.erb', 'app/views/admin/jobs/_job_deleted.html.erb'
|
37
40
|
m.file 'scaffold/_progress_indicator.html.erb', 'app/views/admin/jobs/_progress_indicator.html.erb'
|
@@ -1,13 +1,5 @@
|
|
1
1
|
<div>
|
2
|
-
|
3
|
-
<%= f.label :worker_class %><br />
|
4
|
-
<%= f.text_field :worker_class, :class => "worker-class" %><br />
|
5
|
-
<%= f.label :worker_method %><br />
|
6
|
-
<%= f.text_field :worker_method, :class => "worker-method" %><br />
|
7
|
-
<%= f.label :args, "Args - each line (including empty) is interpreted as a string argument" %><br />
|
8
|
-
<%= f.text_area :args %><br />
|
9
|
-
<%= f.submit "Enqueue", :class => "button" %><br />
|
10
|
-
<% end %>
|
2
|
+
<%= render :partial => "form", :locals => { :job => @job } %>
|
11
3
|
</div>
|
12
4
|
|
13
5
|
<hr style="visibility:hidden; margin: 20px auto" />
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<div id="bd"><div class="yui-g">
|
17
17
|
<%= yield %>
|
18
18
|
</div></div>
|
19
|
-
<div id="ft" style="text-align: center;"><a href="http://
|
19
|
+
<div id="ft" style="text-align: center;"><a href="http://github.com/ncr/background-fu/">BackgroundFu</a> Running Background Jobs Made Dead Simple <a href="http://en.trix.pl">Jacek Becela</a> 2008 </div>
|
20
20
|
</div>
|
21
21
|
</body>
|
22
22
|
</html>
|
data/lib/background_fu.rb
CHANGED
data/rails/init.rb
CHANGED
@@ -3,7 +3,7 @@ require 'background_fu/worker_monitoring'
|
|
3
3
|
require 'job'
|
4
4
|
require 'job/bonus_features'
|
5
5
|
|
6
|
-
Dependencies.load_paths << "#{RAILS_ROOT}/lib/workers"
|
6
|
+
ActiveSupport::Dependencies.load_paths << "#{RAILS_ROOT}/lib/workers"
|
7
7
|
|
8
8
|
if ActiveRecord::Base.allow_concurrency
|
9
9
|
Job.send!(:include, Job::BonusFeatures)
|