sshkit 1.8 compatibility

This commit is contained in:
Florian Schwab 2015-12-06 10:48:29 +01:00
parent 6b4017c60b
commit b6cad64b83
3 changed files with 9 additions and 6 deletions

View File

@ -1,6 +1,10 @@
# Change Log
## 1.0.0 (2015-11-12)
## 1.0.2 (2015-12-06)
### Fixed
- works with sshkit 1.8
## 1.0.1 (2015-11-12)
### Fixed
- setting ssh hostname through `ssh_options`
- use login shell

View File

@ -27,9 +27,6 @@ namespace :rails do
rails_env = fetch(:rails_env, fetch(:stage, 'production'))
cmd = SSHKit::Command.new(:rails, :console, rails_env, *rails_console_args, host: host)
SSHKit.config.output << cmd
port = host.port || (host.ssh_options || {})[:port]
ssh_cmd_args << "-p #{port}" if port
@ -45,9 +42,11 @@ namespace :rails do
ssh_cmd_args << "-i #{identity}"
end
cmd = SSHKit::Command.new(:rails, :console, rails_env, *rails_console_args, host: host)
ssh_cmd = %Q(ssh #{ssh_cmd_args.join(' ')} -t '$SHELL -l -c "cd #{current_path} && (#{cmd.environment_string} #{cmd})"')
debug("Running #{ssh_cmd.yellow} on #{host.hostname.blue}")
debug("Running #{ssh_cmd} on #{host.hostname}")
exec(ssh_cmd)
end

View File

@ -5,7 +5,7 @@ module Capistrano
# Console
module Console
# gem version
VERSION = '1.0.1'
VERSION = '1.0.2'
end
end
end