capistrano 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/lib/capistrano/ssh.rb +5 -7
- data/lib/capistrano/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
data/lib/capistrano/ssh.rb
CHANGED
@@ -21,16 +21,14 @@ module Capistrano
|
|
21
21
|
def self.connect(server, config, port=22, &block)
|
22
22
|
methods = [ %w(publickey hostbased), %w(password keyboard-interactive) ]
|
23
23
|
password_value = nil
|
24
|
+
|
25
|
+
user, server_stripped, pport = parse_server(server)
|
24
26
|
|
25
27
|
begin
|
26
|
-
ssh_options = { :username => config.user,
|
28
|
+
ssh_options = { :username => (user || config.user),
|
27
29
|
:password => password_value,
|
28
|
-
:port => port,
|
30
|
+
:port => ((pport && pport != port) ? pport : port),
|
29
31
|
:auth_methods => methods.shift }.merge(config.ssh_options)
|
30
|
-
|
31
|
-
user, server_stripped, port = parse_server(server)
|
32
|
-
ssh_options[:username] = user if user
|
33
|
-
ssh_options[:port] = port if port
|
34
32
|
|
35
33
|
Net::SSH.start(server_stripped,ssh_options,&block)
|
36
34
|
rescue Net::SSH::AuthenticationFailed
|
@@ -40,7 +38,7 @@ module Capistrano
|
|
40
38
|
end
|
41
39
|
end
|
42
40
|
|
43
|
-
# This regex is used for its byproducts, the $1-
|
41
|
+
# This regex is used for its byproducts, the $1-3 match vars.
|
44
42
|
# This regex will always match the ssh hostname and if there
|
45
43
|
# is a username or port they will be matched as well. This
|
46
44
|
# allows us to set the username and ssh port right in the
|
data/lib/capistrano/version.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: capistrano
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.3.
|
7
|
-
date:
|
6
|
+
version: 1.3.1
|
7
|
+
date: 2007-01-05 00:00:00 -07:00
|
8
8
|
summary: Capistrano is a framework and utility for executing commands in parallel on multiple remote machines, via SSH. The primary goal is to simplify and automate the deployment of web applications.
|
9
9
|
require_paths:
|
10
10
|
- lib
|