Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

delayed_job - always add the admin interface

  • Loading branch information...
commit 7dcd267945874d087663ca655201c52ee29c91ac 1 parent b2a5a01
Dr Nic Williams authored
Showing with 13 additions and 25 deletions.
  1. +13 −25 scrolls/delayed_job.rb
38 scrolls/delayed_job.rb
View
@@ -1,19 +1,18 @@
gem 'delayed_job_active_record'
gem 'delayed_job_admin'
-if config["admin"]
- inject_into_class "app/controllers/application_controller.rb", "ApplicationController" do
- <<-RUBY
-
- def delayed_job_admin_authentication
- # authentication_logic_goes_here
- true
- end
+inject_into_class "app/controllers/application_controller.rb", "ApplicationController" do
+<<-RUBY
- RUBY
- end
-
- create_file "readmes/delayed_job_admin.md", <<-MD
+def delayed_job_admin_authentication
+ # authentication_logic_goes_here
+ true
+end
+
+RUBY
+end
+
+create_file "readmes/delayed_job_admin.md", <<-MD
# Delayed Job Admin README
Delayed Job Admin console is available at [/delayed_job_admin](http://localhost:3000/delayed_job_admin).
@@ -45,8 +44,7 @@ def delayed_job_admin_authentication
end
```
- MD
-end
+MD
if scroll? "eycloud_recipes_on_deploy"
gem 'eycloud-recipe-delayed_job', :group => :eycloud
@@ -71,11 +69,6 @@ def delayed_job_admin_authentication
end
end
-after_everything do
- say_custom "readme", "Delayed Job Admin"
- run %q{cat "readmes/delayed_job_admin.md"}
-end
-
__END__
name: Delayed Job
@@ -86,9 +79,4 @@ def delayed_job_admin_authentication
category: worker
tags: [worker,background-tasks]
-run_after: [eycloud_recipes_on_deploy]
-
-config:
- - admin:
- type: boolean
- prompt: "Install simple admin interface to Delayed Job?"
+run_after: [eycloud_recipes_on_deploy, mysql, postgresql]
Please sign in to comment.
Something went wrong with that request. Please try again.