capistrano 2.14.2 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.travis.yml +1 -0
- data/CHANGELOG +49 -8
- data/Gemfile +1 -1
- data/README.md +4 -4
- data/capistrano.gemspec +9 -17
- data/lib/capistrano/callback.rb +1 -1
- data/lib/capistrano/cli.rb +1 -1
- data/lib/capistrano/cli/execute.rb +3 -3
- data/lib/capistrano/cli/help.rb +3 -3
- data/lib/capistrano/cli/help.txt +23 -23
- data/lib/capistrano/cli/options.rb +12 -12
- data/lib/capistrano/command.rb +20 -7
- data/lib/capistrano/configuration/actions/invocation.rb +23 -11
- data/lib/capistrano/configuration/connections.rb +22 -15
- data/lib/capistrano/configuration/execution.rb +2 -2
- data/lib/capistrano/configuration/loading.rb +2 -2
- data/lib/capistrano/configuration/log_formatters.rb +5 -1
- data/lib/capistrano/configuration/roles.rb +1 -1
- data/lib/capistrano/configuration/servers.rb +6 -6
- data/lib/capistrano/errors.rb +4 -4
- data/lib/capistrano/ext/multistage.rb +2 -2
- data/lib/capistrano/logger.rb +14 -1
- data/lib/capistrano/recipes/deploy.rb +94 -27
- data/lib/capistrano/recipes/deploy/assets.rb +21 -18
- data/lib/capistrano/recipes/deploy/dependencies.rb +2 -2
- data/lib/capistrano/recipes/deploy/remote_dependency.rb +11 -11
- data/lib/capistrano/recipes/deploy/scm.rb +1 -1
- data/lib/capistrano/recipes/deploy/scm/accurev.rb +6 -6
- data/lib/capistrano/recipes/deploy/scm/cvs.rb +4 -4
- data/lib/capistrano/recipes/deploy/scm/darcs.rb +3 -3
- data/lib/capistrano/recipes/deploy/scm/git.rb +3 -0
- data/lib/capistrano/recipes/deploy/scm/mercurial.rb +3 -3
- data/lib/capistrano/recipes/deploy/scm/none.rb +9 -5
- data/lib/capistrano/recipes/deploy/scm/perforce.rb +5 -5
- data/lib/capistrano/recipes/deploy/scm/subversion.rb +1 -1
- data/lib/capistrano/recipes/deploy/strategy.rb +1 -1
- data/lib/capistrano/recipes/deploy/strategy/base.rb +5 -1
- data/lib/capistrano/recipes/deploy/strategy/copy.rb +14 -2
- data/lib/capistrano/recipes/standard.rb +1 -1
- data/lib/capistrano/server_definition.rb +1 -1
- data/lib/capistrano/shell.rb +4 -1
- data/lib/capistrano/ssh.rb +1 -1
- data/lib/capistrano/version.rb +2 -2
- data/test/cli/options_test.rb +1 -1
- data/test/cli/ui_test.rb +1 -1
- data/test/command_test.rb +11 -1
- data/test/configuration/actions/invocation_test.rb +5 -1
- data/test/configuration/callbacks_test.rb +1 -1
- data/test/configuration/connections_test.rb +19 -0
- data/test/configuration/execution_test.rb +1 -1
- data/test/configuration/namespace_dsl_test.rb +6 -6
- data/test/configuration/roles_test.rb +2 -2
- data/test/configuration/servers_test.rb +12 -12
- data/test/configuration/variables_test.rb +3 -3
- data/test/deploy/scm/bzr_test.rb +1 -1
- data/test/deploy/scm/darcs_test.rb +2 -2
- data/test/deploy/scm/git_test.rb +10 -0
- data/test/deploy/scm/mercurial_test.rb +3 -3
- data/test/deploy/scm/perforce_test.rb +1 -1
- data/test/deploy/strategy/copy_test.rb +25 -1
- data/test/extensions_test.rb +1 -1
- data/test/logger_formatting_test.rb +56 -1
- data/test/recipes_test.rb +1 -1
- data/test/server_definition_test.rb +2 -2
- data/test/shell_test.rb +12 -6
- data/test/transfer_test.rb +1 -1
- metadata +63 -31
data/test/extensions_test.rb
CHANGED
@@ -91,4 +91,59 @@ class LoggerFormattingTest < Test::Unit::TestCase
|
|
91
91
|
@io.stubs(:tty?).returns(true)
|
92
92
|
@logger.device = @io
|
93
93
|
end
|
94
|
-
end
|
94
|
+
end
|
95
|
+
|
96
|
+
class DefaultLoggerFormattersTest < Test::Unit::TestCase
|
97
|
+
def setup
|
98
|
+
@expected_default_formatter_values = [
|
99
|
+
# TRACE
|
100
|
+
{ :match => /command finished/, :color => :white, :style => :dim, :level => 3, :priority => -10 },
|
101
|
+
{ :match => /executing locally/, :color => :yellow, :level => 3, :priority => -20 },
|
102
|
+
|
103
|
+
# DEBUG
|
104
|
+
{ :match => /executing `.*/, :color => :green, :level => 2, :priority => -10, :timestamp => true },
|
105
|
+
{ :match => /.*/, :color => :yellow, :level => 2, :priority => -30 },
|
106
|
+
|
107
|
+
# INFO
|
108
|
+
{ :match => /.*out\] (fatal:|ERROR:).*/, :color => :red, :level => 1, :priority => -10 },
|
109
|
+
{ :match => /Permission denied/, :color => :red, :level => 1, :priority => -20 },
|
110
|
+
{ :match => /sh: .+: command not found/, :color => :magenta, :level => 1, :priority => -30 },
|
111
|
+
|
112
|
+
# IMPORTANT
|
113
|
+
{ :match => /^err ::/, :color => :red, :level => 0, :priority => -10 },
|
114
|
+
{ :match => /.*/, :color => :blue, :level => 0, :priority => -20 }
|
115
|
+
]
|
116
|
+
|
117
|
+
@custom_default_formatter_values = [
|
118
|
+
{ :match => /.*/, :color => :white }
|
119
|
+
]
|
120
|
+
|
121
|
+
end
|
122
|
+
|
123
|
+
def test_default_formatters_api
|
124
|
+
assert Capistrano::Logger.respond_to? :default_formatters
|
125
|
+
assert Capistrano::Logger.respond_to? :default_formatters=
|
126
|
+
end
|
127
|
+
|
128
|
+
def test_default_formatters_values
|
129
|
+
assert_equal @expected_default_formatter_values, Capistrano::Logger.default_formatters
|
130
|
+
assert_equal @expected_default_formatter_values, Capistrano::Logger.instance_variable_get("@formatters")
|
131
|
+
assert_equal nil, Capistrano::Logger.instance_variable_get("@sorted_formatters")
|
132
|
+
end
|
133
|
+
|
134
|
+
def test_set_default_formatters_values
|
135
|
+
# when given an array
|
136
|
+
Capistrano::Logger.default_formatters = @custom_default_formatter_values
|
137
|
+
|
138
|
+
assert_equal @custom_default_formatter_values, Capistrano::Logger.default_formatters
|
139
|
+
Capistrano::Logger.default_formatters = @custom_default_formatter_values
|
140
|
+
assert_equal @custom_default_formatter_values, Capistrano::Logger.instance_variable_get("@formatters")
|
141
|
+
assert_equal nil, Capistrano::Logger.instance_variable_get("@sorted_formatters")
|
142
|
+
|
143
|
+
# when given a single formatter values hash
|
144
|
+
Capistrano::Logger.default_formatters = @custom_default_formatter_values.first
|
145
|
+
|
146
|
+
assert_equal @custom_default_formatter_values, Capistrano::Logger.default_formatters
|
147
|
+
end
|
148
|
+
|
149
|
+
end
|
data/test/recipes_test.rb
CHANGED
@@ -62,11 +62,11 @@ class ServerDefinitionTest < Test::Unit::TestCase
|
|
62
62
|
server = Capistrano::ServerDefinition.new("www.capistrano.test", :primary => true)
|
63
63
|
assert_equal true, server.options[:primary]
|
64
64
|
end
|
65
|
-
|
65
|
+
|
66
66
|
def test_default_user_should_try_to_guess_username
|
67
67
|
ENV.stubs(:[]).returns(nil)
|
68
68
|
assert_equal "not-specified", Capistrano::ServerDefinition.default_user
|
69
|
-
|
69
|
+
|
70
70
|
ENV.stubs(:[]).returns(nil)
|
71
71
|
ENV.stubs(:[]).with("USERNAME").returns("ryan")
|
72
72
|
assert_equal "ryan", Capistrano::ServerDefinition.default_user
|
data/test/shell_test.rb
CHANGED
@@ -44,6 +44,12 @@ class ShellTest < Test::Unit::TestCase
|
|
44
44
|
assert @shell.read_and_execute
|
45
45
|
end
|
46
46
|
|
47
|
+
def test_set_with_colon_changes_setting
|
48
|
+
@shell.expects(:read_line).returns("set :random_setting value")
|
49
|
+
@shell.configuration.expects(:set).with(:random_setting, "value")
|
50
|
+
assert @shell.read_and_execute
|
51
|
+
end
|
52
|
+
|
47
53
|
def test_text_without_with_or_on_gets_processed_verbatim
|
48
54
|
@shell.expects(:read_line).returns("hello world")
|
49
55
|
@shell.expects(:process_command).with(nil, nil, "hello world")
|
@@ -61,7 +67,7 @@ class ShellTest < Test::Unit::TestCase
|
|
61
67
|
@shell.expects(:process_command).with("on", "app,db", "hello world")
|
62
68
|
assert @shell.read_and_execute
|
63
69
|
end
|
64
|
-
|
70
|
+
|
65
71
|
def test_task_command_with_bang_gets_processed_by_exec_tasks
|
66
72
|
while_testing_post_exec_commands do
|
67
73
|
@shell.expects(:read_line).returns("!deploy")
|
@@ -69,7 +75,7 @@ class ShellTest < Test::Unit::TestCase
|
|
69
75
|
assert @shell.read_and_execute
|
70
76
|
end
|
71
77
|
end
|
72
|
-
|
78
|
+
|
73
79
|
def test_normal_command_gets_processed_by_exec_command
|
74
80
|
while_testing_post_exec_commands do
|
75
81
|
@shell.expects(:read_line).returns("uptime")
|
@@ -78,13 +84,13 @@ class ShellTest < Test::Unit::TestCase
|
|
78
84
|
assert @shell.read_and_execute
|
79
85
|
end
|
80
86
|
end
|
81
|
-
|
82
|
-
|
87
|
+
|
88
|
+
|
83
89
|
private
|
84
|
-
|
90
|
+
|
85
91
|
def while_testing_post_exec_commands(&block)
|
86
92
|
@shell.instance_variable_set(:@mutex,Mutex.new)
|
87
93
|
yield
|
88
94
|
end
|
89
|
-
|
95
|
+
|
90
96
|
end
|
data/test/transfer_test.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
5
|
-
prerelease:
|
4
|
+
version: 2.15.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jamis Buck
|
@@ -10,92 +9,81 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2013-
|
12
|
+
date: 2013-04-23 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: highline
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- -
|
18
|
+
- - '>='
|
21
19
|
- !ruby/object:Gem::Version
|
22
20
|
version: '0'
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
|
-
- -
|
25
|
+
- - '>='
|
29
26
|
- !ruby/object:Gem::Version
|
30
27
|
version: '0'
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: net-ssh
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
|
-
- -
|
32
|
+
- - '>='
|
37
33
|
- !ruby/object:Gem::Version
|
38
34
|
version: 2.0.14
|
39
35
|
type: :runtime
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
|
-
- -
|
39
|
+
- - '>='
|
45
40
|
- !ruby/object:Gem::Version
|
46
41
|
version: 2.0.14
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: net-sftp
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
|
-
- -
|
46
|
+
- - '>='
|
53
47
|
- !ruby/object:Gem::Version
|
54
48
|
version: 2.0.0
|
55
49
|
type: :runtime
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
|
-
- -
|
53
|
+
- - '>='
|
61
54
|
- !ruby/object:Gem::Version
|
62
55
|
version: 2.0.0
|
63
56
|
- !ruby/object:Gem::Dependency
|
64
57
|
name: net-scp
|
65
58
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
59
|
requirements:
|
68
|
-
- -
|
60
|
+
- - '>='
|
69
61
|
- !ruby/object:Gem::Version
|
70
62
|
version: 1.0.0
|
71
63
|
type: :runtime
|
72
64
|
prerelease: false
|
73
65
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
66
|
requirements:
|
76
|
-
- -
|
67
|
+
- - '>='
|
77
68
|
- !ruby/object:Gem::Version
|
78
69
|
version: 1.0.0
|
79
70
|
- !ruby/object:Gem::Dependency
|
80
71
|
name: net-ssh-gateway
|
81
72
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
73
|
requirements:
|
84
|
-
- -
|
74
|
+
- - '>='
|
85
75
|
- !ruby/object:Gem::Version
|
86
76
|
version: 1.1.0
|
87
77
|
type: :runtime
|
88
78
|
prerelease: false
|
89
79
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
80
|
requirements:
|
92
|
-
- -
|
81
|
+
- - '>='
|
93
82
|
- !ruby/object:Gem::Version
|
94
83
|
version: 1.1.0
|
95
84
|
- !ruby/object:Gem::Dependency
|
96
85
|
name: mocha
|
97
86
|
requirement: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
87
|
requirements:
|
100
88
|
- - '='
|
101
89
|
- !ruby/object:Gem::Version
|
@@ -103,7 +91,6 @@ dependencies:
|
|
103
91
|
type: :development
|
104
92
|
prerelease: false
|
105
93
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
94
|
requirements:
|
108
95
|
- - '='
|
109
96
|
- !ruby/object:Gem::Version
|
@@ -239,26 +226,71 @@ files:
|
|
239
226
|
- test/utils.rb
|
240
227
|
homepage: http://github.com/capistrano/capistrano
|
241
228
|
licenses: []
|
229
|
+
metadata: {}
|
242
230
|
post_install_message:
|
243
231
|
rdoc_options: []
|
244
232
|
require_paths:
|
245
233
|
- lib
|
246
234
|
required_ruby_version: !ruby/object:Gem::Requirement
|
247
|
-
none: false
|
248
235
|
requirements:
|
249
|
-
- -
|
236
|
+
- - '>='
|
250
237
|
- !ruby/object:Gem::Version
|
251
238
|
version: '0'
|
252
239
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
253
|
-
none: false
|
254
240
|
requirements:
|
255
|
-
- -
|
241
|
+
- - '>='
|
256
242
|
- !ruby/object:Gem::Version
|
257
243
|
version: '0'
|
258
244
|
requirements: []
|
259
245
|
rubyforge_project:
|
260
|
-
rubygems_version:
|
246
|
+
rubygems_version: 2.0.3
|
261
247
|
signing_key:
|
262
248
|
specification_version: 3
|
263
249
|
summary: Capistrano - Welcome to easy deployment with Ruby over SSH
|
264
|
-
test_files:
|
250
|
+
test_files:
|
251
|
+
- test/cli/execute_test.rb
|
252
|
+
- test/cli/help_test.rb
|
253
|
+
- test/cli/options_test.rb
|
254
|
+
- test/cli/ui_test.rb
|
255
|
+
- test/cli_test.rb
|
256
|
+
- test/command_test.rb
|
257
|
+
- test/configuration/actions/file_transfer_test.rb
|
258
|
+
- test/configuration/actions/inspect_test.rb
|
259
|
+
- test/configuration/actions/invocation_test.rb
|
260
|
+
- test/configuration/alias_task_test.rb
|
261
|
+
- test/configuration/callbacks_test.rb
|
262
|
+
- test/configuration/connections_test.rb
|
263
|
+
- test/configuration/execution_test.rb
|
264
|
+
- test/configuration/loading_test.rb
|
265
|
+
- test/configuration/namespace_dsl_test.rb
|
266
|
+
- test/configuration/roles_test.rb
|
267
|
+
- test/configuration/servers_test.rb
|
268
|
+
- test/configuration/variables_test.rb
|
269
|
+
- test/configuration_test.rb
|
270
|
+
- test/deploy/local_dependency_test.rb
|
271
|
+
- test/deploy/remote_dependency_test.rb
|
272
|
+
- test/deploy/scm/accurev_test.rb
|
273
|
+
- test/deploy/scm/base_test.rb
|
274
|
+
- test/deploy/scm/bzr_test.rb
|
275
|
+
- test/deploy/scm/darcs_test.rb
|
276
|
+
- test/deploy/scm/git_test.rb
|
277
|
+
- test/deploy/scm/mercurial_test.rb
|
278
|
+
- test/deploy/scm/none_test.rb
|
279
|
+
- test/deploy/scm/perforce_test.rb
|
280
|
+
- test/deploy/scm/subversion_test.rb
|
281
|
+
- test/deploy/strategy/copy_test.rb
|
282
|
+
- test/extensions_test.rb
|
283
|
+
- test/fixtures/cli_integration.rb
|
284
|
+
- test/fixtures/config.rb
|
285
|
+
- test/fixtures/custom.rb
|
286
|
+
- test/logger_formatting_test.rb
|
287
|
+
- test/logger_test.rb
|
288
|
+
- test/recipes_test.rb
|
289
|
+
- test/role_test.rb
|
290
|
+
- test/server_definition_test.rb
|
291
|
+
- test/shell_test.rb
|
292
|
+
- test/ssh_test.rb
|
293
|
+
- test/task_definition_test.rb
|
294
|
+
- test/transfer_test.rb
|
295
|
+
- test/utils.rb
|
296
|
+
has_rdoc:
|