lib/capistrano/delayed_job/helpers.rb in capistrano-delayed-job-1.0.0 vs lib/capistrano/delayed_job/helpers.rb in capistrano-delayed-job-1.0.1
- old
+ new
@@ -3,10 +3,12 @@
module Capistrano
module DelayedJob
module Helpers
def bundle_delayed_job(*args)
- SSHKit::Command.new(:bundle, :exec, "script/delayed_job", args).to_command
+ bin_dir = %w{bin script}.find{|dir_name| Dir.exists?(dir_name)}
+ raise "No bin or script dir found in project" if bin_dir.nil?
+ SSHKit::Command.new(:bundle, :exec, "#{bin_dir}/delayed_job", args).to_command
end
def dj_template(template_name)
config_file = "#{fetch(:templates_path)}/#{template_name}"
# if no customized file, proceed with default