capistrano 3.4.0 → 3.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +129 -0
- data/.github/issue_template.md +19 -0
- data/.github/pull_request_template.md +22 -0
- data/.github/release-drafter.yml +17 -0
- data/.github/workflows/push.yml +12 -0
- data/.gitignore +8 -5
- data/.rubocop.yml +62 -0
- data/CHANGELOG.md +1 -307
- data/CONTRIBUTING.md +63 -93
- data/DEVELOPMENT.md +127 -0
- data/Dangerfile +1 -0
- data/Gemfile +40 -3
- data/LICENSE.txt +1 -1
- data/README.md +127 -44
- data/RELEASING.md +17 -0
- data/Rakefile +13 -2
- data/UPGRADING-3.7.md +86 -0
- data/bin/cap +1 -1
- data/capistrano.gemspec +21 -24
- data/features/deploy.feature +35 -1
- data/features/doctor.feature +11 -0
- data/features/installation.feature +8 -3
- data/features/stage_failure.feature +9 -0
- data/features/step_definitions/assertions.rb +51 -18
- data/features/step_definitions/cap_commands.rb +9 -0
- data/features/step_definitions/setup.rb +53 -9
- data/features/subdirectory.feature +9 -0
- data/features/support/env.rb +5 -5
- data/features/support/remote_command_helpers.rb +12 -6
- data/features/support/vagrant_helpers.rb +17 -11
- data/lib/Capfile +1 -1
- data/lib/capistrano/all.rb +10 -10
- data/lib/capistrano/application.rb +47 -34
- data/lib/capistrano/configuration/empty_filter.rb +9 -0
- data/lib/capistrano/configuration/filter.rb +17 -47
- data/lib/capistrano/configuration/host_filter.rb +29 -0
- data/lib/capistrano/configuration/null_filter.rb +9 -0
- data/lib/capistrano/configuration/plugin_installer.rb +51 -0
- data/lib/capistrano/configuration/question.rb +31 -9
- data/lib/capistrano/configuration/role_filter.rb +29 -0
- data/lib/capistrano/configuration/scm_resolver.rb +149 -0
- data/lib/capistrano/configuration/server.rb +29 -23
- data/lib/capistrano/configuration/servers.rb +21 -14
- data/lib/capistrano/configuration/validated_variables.rb +110 -0
- data/lib/capistrano/configuration/variables.rb +112 -0
- data/lib/capistrano/configuration.rb +91 -44
- data/lib/capistrano/defaults.rb +26 -4
- data/lib/capistrano/deploy.rb +1 -1
- data/lib/capistrano/doctor/environment_doctor.rb +19 -0
- data/lib/capistrano/doctor/gems_doctor.rb +45 -0
- data/lib/capistrano/doctor/output_helpers.rb +79 -0
- data/lib/capistrano/doctor/servers_doctor.rb +105 -0
- data/lib/capistrano/doctor/variables_doctor.rb +74 -0
- data/lib/capistrano/doctor.rb +6 -0
- data/lib/capistrano/dotfile.rb +1 -2
- data/lib/capistrano/dsl/env.rb +9 -47
- data/lib/capistrano/dsl/paths.rb +11 -25
- data/lib/capistrano/dsl/stages.rb +14 -2
- data/lib/capistrano/dsl/task_enhancements.rb +7 -12
- data/lib/capistrano/dsl.rb +47 -16
- data/lib/capistrano/framework.rb +1 -1
- data/lib/capistrano/i18n.rb +32 -24
- data/lib/capistrano/immutable_task.rb +30 -0
- data/lib/capistrano/install.rb +1 -1
- data/lib/capistrano/plugin.rb +95 -0
- data/lib/capistrano/proc_helpers.rb +13 -0
- data/lib/capistrano/scm/git.rb +100 -0
- data/lib/capistrano/scm/hg.rb +55 -0
- data/lib/capistrano/scm/plugin.rb +13 -0
- data/lib/capistrano/scm/svn.rb +56 -0
- data/lib/capistrano/scm/tasks/git.rake +73 -0
- data/lib/capistrano/scm/tasks/hg.rake +53 -0
- data/lib/capistrano/scm/tasks/svn.rake +53 -0
- data/lib/capistrano/scm.rb +7 -20
- data/lib/capistrano/setup.rb +20 -6
- data/lib/capistrano/tasks/console.rake +4 -8
- data/lib/capistrano/tasks/deploy.rake +105 -73
- data/lib/capistrano/tasks/doctor.rake +24 -0
- data/lib/capistrano/tasks/framework.rake +13 -14
- data/lib/capistrano/tasks/install.rake +14 -15
- data/lib/capistrano/templates/Capfile +21 -10
- data/lib/capistrano/templates/deploy.rb.erb +17 -26
- data/lib/capistrano/templates/stage.rb.erb +9 -9
- data/lib/capistrano/upload_task.rb +1 -1
- data/lib/capistrano/version.rb +1 -1
- data/lib/capistrano/version_validator.rb +5 -10
- data/spec/integration/dsl_spec.rb +289 -240
- data/spec/integration_spec_helper.rb +3 -5
- data/spec/lib/capistrano/application_spec.rb +23 -39
- data/spec/lib/capistrano/configuration/empty_filter_spec.rb +17 -0
- data/spec/lib/capistrano/configuration/filter_spec.rb +83 -85
- data/spec/lib/capistrano/configuration/host_filter_spec.rb +71 -0
- data/spec/lib/capistrano/configuration/null_filter_spec.rb +17 -0
- data/spec/lib/capistrano/configuration/plugin_installer_spec.rb +98 -0
- data/spec/lib/capistrano/configuration/question_spec.rb +58 -26
- data/spec/lib/capistrano/configuration/role_filter_spec.rb +80 -0
- data/spec/lib/capistrano/configuration/scm_resolver_spec.rb +55 -0
- data/spec/lib/capistrano/configuration/server_spec.rb +106 -113
- data/spec/lib/capistrano/configuration/servers_spec.rb +129 -145
- data/spec/lib/capistrano/configuration_spec.rb +224 -63
- data/spec/lib/capistrano/doctor/environment_doctor_spec.rb +44 -0
- data/spec/lib/capistrano/doctor/gems_doctor_spec.rb +67 -0
- data/spec/lib/capistrano/doctor/output_helpers_spec.rb +47 -0
- data/spec/lib/capistrano/doctor/servers_doctor_spec.rb +86 -0
- data/spec/lib/capistrano/doctor/variables_doctor_spec.rb +89 -0
- data/spec/lib/capistrano/dsl/paths_spec.rb +97 -59
- data/spec/lib/capistrano/dsl/task_enhancements_spec.rb +57 -37
- data/spec/lib/capistrano/dsl_spec.rb +84 -11
- data/spec/lib/capistrano/immutable_task_spec.rb +31 -0
- data/spec/lib/capistrano/plugin_spec.rb +84 -0
- data/spec/lib/capistrano/scm/git_spec.rb +184 -0
- data/spec/lib/capistrano/scm/hg_spec.rb +109 -0
- data/spec/lib/capistrano/scm/svn_spec.rb +137 -0
- data/spec/lib/capistrano/scm_spec.rb +7 -8
- data/spec/lib/capistrano/upload_task_spec.rb +7 -7
- data/spec/lib/capistrano/version_validator_spec.rb +61 -46
- data/spec/lib/capistrano_spec.rb +2 -3
- data/spec/spec_helper.rb +21 -8
- data/spec/support/Vagrantfile +9 -10
- data/spec/support/tasks/database.rake +3 -3
- data/spec/support/tasks/fail.rake +4 -3
- data/spec/support/tasks/failed.rake +2 -2
- data/spec/support/tasks/plugin.rake +6 -0
- data/spec/support/tasks/root.rake +4 -4
- data/spec/support/test_app.rb +64 -39
- metadata +100 -55
- data/.travis.yml +0 -13
- data/features/remote_file_task.feature +0 -14
- data/lib/capistrano/git.rb +0 -46
- data/lib/capistrano/hg.rb +0 -43
- data/lib/capistrano/svn.rb +0 -38
- data/lib/capistrano/tasks/git.rake +0 -81
- data/lib/capistrano/tasks/hg.rake +0 -52
- data/lib/capistrano/tasks/svn.rake +0 -52
- data/spec/lib/capistrano/git_spec.rb +0 -81
- data/spec/lib/capistrano/hg_spec.rb +0 -81
- data/spec/lib/capistrano/svn_spec.rb +0 -79
metadata
CHANGED
@@ -1,44 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.17.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Clements
|
8
8
|
- Lee Hambley
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-08-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
requirements:
|
18
|
-
- - "~>"
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '1.3'
|
21
|
-
type: :runtime
|
22
|
-
prerelease: false
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - "~>"
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
version: '1.3'
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: rake
|
15
|
+
name: airbrussh
|
30
16
|
requirement: !ruby/object:Gem::Requirement
|
31
17
|
requirements:
|
32
18
|
- - ">="
|
33
19
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
20
|
+
version: 1.0.0
|
35
21
|
type: :runtime
|
36
22
|
prerelease: false
|
37
23
|
version_requirements: !ruby/object:Gem::Requirement
|
38
24
|
requirements:
|
39
25
|
- - ">="
|
40
26
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
27
|
+
version: 1.0.0
|
42
28
|
- !ruby/object:Gem::Dependency
|
43
29
|
name: i18n
|
44
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -54,33 +40,33 @@ dependencies:
|
|
54
40
|
- !ruby/object:Gem::Version
|
55
41
|
version: '0'
|
56
42
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
43
|
+
name: rake
|
58
44
|
requirement: !ruby/object:Gem::Requirement
|
59
45
|
requirements:
|
60
46
|
- - ">="
|
61
47
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
63
|
-
type: :
|
48
|
+
version: 10.0.0
|
49
|
+
type: :runtime
|
64
50
|
prerelease: false
|
65
51
|
version_requirements: !ruby/object:Gem::Requirement
|
66
52
|
requirements:
|
67
53
|
- - ">="
|
68
54
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
55
|
+
version: 10.0.0
|
70
56
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
57
|
+
name: sshkit
|
72
58
|
requirement: !ruby/object:Gem::Requirement
|
73
59
|
requirements:
|
74
60
|
- - ">="
|
75
61
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
77
|
-
type: :
|
62
|
+
version: 1.9.0
|
63
|
+
type: :runtime
|
78
64
|
prerelease: false
|
79
65
|
version_requirements: !ruby/object:Gem::Requirement
|
80
66
|
requirements:
|
81
67
|
- - ">="
|
82
68
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
69
|
+
version: 1.9.0
|
84
70
|
description: Capistrano is a utility and framework for executing commands in parallel
|
85
71
|
on multiple remote machines, via SSH.
|
86
72
|
email:
|
@@ -92,26 +78,37 @@ executables:
|
|
92
78
|
extensions: []
|
93
79
|
extra_rdoc_files: []
|
94
80
|
files:
|
81
|
+
- ".circleci/config.yml"
|
82
|
+
- ".github/issue_template.md"
|
83
|
+
- ".github/pull_request_template.md"
|
84
|
+
- ".github/release-drafter.yml"
|
85
|
+
- ".github/workflows/push.yml"
|
95
86
|
- ".gitignore"
|
96
|
-
- ".
|
87
|
+
- ".rubocop.yml"
|
97
88
|
- CHANGELOG.md
|
98
89
|
- CONTRIBUTING.md
|
90
|
+
- DEVELOPMENT.md
|
91
|
+
- Dangerfile
|
99
92
|
- Gemfile
|
100
93
|
- LICENSE.txt
|
101
94
|
- README.md
|
95
|
+
- RELEASING.md
|
102
96
|
- Rakefile
|
97
|
+
- UPGRADING-3.7.md
|
103
98
|
- bin/cap
|
104
99
|
- bin/capify
|
105
100
|
- capistrano.gemspec
|
106
101
|
- features/configuration.feature
|
107
102
|
- features/deploy.feature
|
108
103
|
- features/deploy_failure.feature
|
104
|
+
- features/doctor.feature
|
109
105
|
- features/installation.feature
|
110
|
-
- features/remote_file_task.feature
|
111
106
|
- features/sshconnect.feature
|
107
|
+
- features/stage_failure.feature
|
112
108
|
- features/step_definitions/assertions.rb
|
113
109
|
- features/step_definitions/cap_commands.rb
|
114
110
|
- features/step_definitions/setup.rb
|
111
|
+
- features/subdirectory.feature
|
115
112
|
- features/support/env.rb
|
116
113
|
- features/support/remote_command_helpers.rb
|
117
114
|
- features/support/vagrant_helpers.rb
|
@@ -120,13 +117,27 @@ files:
|
|
120
117
|
- lib/capistrano/all.rb
|
121
118
|
- lib/capistrano/application.rb
|
122
119
|
- lib/capistrano/configuration.rb
|
120
|
+
- lib/capistrano/configuration/empty_filter.rb
|
123
121
|
- lib/capistrano/configuration/filter.rb
|
122
|
+
- lib/capistrano/configuration/host_filter.rb
|
123
|
+
- lib/capistrano/configuration/null_filter.rb
|
124
|
+
- lib/capistrano/configuration/plugin_installer.rb
|
124
125
|
- lib/capistrano/configuration/question.rb
|
126
|
+
- lib/capistrano/configuration/role_filter.rb
|
127
|
+
- lib/capistrano/configuration/scm_resolver.rb
|
125
128
|
- lib/capistrano/configuration/server.rb
|
126
129
|
- lib/capistrano/configuration/servers.rb
|
130
|
+
- lib/capistrano/configuration/validated_variables.rb
|
131
|
+
- lib/capistrano/configuration/variables.rb
|
127
132
|
- lib/capistrano/console.rb
|
128
133
|
- lib/capistrano/defaults.rb
|
129
134
|
- lib/capistrano/deploy.rb
|
135
|
+
- lib/capistrano/doctor.rb
|
136
|
+
- lib/capistrano/doctor/environment_doctor.rb
|
137
|
+
- lib/capistrano/doctor/gems_doctor.rb
|
138
|
+
- lib/capistrano/doctor/output_helpers.rb
|
139
|
+
- lib/capistrano/doctor/servers_doctor.rb
|
140
|
+
- lib/capistrano/doctor/variables_doctor.rb
|
130
141
|
- lib/capistrano/dotfile.rb
|
131
142
|
- lib/capistrano/dsl.rb
|
132
143
|
- lib/capistrano/dsl/env.rb
|
@@ -134,20 +145,25 @@ files:
|
|
134
145
|
- lib/capistrano/dsl/stages.rb
|
135
146
|
- lib/capistrano/dsl/task_enhancements.rb
|
136
147
|
- lib/capistrano/framework.rb
|
137
|
-
- lib/capistrano/git.rb
|
138
|
-
- lib/capistrano/hg.rb
|
139
148
|
- lib/capistrano/i18n.rb
|
149
|
+
- lib/capistrano/immutable_task.rb
|
140
150
|
- lib/capistrano/install.rb
|
151
|
+
- lib/capistrano/plugin.rb
|
152
|
+
- lib/capistrano/proc_helpers.rb
|
141
153
|
- lib/capistrano/scm.rb
|
154
|
+
- lib/capistrano/scm/git.rb
|
155
|
+
- lib/capistrano/scm/hg.rb
|
156
|
+
- lib/capistrano/scm/plugin.rb
|
157
|
+
- lib/capistrano/scm/svn.rb
|
158
|
+
- lib/capistrano/scm/tasks/git.rake
|
159
|
+
- lib/capistrano/scm/tasks/hg.rake
|
160
|
+
- lib/capistrano/scm/tasks/svn.rake
|
142
161
|
- lib/capistrano/setup.rb
|
143
|
-
- lib/capistrano/svn.rb
|
144
162
|
- lib/capistrano/tasks/console.rake
|
145
163
|
- lib/capistrano/tasks/deploy.rake
|
164
|
+
- lib/capistrano/tasks/doctor.rake
|
146
165
|
- lib/capistrano/tasks/framework.rake
|
147
|
-
- lib/capistrano/tasks/git.rake
|
148
|
-
- lib/capistrano/tasks/hg.rake
|
149
166
|
- lib/capistrano/tasks/install.rake
|
150
|
-
- lib/capistrano/tasks/svn.rake
|
151
167
|
- lib/capistrano/templates/Capfile
|
152
168
|
- lib/capistrano/templates/deploy.rb.erb
|
153
169
|
- lib/capistrano/templates/stage.rb.erb
|
@@ -157,18 +173,31 @@ files:
|
|
157
173
|
- spec/integration/dsl_spec.rb
|
158
174
|
- spec/integration_spec_helper.rb
|
159
175
|
- spec/lib/capistrano/application_spec.rb
|
176
|
+
- spec/lib/capistrano/configuration/empty_filter_spec.rb
|
160
177
|
- spec/lib/capistrano/configuration/filter_spec.rb
|
178
|
+
- spec/lib/capistrano/configuration/host_filter_spec.rb
|
179
|
+
- spec/lib/capistrano/configuration/null_filter_spec.rb
|
180
|
+
- spec/lib/capistrano/configuration/plugin_installer_spec.rb
|
161
181
|
- spec/lib/capistrano/configuration/question_spec.rb
|
182
|
+
- spec/lib/capistrano/configuration/role_filter_spec.rb
|
183
|
+
- spec/lib/capistrano/configuration/scm_resolver_spec.rb
|
162
184
|
- spec/lib/capistrano/configuration/server_spec.rb
|
163
185
|
- spec/lib/capistrano/configuration/servers_spec.rb
|
164
186
|
- spec/lib/capistrano/configuration_spec.rb
|
187
|
+
- spec/lib/capistrano/doctor/environment_doctor_spec.rb
|
188
|
+
- spec/lib/capistrano/doctor/gems_doctor_spec.rb
|
189
|
+
- spec/lib/capistrano/doctor/output_helpers_spec.rb
|
190
|
+
- spec/lib/capistrano/doctor/servers_doctor_spec.rb
|
191
|
+
- spec/lib/capistrano/doctor/variables_doctor_spec.rb
|
165
192
|
- spec/lib/capistrano/dsl/paths_spec.rb
|
166
193
|
- spec/lib/capistrano/dsl/task_enhancements_spec.rb
|
167
194
|
- spec/lib/capistrano/dsl_spec.rb
|
168
|
-
- spec/lib/capistrano/
|
169
|
-
- spec/lib/capistrano/
|
195
|
+
- spec/lib/capistrano/immutable_task_spec.rb
|
196
|
+
- spec/lib/capistrano/plugin_spec.rb
|
197
|
+
- spec/lib/capistrano/scm/git_spec.rb
|
198
|
+
- spec/lib/capistrano/scm/hg_spec.rb
|
199
|
+
- spec/lib/capistrano/scm/svn_spec.rb
|
170
200
|
- spec/lib/capistrano/scm_spec.rb
|
171
|
-
- spec/lib/capistrano/svn_spec.rb
|
172
201
|
- spec/lib/capistrano/upload_task_spec.rb
|
173
202
|
- spec/lib/capistrano/version_validator_spec.rb
|
174
203
|
- spec/lib/capistrano_spec.rb
|
@@ -179,18 +208,19 @@ files:
|
|
179
208
|
- spec/support/tasks/database.rake
|
180
209
|
- spec/support/tasks/fail.rake
|
181
210
|
- spec/support/tasks/failed.rake
|
211
|
+
- spec/support/tasks/plugin.rake
|
182
212
|
- spec/support/tasks/root.rake
|
183
213
|
- spec/support/test_app.rb
|
184
|
-
homepage:
|
214
|
+
homepage: https://capistranorb.com/
|
185
215
|
licenses:
|
186
216
|
- MIT
|
187
|
-
metadata:
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
217
|
+
metadata:
|
218
|
+
bug_tracker_uri: https://github.com/capistrano/capistrano/issues
|
219
|
+
changelog_uri: https://github.com/capistrano/capistrano/releases
|
220
|
+
source_code_uri: https://github.com/capistrano/capistrano
|
221
|
+
homepage_uri: https://capistranorb.com/
|
222
|
+
documentation_uri: https://capistranorb.com/
|
223
|
+
post_install_message:
|
194
224
|
rdoc_options: []
|
195
225
|
require_paths:
|
196
226
|
- lib
|
@@ -198,46 +228,60 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
198
228
|
requirements:
|
199
229
|
- - ">="
|
200
230
|
- !ruby/object:Gem::Version
|
201
|
-
version:
|
231
|
+
version: '2.0'
|
202
232
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
203
233
|
requirements:
|
204
234
|
- - ">="
|
205
235
|
- !ruby/object:Gem::Version
|
206
236
|
version: '0'
|
207
237
|
requirements: []
|
208
|
-
|
209
|
-
|
210
|
-
signing_key:
|
238
|
+
rubygems_version: 3.3.18
|
239
|
+
signing_key:
|
211
240
|
specification_version: 4
|
212
241
|
summary: Capistrano - Welcome to easy deployment with Ruby over SSH
|
213
242
|
test_files:
|
214
243
|
- features/configuration.feature
|
215
244
|
- features/deploy.feature
|
216
245
|
- features/deploy_failure.feature
|
246
|
+
- features/doctor.feature
|
217
247
|
- features/installation.feature
|
218
|
-
- features/remote_file_task.feature
|
219
248
|
- features/sshconnect.feature
|
249
|
+
- features/stage_failure.feature
|
220
250
|
- features/step_definitions/assertions.rb
|
221
251
|
- features/step_definitions/cap_commands.rb
|
222
252
|
- features/step_definitions/setup.rb
|
253
|
+
- features/subdirectory.feature
|
223
254
|
- features/support/env.rb
|
224
255
|
- features/support/remote_command_helpers.rb
|
225
256
|
- features/support/vagrant_helpers.rb
|
226
257
|
- spec/integration/dsl_spec.rb
|
227
258
|
- spec/integration_spec_helper.rb
|
228
259
|
- spec/lib/capistrano/application_spec.rb
|
260
|
+
- spec/lib/capistrano/configuration/empty_filter_spec.rb
|
229
261
|
- spec/lib/capistrano/configuration/filter_spec.rb
|
262
|
+
- spec/lib/capistrano/configuration/host_filter_spec.rb
|
263
|
+
- spec/lib/capistrano/configuration/null_filter_spec.rb
|
264
|
+
- spec/lib/capistrano/configuration/plugin_installer_spec.rb
|
230
265
|
- spec/lib/capistrano/configuration/question_spec.rb
|
266
|
+
- spec/lib/capistrano/configuration/role_filter_spec.rb
|
267
|
+
- spec/lib/capistrano/configuration/scm_resolver_spec.rb
|
231
268
|
- spec/lib/capistrano/configuration/server_spec.rb
|
232
269
|
- spec/lib/capistrano/configuration/servers_spec.rb
|
233
270
|
- spec/lib/capistrano/configuration_spec.rb
|
271
|
+
- spec/lib/capistrano/doctor/environment_doctor_spec.rb
|
272
|
+
- spec/lib/capistrano/doctor/gems_doctor_spec.rb
|
273
|
+
- spec/lib/capistrano/doctor/output_helpers_spec.rb
|
274
|
+
- spec/lib/capistrano/doctor/servers_doctor_spec.rb
|
275
|
+
- spec/lib/capistrano/doctor/variables_doctor_spec.rb
|
234
276
|
- spec/lib/capistrano/dsl/paths_spec.rb
|
235
277
|
- spec/lib/capistrano/dsl/task_enhancements_spec.rb
|
236
278
|
- spec/lib/capistrano/dsl_spec.rb
|
237
|
-
- spec/lib/capistrano/
|
238
|
-
- spec/lib/capistrano/
|
279
|
+
- spec/lib/capistrano/immutable_task_spec.rb
|
280
|
+
- spec/lib/capistrano/plugin_spec.rb
|
281
|
+
- spec/lib/capistrano/scm/git_spec.rb
|
282
|
+
- spec/lib/capistrano/scm/hg_spec.rb
|
283
|
+
- spec/lib/capistrano/scm/svn_spec.rb
|
239
284
|
- spec/lib/capistrano/scm_spec.rb
|
240
|
-
- spec/lib/capistrano/svn_spec.rb
|
241
285
|
- spec/lib/capistrano/upload_task_spec.rb
|
242
286
|
- spec/lib/capistrano/version_validator_spec.rb
|
243
287
|
- spec/lib/capistrano_spec.rb
|
@@ -248,5 +292,6 @@ test_files:
|
|
248
292
|
- spec/support/tasks/database.rake
|
249
293
|
- spec/support/tasks/fail.rake
|
250
294
|
- spec/support/tasks/failed.rake
|
295
|
+
- spec/support/tasks/plugin.rake
|
251
296
|
- spec/support/tasks/root.rake
|
252
297
|
- spec/support/test_app.rb
|
data/.travis.yml
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
Feature: Remote file task
|
2
|
-
|
3
|
-
Background:
|
4
|
-
Given a test app with the default configuration
|
5
|
-
And a custom task to generate a file
|
6
|
-
And servers with the roles app and web
|
7
|
-
|
8
|
-
Scenario: Where the file does not exist
|
9
|
-
When I run cap "deploy:check:linked_files"
|
10
|
-
Then it creates the file with the remote_task prerequisite
|
11
|
-
|
12
|
-
Scenario: Where the file already exists
|
13
|
-
When I run cap "deploy:check:linked_files"
|
14
|
-
Then it will not recreate the file
|
data/lib/capistrano/git.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
load File.expand_path("../tasks/git.rake", __FILE__)
|
2
|
-
|
3
|
-
require 'capistrano/scm'
|
4
|
-
|
5
|
-
class Capistrano::Git < Capistrano::SCM
|
6
|
-
|
7
|
-
# execute git with argument in the context
|
8
|
-
#
|
9
|
-
def git(*args)
|
10
|
-
args.unshift :git
|
11
|
-
context.execute *args
|
12
|
-
end
|
13
|
-
|
14
|
-
# The Capistrano default strategy for git. You should want to use this.
|
15
|
-
module DefaultStrategy
|
16
|
-
def test
|
17
|
-
test! " [ -f #{repo_path}/HEAD ] "
|
18
|
-
end
|
19
|
-
|
20
|
-
def check
|
21
|
-
git :'ls-remote --heads', repo_url
|
22
|
-
end
|
23
|
-
|
24
|
-
def clone
|
25
|
-
git :clone, '--mirror', repo_url, repo_path
|
26
|
-
end
|
27
|
-
|
28
|
-
def update
|
29
|
-
git :remote, :update
|
30
|
-
end
|
31
|
-
|
32
|
-
def release
|
33
|
-
if tree = fetch(:repo_tree)
|
34
|
-
tree = tree.slice %r#^/?(.*?)/?$#, 1
|
35
|
-
components = tree.split('/').size
|
36
|
-
git :archive, fetch(:branch), tree, "| tar -x --strip-components #{components} -f - -C", release_path
|
37
|
-
else
|
38
|
-
git :archive, fetch(:branch), '| tar -x -f - -C', release_path
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
def fetch_revision
|
43
|
-
context.capture(:git, "rev-list --max-count=1 --abbrev-commit #{fetch(:branch)}")
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
data/lib/capistrano/hg.rb
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
load File.expand_path("../tasks/hg.rake", __FILE__)
|
2
|
-
|
3
|
-
require 'capistrano/scm'
|
4
|
-
|
5
|
-
class Capistrano::Hg < Capistrano::SCM
|
6
|
-
# execute hg in context with arguments
|
7
|
-
def hg(*args)
|
8
|
-
args.unshift(:hg)
|
9
|
-
context.execute *args
|
10
|
-
end
|
11
|
-
|
12
|
-
module DefaultStrategy
|
13
|
-
def test
|
14
|
-
test! " [ -d #{repo_path}/.hg ] "
|
15
|
-
end
|
16
|
-
|
17
|
-
def check
|
18
|
-
hg "id", repo_url
|
19
|
-
end
|
20
|
-
|
21
|
-
def clone
|
22
|
-
hg "clone", "--noupdate", repo_url, repo_path
|
23
|
-
end
|
24
|
-
|
25
|
-
def update
|
26
|
-
hg "pull"
|
27
|
-
end
|
28
|
-
|
29
|
-
def release
|
30
|
-
if tree = fetch(:repo_tree)
|
31
|
-
tree = tree.slice %r#^/?(.*?)/?$#, 1
|
32
|
-
components = tree.split('/').size
|
33
|
-
hg "archive --type tgz -p . -I", tree, "--rev", fetch(:branch), "| tar -x --strip-components #{components} -f - -C", release_path
|
34
|
-
else
|
35
|
-
hg "archive", release_path, "--rev", fetch(:branch)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
def fetch_revision
|
40
|
-
context.capture(:hg, "log --rev #{fetch(:branch)} --template \"{node}\n\"")
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
data/lib/capistrano/svn.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
load File.expand_path("../tasks/svn.rake", __FILE__)
|
2
|
-
|
3
|
-
require 'capistrano/scm'
|
4
|
-
|
5
|
-
class Capistrano::Svn < Capistrano::SCM
|
6
|
-
|
7
|
-
# execute svn in context with arguments
|
8
|
-
def svn(*args)
|
9
|
-
args.unshift(:svn)
|
10
|
-
context.execute *args
|
11
|
-
end
|
12
|
-
|
13
|
-
module DefaultStrategy
|
14
|
-
def test
|
15
|
-
test! " [ -d #{repo_path}/.svn ] "
|
16
|
-
end
|
17
|
-
|
18
|
-
def check
|
19
|
-
test! :svn, :info, repo_url
|
20
|
-
end
|
21
|
-
|
22
|
-
def clone
|
23
|
-
svn :checkout, repo_url, repo_path
|
24
|
-
end
|
25
|
-
|
26
|
-
def update
|
27
|
-
svn :update
|
28
|
-
end
|
29
|
-
|
30
|
-
def release
|
31
|
-
svn :export, '--force', '.', release_path
|
32
|
-
end
|
33
|
-
|
34
|
-
def fetch_revision
|
35
|
-
context.capture(:svnversion, repo_path)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
@@ -1,81 +0,0 @@
|
|
1
|
-
namespace :git do
|
2
|
-
|
3
|
-
def strategy
|
4
|
-
@strategy ||= Capistrano::Git.new(self, fetch(:git_strategy, Capistrano::Git::DefaultStrategy))
|
5
|
-
end
|
6
|
-
|
7
|
-
set :git_environmental_variables, ->() {
|
8
|
-
{
|
9
|
-
git_askpass: "/bin/echo",
|
10
|
-
git_ssh: "#{fetch(:tmp_dir)}/#{fetch(:application)}/git-ssh.sh"
|
11
|
-
}
|
12
|
-
}
|
13
|
-
|
14
|
-
desc 'Upload the git wrapper script, this script guarantees that we can script git without getting an interactive prompt'
|
15
|
-
task :wrapper do
|
16
|
-
on release_roles :all do
|
17
|
-
execute :mkdir, "-p", "#{fetch(:tmp_dir)}/#{fetch(:application)}/"
|
18
|
-
upload! StringIO.new("#!/bin/sh -e\nexec /usr/bin/ssh -o PasswordAuthentication=no -o StrictHostKeyChecking=no \"$@\"\n"), "#{fetch(:tmp_dir)}/#{fetch(:application)}/git-ssh.sh"
|
19
|
-
execute :chmod, "+x", "#{fetch(:tmp_dir)}/#{fetch(:application)}/git-ssh.sh"
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
desc 'Check that the repository is reachable'
|
24
|
-
task check: :'git:wrapper' do
|
25
|
-
fetch(:branch)
|
26
|
-
on release_roles :all do
|
27
|
-
with fetch(:git_environmental_variables) do
|
28
|
-
strategy.check
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
desc 'Clone the repo to the cache'
|
34
|
-
task clone: :'git:wrapper' do
|
35
|
-
on release_roles :all do
|
36
|
-
if strategy.test
|
37
|
-
info t(:mirror_exists, at: repo_path)
|
38
|
-
else
|
39
|
-
within deploy_path do
|
40
|
-
with fetch(:git_environmental_variables) do
|
41
|
-
strategy.clone
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
desc 'Update the repo mirror to reflect the origin state'
|
49
|
-
task update: :'git:clone' do
|
50
|
-
on release_roles :all do
|
51
|
-
within repo_path do
|
52
|
-
with fetch(:git_environmental_variables) do
|
53
|
-
strategy.update
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
desc 'Copy repo to releases'
|
60
|
-
task create_release: :'git:update' do
|
61
|
-
on release_roles :all do
|
62
|
-
with fetch(:git_environmental_variables) do
|
63
|
-
within repo_path do
|
64
|
-
execute :mkdir, '-p', release_path
|
65
|
-
strategy.release
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
desc 'Determine the revision that will be deployed'
|
72
|
-
task :set_current_revision do
|
73
|
-
on release_roles :all do
|
74
|
-
within repo_path do
|
75
|
-
with fetch(:git_environmental_variables) do
|
76
|
-
set :current_revision, strategy.fetch_revision
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
namespace :hg do
|
2
|
-
def strategy
|
3
|
-
@strategy ||= Capistrano::Hg.new(self, fetch(:hg_strategy, Capistrano::Hg::DefaultStrategy))
|
4
|
-
end
|
5
|
-
|
6
|
-
desc 'Check that the repo is reachable'
|
7
|
-
task :check do
|
8
|
-
on release_roles :all do
|
9
|
-
strategy.check
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
desc 'Clone the repo to the cache'
|
14
|
-
task :clone do
|
15
|
-
on release_roles :all do
|
16
|
-
if strategy.test
|
17
|
-
info t(:mirror_exists, at: repo_path)
|
18
|
-
else
|
19
|
-
within deploy_path do
|
20
|
-
strategy.clone
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
desc 'Pull changes from the remote repo'
|
27
|
-
task :update => :'hg:clone' do
|
28
|
-
on release_roles :all do
|
29
|
-
within repo_path do
|
30
|
-
strategy.update
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
desc 'Copy repo to releases'
|
36
|
-
task :create_release => :'hg:update' do
|
37
|
-
on release_roles :all do
|
38
|
-
within repo_path do
|
39
|
-
strategy.release
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
desc 'Determine the revision that will be deployed'
|
45
|
-
task :set_current_revision do
|
46
|
-
on release_roles :all do
|
47
|
-
within repo_path do
|
48
|
-
set :current_revision, strategy.fetch_revision
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
namespace :svn do
|
2
|
-
def strategy
|
3
|
-
@strategy ||= Capistrano::Svn.new(self, fetch(:svn_strategy, Capistrano::Svn::DefaultStrategy))
|
4
|
-
end
|
5
|
-
|
6
|
-
desc 'Check that the repo is reachable'
|
7
|
-
task :check do
|
8
|
-
on release_roles :all do
|
9
|
-
strategy.check
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
desc 'Clone the repo to the cache'
|
14
|
-
task :clone do
|
15
|
-
on release_roles :all do
|
16
|
-
if strategy.test
|
17
|
-
info t(:mirror_exists, at: repo_path)
|
18
|
-
else
|
19
|
-
within deploy_path do
|
20
|
-
strategy.clone
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
desc 'Pull changes from the remote repo'
|
27
|
-
task :update => :'svn:clone' do
|
28
|
-
on release_roles :all do
|
29
|
-
within repo_path do
|
30
|
-
strategy.update
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
desc 'Copy repo to releases'
|
36
|
-
task :create_release => :'svn:update' do
|
37
|
-
on release_roles :all do
|
38
|
-
within repo_path do
|
39
|
-
strategy.release
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
desc 'Determine the revision that will be deployed'
|
45
|
-
task :set_current_revision do
|
46
|
-
on release_roles :all do
|
47
|
-
within repo_path do
|
48
|
-
set :current_revision, strategy.fetch_revision
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|