capistrano 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +14 -0
- data/lib/capistrano/actor.rb +3 -3
- data/lib/capistrano/command.rb +14 -1
- data/lib/capistrano/configuration.rb +1 -0
- data/lib/capistrano/scm/subversion.rb +1 -1
- data/lib/capistrano/version.rb +1 -1
- data/test/scm/subversion_test.rb +4 -4
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
*1.4.1* (February 24, 2007)
|
2
|
+
|
3
|
+
* Use the no-auth-cache option with subversion so that username/password tokens do not get cached by capistrano usage [jonathan]
|
4
|
+
|
5
|
+
* Deprecated upper-cased variables [Jamis Buck]
|
6
|
+
|
7
|
+
* Make sure Actor#get does not close the SFTP channel (so subsequent SFTP operations work) [Dov Murik]
|
8
|
+
|
9
|
+
* Add :env option to 'run' (and friends) so that you can specify environment variables to be injected into the new process' environment [Mathieu Lajugie]
|
10
|
+
|
11
|
+
|
1
12
|
*1.4.0* (February 3, 2007)
|
2
13
|
|
3
14
|
* Use the auth info for subversion more consistently [Jamis Buck]
|
@@ -24,10 +35,12 @@
|
|
24
35
|
|
25
36
|
* Fix off-by-one bug in show_tasks width-computation [NeilW]
|
26
37
|
|
38
|
+
|
27
39
|
*1.3.1* (January 5, 2007)
|
28
40
|
|
29
41
|
* Fix connection problems when using gateways [Ezra Zygmuntowicz]
|
30
42
|
|
43
|
+
|
31
44
|
*1.3.0* (December 23, 2006)
|
32
45
|
|
33
46
|
* Deprecate rake integration in favor of invoking `cap' directly [Jamis Buck]
|
@@ -58,6 +71,7 @@
|
|
58
71
|
|
59
72
|
* Added :as option to sudo, so you can specify who the command is executed as [Mark Imbriaco]
|
60
73
|
|
74
|
+
|
61
75
|
*1.2.0* (September 14, 2006)
|
62
76
|
|
63
77
|
* Add experimental 'shell' task [Jamis Buck]
|
data/lib/capistrano/actor.rb
CHANGED
@@ -272,9 +272,9 @@ module Capistrano
|
|
272
272
|
if Capistrano::SFTP && options.fetch(:sftp, true)
|
273
273
|
execute_on_servers(options.merge(:once => true)) do |servers|
|
274
274
|
logger.debug "downloading #{servers.first}:#{remote_path} to #{path}"
|
275
|
-
sessions[servers.first].sftp
|
276
|
-
|
277
|
-
|
275
|
+
sftp = sessions[servers.first].sftp
|
276
|
+
sftp.connect unless sftp.state == :open
|
277
|
+
sftp.get_file remote_path, path
|
278
278
|
logger.trace "download finished"
|
279
279
|
end
|
280
280
|
else
|
data/lib/capistrano/command.rb
CHANGED
@@ -9,7 +9,7 @@ module Capistrano
|
|
9
9
|
|
10
10
|
def initialize(servers, command, callback, options, actor) #:nodoc:
|
11
11
|
@servers = servers
|
12
|
-
@command = command.strip.gsub(/\r?\n/, "\\\n")
|
12
|
+
@command = extract_environment(options) + command.strip.gsub(/\r?\n/, "\\\n")
|
13
13
|
@callback = callback
|
14
14
|
@options = options
|
15
15
|
@actor = actor
|
@@ -96,5 +96,18 @@ module Capistrano
|
|
96
96
|
end
|
97
97
|
end
|
98
98
|
end
|
99
|
+
|
100
|
+
# prepare a space-separated sequence of variables assignments
|
101
|
+
# intended to be prepended to a command, so the shell sets
|
102
|
+
# the environment before running the command.
|
103
|
+
# i.e.: options[:env] = {'PATH' => '/opt/ruby/bin:$PATH',
|
104
|
+
# 'TEST' => '( "quoted" )'}
|
105
|
+
# extract_environment(options) returns:
|
106
|
+
# "TEST=(\ \"quoted\"\ ) PATH=/opt/ruby/bin:$PATH"
|
107
|
+
def extract_environment(options)
|
108
|
+
Array(options[:env]).inject("") do |string, (name, value)|
|
109
|
+
string << %|#{name}=#{value.gsub(/"/, "\\\"").gsub(/ /, "\\ ")} |
|
110
|
+
end
|
111
|
+
end
|
99
112
|
end
|
100
113
|
end
|
@@ -68,6 +68,7 @@ module Capistrano
|
|
68
68
|
# actor. This is to allow uppercase "variables" to be set and referenced
|
69
69
|
# in recipes.
|
70
70
|
if variable.to_s[0].between?(?A, ?Z)
|
71
|
+
warn "[DEPRECATION] You setting an upper-cased variable, `#{variable}'. Variables should start with a lower-case letter. Support for upper-cased variables will be removed in version 2."
|
71
72
|
klass = @actor.metaclass
|
72
73
|
klass.send(:remove_const, variable) if klass.const_defined?(variable)
|
73
74
|
klass.const_set(variable, value)
|
@@ -80,7 +80,7 @@ module Capistrano
|
|
80
80
|
def authorization
|
81
81
|
username = configuration[:svn_username] ? "--username #{configuration[:svn_username]}" : ""
|
82
82
|
password = configuration[:svn_password] ? "--password #{configuration[:svn_password]}" : ""
|
83
|
-
"#{username} #{password}"
|
83
|
+
"--no-auth-cache #{username} #{password}"
|
84
84
|
end
|
85
85
|
|
86
86
|
def svn_log(path)
|
data/lib/capistrano/version.rb
CHANGED
data/test/scm/subversion_test.rb
CHANGED
@@ -78,7 +78,7 @@ MSG
|
|
78
78
|
@actor.story = []
|
79
79
|
assert_nothing_raised { @scm.checkout(@actor) }
|
80
80
|
assert_nil @actor.channels.last.sent_data
|
81
|
-
assert_match %r{/path/to/svn
|
81
|
+
assert_match %r{/path/to/svn\b.*\bco\b.* -q}, @actor.command
|
82
82
|
end
|
83
83
|
|
84
84
|
def test_checkout_via_export
|
@@ -86,14 +86,14 @@ MSG
|
|
86
86
|
@config[:checkout] = "export"
|
87
87
|
assert_nothing_raised { @scm.checkout(@actor) }
|
88
88
|
assert_nil @actor.channels.last.sent_data
|
89
|
-
assert_match %r{/path/to/svn
|
89
|
+
assert_match %r{/path/to/svn\b.*\bexport\b.* -q}, @actor.command
|
90
90
|
end
|
91
91
|
|
92
92
|
def test_update
|
93
93
|
@actor.story = []
|
94
94
|
assert_nothing_raised { @scm.update(@actor) }
|
95
95
|
assert_nil @actor.channels.last.sent_data
|
96
|
-
assert_match %r{/path/to/svn
|
96
|
+
assert_match %r{/path/to/svn\b.*\bup\b}, @actor.command
|
97
97
|
end
|
98
98
|
|
99
99
|
def test_checkout_needs_ssh_password
|
@@ -132,6 +132,6 @@ MSG
|
|
132
132
|
@config[:svn_username] = "turtledove"
|
133
133
|
assert_nothing_raised { @scm.checkout(@actor) }
|
134
134
|
assert_nil @actor.channels.last.sent_data
|
135
|
-
assert_match %r{/path/to/svn
|
135
|
+
assert_match %r{/path/to/svn\b.*\bco\b.* --username turtledove}, @actor.command
|
136
136
|
end
|
137
137
|
end
|
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.4.
|
7
|
-
date: 2007-02-
|
6
|
+
version: 1.4.1
|
7
|
+
date: 2007-02-24 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
|