mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
make sure the logger gets passed to the gateway, and log the server.host, instead of the server record
git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@6269 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
3d1bdb06bf
commit
46ef78d2d8
3 changed files with 3 additions and 3 deletions
|
@ -52,7 +52,7 @@ module Capistrano
|
|||
|
||||
if exists?(:gateway)
|
||||
logger.debug "establishing connection to gateway `#{fetch(:gateway)}'"
|
||||
Gateway.new(ServerDefinition.new(fetch(:gateway)), options)
|
||||
Gateway.new(ServerDefinition.new(fetch(:gateway)), options.merge(:logger => logger))
|
||||
else
|
||||
DefaultConnectionFactory.new(options)
|
||||
end
|
||||
|
|
|
@ -75,7 +75,7 @@ module Capistrano
|
|||
# Net::SSH connection via that port.
|
||||
def connect_to(server)
|
||||
connection = nil
|
||||
logger.trace "establishing connection to #{server} via gateway" if logger
|
||||
logger.trace "establishing connection to `#{server.host}' via gateway" if logger
|
||||
local_port = next_port
|
||||
|
||||
thread = Thread.new do
|
||||
|
|
|
@ -65,7 +65,7 @@ class ConfigurationConnectionsTest < Test::Unit::TestCase
|
|||
def test_connection_factory_as_gateway_should_honor_config_options
|
||||
@config.values[:gateway] = "capistrano"
|
||||
@config.values.update(@ssh_options)
|
||||
Capistrano::SSH.expects(:connect).with { |s,opts| s.host == "capistrano" && opts == @ssh_options }.yields(stub_everything)
|
||||
Capistrano::SSH.expects(:connect).with { |s,opts| s.host == "capistrano" && opts == @ssh_options.merge(:logger => @config.logger) }.yields(stub_everything)
|
||||
assert_instance_of Capistrano::Gateway, @config.connection_factory
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue