capistrano 2.12.0 → 2.13.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. data/CHANGELOG +29 -1
  2. data/README.mdown +3 -2
  3. data/bin/capify +1 -3
  4. data/capistrano.gemspec +3 -3
  5. data/lib/capistrano/command.rb +1 -0
  6. data/lib/capistrano/configuration.rb +6 -1
  7. data/lib/capistrano/configuration/actions/inspect.rb +2 -2
  8. data/lib/capistrano/configuration/actions/invocation.rb +7 -0
  9. data/lib/capistrano/configuration/callbacks.rb +22 -4
  10. data/lib/capistrano/configuration/execution.rb +2 -3
  11. data/lib/capistrano/configuration/log_formatters.rb +71 -0
  12. data/lib/capistrano/configuration/namespaces.rb +20 -13
  13. data/lib/capistrano/logger.rb +98 -4
  14. data/lib/capistrano/recipes/deploy.rb +45 -83
  15. data/lib/capistrano/recipes/deploy/assets.rb +1 -1
  16. data/lib/capistrano/recipes/deploy/scm/git.rb +0 -1
  17. data/lib/capistrano/recipes/deploy/scm/none.rb +7 -0
  18. data/lib/capistrano/recipes/deploy/strategy/base.rb +1 -1
  19. data/lib/capistrano/shell.rb +4 -4
  20. data/lib/capistrano/version.rb +2 -7
  21. data/test/command_test.rb +8 -0
  22. data/test/configuration/actions/inspect_test.rb +13 -2
  23. data/test/configuration/actions/invocation_test.rb +6 -1
  24. data/test/configuration/callbacks_test.rb +24 -0
  25. data/test/configuration/namespace_dsl_test.rb +2 -2
  26. data/test/configuration_test.rb +1 -1
  27. data/test/deploy/scm/git_test.rb +1 -1
  28. data/test/deploy/strategy/copy_test.rb +2 -1
  29. data/test/logger_formatting_test.rb +94 -0
  30. data/test/logger_test.rb +12 -1
  31. metadata +51 -19
  32. data/lib/capistrano/recipes/deploy/templates/maintenance.rhtml +0 -53
  33. data/lib/capistrano/recipes/templates/maintenance.rhtml +0 -53
@@ -5,7 +5,8 @@ require 'stringio'
5
5
  class LoggerTest < Test::Unit::TestCase
6
6
  def setup
7
7
  @io = StringIO.new
8
- @logger = Capistrano::Logger.new(:output => @io)
8
+ # Turn off formatting for these tests. Formatting is tested in `logger_formatting_test.rb`.
9
+ @logger = Capistrano::Logger.new(:output => @io, :disable_formatters => true)
9
10
  end
10
11
 
11
12
  def test_logger_should_use_STDERR_by_default
@@ -13,6 +14,16 @@ class LoggerTest < Test::Unit::TestCase
13
14
  assert_equal STDERR, logger.device
14
15
  end
15
16
 
17
+ def test_logger_should_have_log_level_0
18
+ logger = Capistrano::Logger.new
19
+ assert_equal 0, logger.level
20
+ end
21
+
22
+ def test_logger_should_use_level_form_options
23
+ logger = Capistrano::Logger.new :level => 4
24
+ assert_equal 4, logger.level
25
+ end
26
+
16
27
  def test_logger_should_use_output_option_if_output_responds_to_puts
17
28
  logger = Capistrano::Logger.new(:output => STDOUT)
18
29
  assert_equal STDOUT, logger.device
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.0
4
+ version: 2.13.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-04-13 00:00:00.000000000 Z
13
+ date: 2012-10-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: highline
17
- requirement: &70100200770260 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,15 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70100200770260
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: '0'
26
31
  - !ruby/object:Gem::Dependency
27
32
  name: net-ssh
28
- requirement: &70100200769760 !ruby/object:Gem::Requirement
33
+ requirement: !ruby/object:Gem::Requirement
29
34
  none: false
