From 6b69ebd10f53eaaca15766c8749e50d12e62d9e8 Mon Sep 17 00:00:00 2001 From: Javan Makhmali Date: Sun, 6 Mar 2011 16:39:52 -0500 Subject: [PATCH] added :whenever_environment to cap task for easier multistage support --- lib/whenever/capistrano.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/whenever/capistrano.rb b/lib/whenever/capistrano.rb index d7d7c22..7342abf 100644 --- a/lib/whenever/capistrano.rb +++ b/lib/whenever/capistrano.rb @@ -3,7 +3,8 @@ Capistrano::Configuration.instance(:must_exist).load do _cset(:whenever_roles) { :db } _cset(:whenever_command) { "whenever" } _cset(:whenever_identifier) { application } - _cset(:whenever_update_flags) { "--update-crontab #{whenever_identifier}" } + _cset(:whenever_environment) { "production" } + _cset(:whenever_update_flags) { "--update-crontab #{whenever_identifier} --set environment=#{whenever_environment}" } _cset(:whenever_clear_flags) { "--clear-crontab #{whenever_identifier}" } # Disable cron jobs at the begining of a deploy.