Skip to content

Commit

Permalink
Merge pull request #161 from pricees/master
Browse files Browse the repository at this point in the history
Adding support for server environment variables in deploy.rb, (:env_vars)
  • Loading branch information
d4be4st committed Jan 23, 2015
2 parents 5565753 + 09aacac commit 406bf76
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,9 @@ The local path to the SSH private key file.
### ssh_options
Switches to be passed to the `ssh` command.

### env_vars
Environment variables passed to the `ssh` command (e.g. "foo=bar baz=1").

## Tasks
Any and all of these settings can be overriden in your `deploy.rb`.

Expand Down
3 changes: 3 additions & 0 deletions lib/mina/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
# ### ssh_options
# Switches to be passed to the `ssh` command.

# ### env_vars
# Environment variables to be passed to `ssh` command.

# ## Tasks
# Any and all of these settings can be overriden in your `deploy.rb`.

Expand Down
3 changes: 2 additions & 1 deletion lib/mina/ssh_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def ssh_command
args << " -i #{identity_file}" if identity_file?
args << " -p #{port}" if port?
args << " -A" if forward_agent?
args << " #{ssh_options}" if ssh_options?
args << " #{ssh_options}" if ssh_options?
args << " export #{env_vars}" if env_vars?
args << " -t"
"ssh #{args}"
end
Expand Down

0 comments on commit 406bf76

Please sign in to comment.