30
35
  requirements:
31
36
  - - ! '>='
@@ -33,10 +38,15 @@ dependencies:
33
38
  version: 2.0.14
34
39
  type: :runtime
35
40
  prerelease: false
36
- version_requirements: *70100200769760
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: 2.0.14
37
47
  - !ruby/object:Gem::Dependency
38
48
  name: net-sftp
39
- requirement: &70100200769280 !ruby/object:Gem::Requirement
49
+ requirement: !ruby/object:Gem::Requirement
40
50
  none: false
41
51
  requirements:
42
52
  - - ! '>='
@@ -44,10 +54,15 @@ dependencies:
44
54
  version: 2.0.0
45
55
  type: :runtime
46
56
  prerelease: false
47
- version_requirements: *70100200769280
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: 2.0.0
48
63
  - !ruby/object:Gem::Dependency
49
64
  name: net-scp
50
- requirement: &70100200768800 !ruby/object:Gem::Requirement
65
+ requirement: !ruby/object:Gem::Requirement
51
66
  none: false
52
67
  requirements:
53
68
  - - ! '>='
@@ -55,10 +70,15 @@ dependencies:
55
70
  version: 1.0.0
56
71
  type: :runtime
57
72
  prerelease: false
58
- version_requirements: *70100200768800
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: 1.0.0
59
79
  - !ruby/object:Gem::Dependency
60
80
  name: net-ssh-gateway
61
- requirement: &70100200768320 !ruby/object:Gem::Requirement
81
+ requirement: !ruby/object:Gem::Requirement
62
82
  none: false
63
83
  requirements:
64
84
  - - ! '>='
@@ -66,18 +86,28 @@ dependencies:
66
86
  version: 1.1.0
67
87
  type: :runtime
68
88
  prerelease: false
69
- version_requirements: *70100200768320
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: 1.1.0
70
95
  - !ruby/object:Gem::Dependency
71
96
  name: mocha
72
- requirement: &70100200767840 !ruby/object:Gem::Requirement
97
+ requirement: !ruby/object:Gem::Requirement
73
98
  none: false
74
99
  requirements:
75
- - - ! '>='
100
+ - - '='
76
101
  - !ruby/object:Gem::Version
77
- version: '0'
102
+ version: 0.9.12
78
103
  type: :development
79
104
  prerelease: false
80
- version_requirements: *70100200767840
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - '='
109
+ - !ruby/object:Gem::Version
110
+ version: 0.9.12
81
111
  description: Capistrano is a utility and framework for executing commands in parallel
82
112
  on multiple remote machines, via SSH.
83
113
  email:
@@ -117,6 +147,7 @@ files:
117
147
  - lib/capistrano/configuration/connections.rb
118
148
  - lib/capistrano/configuration/execution.rb
119
149
  - lib/capistrano/configuration/loading.rb
150
+ - lib/capistrano/configuration/log_formatters.rb
120
151
  - lib/capistrano/configuration/namespaces.rb
121
152
  - lib/capistrano/configuration/roles.rb
122
153
  - lib/capistrano/configuration/servers.rb
@@ -153,9 +184,7 @@ files:
153
184
  - lib/capistrano/recipes/deploy/strategy/remote.rb
154
185
  - lib/capistrano/recipes/deploy/strategy/remote_cache.rb
155
186
  - lib/capistrano/recipes/deploy/strategy/unshared_remote_cache.rb
156
- - lib/capistrano/recipes/deploy/templates/maintenance.rhtml
157
187
  - lib/capistrano/recipes/standard.rb
158
- - lib/capistrano/recipes/templates/maintenance.rhtml
159
188
  - lib/capistrano/role.rb
160
189
  - lib/capistrano/server_definition.rb
161
190
  - lib/capistrano/shell.rb
@@ -198,6 +227,7 @@ files:
198
227
  - test/fixtures/cli_integration.rb
199
228
  - test/fixtures/config.rb
200
229
  - test/fixtures/custom.rb
