Skip to content

Commit

Permalink
Merge pull request #719 from killtw/capistrano_env
Browse files Browse the repository at this point in the history
whenever_command_environment_variables should with capistrano env
  • Loading branch information
benlangfeld authored Nov 20, 2017
2 parents 1e127f5 + 881755f commit b85096f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

* Allow the use of string literals for month and day-of-week in raw cron syntax.. [Potamianos Gregory](https://github.com/javan/whenever/pull/711)

* Include Capistrano default environment variables when executing Whenever. [Karl Li](https://github.com/javan/whenever/pull/719)

### 0.9.7 / June 14, 2016

* Restore compatibility with Capistrano v3; it has a bug which we have to work around [Ben Langfeld, Chris Gunther, Shohei Yamasaki]
Expand Down
2 changes: 1 addition & 1 deletion lib/whenever/capistrano/v3/tasks/whenever.rake
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace :load do
task :defaults do
set :whenever_roles, ->{ :db }
set :whenever_command, ->{ [:bundle, :exec, :whenever] }
set :whenever_command_environment_variables, ->{ { rails_env: fetch(:whenever_environment) } }
set :whenever_command_environment_variables, ->{ fetch(:default_env).merge!(rails_env: fetch(:whenever_environment)) }
set :whenever_identifier, ->{ fetch :application }
set :whenever_environment, ->{ fetch :rails_env, fetch(:stage, "production") }
set :whenever_variables, ->{ "environment=#{fetch :whenever_environment}" }
Expand Down

0 comments on commit b85096f

Please sign in to comment.