Skip to content

Commit

Permalink
Merge pull request #47 from jpascal/master
Browse files Browse the repository at this point in the history
added support whenever and fix exit from console
  • Loading branch information
rstacruz committed Aug 23, 2012
2 parents 3c6e718 + e12fbf1 commit 1bf152d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mina/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def check_for_changes_script(options={})

desc "Starts an interactive console."
task :console do
queue echo_cmd %[cd "#{deploy_to!}/#{current_path!}" && #{rails} console]
queue echo_cmd %[cd "#{deploy_to!}/#{current_path!}" && #{rails} console && exit]
end

namespace :rails do
Expand Down
23 changes: 23 additions & 0 deletions lib/mina/whenever.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace :whenever do
desc "Clear crontab"
task :clear do
queue %{
echo "-----> Clear crontab for #{domain}"
#{echo_cmd %[cd #{deploy_to!}/#{current_path!} ; bundle exec whenever --clear-crontab #{domain} --set 'environment=production&path=#{deploy_to!}/#{current_path!}']}
}
end
desc "Update crontab"
task :update do
queue %{
echo "-----> Update crontab for #{domain}"
#{echo_cmd %[cd #{deploy_to!}/#{current_path!} ; bundle exec whenever --update-crontab #{domain} --set 'environment=production&path=#{deploy_to!}/#{current_path!}']}
}
end
desc "Write crontab"
task :write do
queue %{
echo "-----> Update crontab for #{domain}"
#{echo_cmd %[cd #{deploy_to!}/#{current_path!} ; bundle exec whenever --write-crontab #{domain} --set 'environment=production&path=#{deploy_to!}/#{current_path!}']}
}
end
end

0 comments on commit 1bf152d

Please sign in to comment.