230
+ - test/logger_formatting_test.rb
201
231
  - test/logger_test.rb
202
232
  - test/recipes_test.rb
203
233
  - test/role_test.rb
@@ -227,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
227
257
  version: '0'
228
258
  requirements: []
229
259
  rubyforge_project:
230
- rubygems_version: 1.8.11
260
+ rubygems_version: 1.8.23
231
261
  signing_key:
232
262
  specification_version: 3
233
263
  summary: Capistrano - Welcome to easy deployment with Ruby over SSH
@@ -267,6 +297,7 @@ test_files:
267
297
  - test/fixtures/cli_integration.rb
268
298
  - test/fixtures/config.rb
269
299
  - test/fixtures/custom.rb
300
+ - test/logger_formatting_test.rb
270
301
  - test/logger_test.rb
271
302
  - test/recipes_test.rb
272
303
  - test/role_test.rb
@@ -276,3 +307,4 @@ test_files:
276
307
  - test/task_definition_test.rb
277
308
  - test/transfer_test.rb
278
309
  - test/utils.rb
310
+ has_rdoc:
@@ -1,53 +0,0 @@
1
-
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
-
5
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
-
7
- <head>
8
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
9
- <title>System down for maintenance</title>
10
-
11
- <style type="text/css">
12
- div.outer {
13
- position: absolute;
14
- left: 50%;
15
- top: 50%;
16
- width: 500px;
17
- height: 300px;
18
- margin-left: -260px;
19
- margin-top: -150px;
20
- }
21
-
22
- .DialogBody {
23
- margin: 0;
24
- padding: 10px;
25
- text-align: left;
26
- border: 1px solid #ccc;
27
- border-right: 1px solid #999;
28
- border-bottom: 1px solid #999;
29
- background-color: #fff;
30
- }
31
-
32
- body { background-color: #fff; }
33
- </style>
34
- </head>
35
-
36
- <body>
37
-
38
- <div class="outer">
39
- <div class="DialogBody" style="text-align: center;">
40
- <div style="text-align: center; width: 200px; margin: 0 auto;">
41
- <p style="color: red; font-size: 16px; line-height: 20px;">
42
- The system is down for <%= reason ? reason : "maintenance" %>
43
- as of <%= Time.now.strftime("%H:%M %Z") %>.
44
- </p>
45
- <p style="color: #666;">
46
- It'll be back <%= deadline ? deadline : "shortly" %>.
47
- </p>
48
- </div>
49
- </div>
50
- </div>
51
-
52
- </body>
53
- </html>
@@ -1,53 +0,0 @@
1
-
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
-
5
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
-
7
- <head>
8
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
9
- <title>System down for maintenance</title>
10
-
11
- <style type="text/css">
12
- div.outer {
13
- position: absolute;
14
- left: 50%;
15
- top: 50%;
16
- width: 500px;
17
- height: 300px;
18
- margin-left: -260px;
19
- margin-top: -150px;
20
- }
21
-
22
- .DialogBody {
23
- margin: 0;
24
- padding: 10px;
25
- text-align: left;
26
- border: 1px solid #ccc;
27
- border-right: 1px solid #999;
28
- border-bottom: 1px solid #999;
29
- background-color: #fff;
30
- }
31
-
32
- body { background-color: #fff; }
33
- </style>
34
- </head>
35
-
36
- <body>
37
-
38
- <div class="outer">
39
- <div class="DialogBody" style="text-align: center;">
40
- <div style="text-align: center; width: 200px; margin: 0 auto;">
41
- <p style="color: red; font-size: 16px; line-height: 20px;">
42
- The system is down for <%= reason ? reason : "maintenance" %>
43
- as of <%= Time.now.strftime("%H:%M %Z") %>.
44
- </p>
45
- <p style="color: #666;">
46
- It'll be back <%= deadline ? deadline : "shortly" %>.
47
- </p>
48
- </div>
49
- </div>
50
- </div>
51
-
52
- </body>
53
- </html>