capistrano 3.17.0 → 3.20.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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.docker/Dockerfile +7 -0
  3. data/.docker/ssh_key_rsa +49 -0
  4. data/.docker/ssh_key_rsa.pub +1 -0
  5. data/.docker/ubuntu_setup.sh +23 -0
  6. data/.github/dependabot.yml +20 -0
  7. data/.github/release-drafter.yml +10 -2
  8. data/.github/workflows/ci.yml +69 -0
  9. data/.github/workflows/release-drafter.yml +18 -0
  10. data/.rubocop.yml +23 -12
  11. data/.rubocop_todo.yml +257 -0
  12. data/DEVELOPMENT.md +4 -19
  13. data/Gemfile +4 -41
  14. data/README.md +2 -2
  15. data/Rakefile +6 -2
  16. data/capistrano.gemspec +1 -1
  17. data/docker-compose.yml +8 -0
  18. data/features/deploy.feature +5 -1
  19. data/features/sshconnect.feature +1 -1
  20. data/features/step_definitions/assertions.rb +33 -23
  21. data/features/step_definitions/setup.rb +10 -13
  22. data/features/support/docker_gateway.rb +53 -0
  23. data/features/support/env.rb +0 -10
  24. data/features/support/remote_command_helpers.rb +3 -3
  25. data/features/support/remote_ssh_helpers.rb +33 -0
  26. data/gemfiles/legacy.gemfile +7 -0
  27. data/lib/capistrano/configuration/server.rb +0 -2
  28. data/lib/capistrano/configuration/validated_variables.rb +1 -1
  29. data/lib/capistrano/configuration.rb +1 -1
  30. data/lib/capistrano/scm/git.rb +6 -0
  31. data/lib/capistrano/scm/tasks/git.rake +11 -0
  32. data/lib/capistrano/tasks/deploy.rake +23 -1
  33. data/lib/capistrano/templates/deploy.rb.erb +1 -1
  34. data/lib/capistrano/version.rb +1 -1
  35. data/spec/integration/dsl_spec.rb +11 -11
  36. data/spec/lib/capistrano/configuration/scm_resolver_spec.rb +1 -0
  37. data/spec/lib/capistrano/dsl_spec.rb +2 -2
  38. data/spec/lib/capistrano/scm/git_spec.rb +10 -0
  39. data/spec/support/test_app.rb +15 -12
  40. metadata +18 -16
  41. data/.circleci/config.yml +0 -113
  42. data/.github/workflows/push.yml +0 -12
  43. data/Dangerfile +0 -1
  44. data/features/support/vagrant_helpers.rb +0 -41
  45. data/spec/support/.gitignore +0 -1
  46. data/spec/support/Vagrantfile +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99671d269dca096fd99e25e1990a89ebb3241875e1f5bad7c09b6d31ee89181f
4
- data.tar.gz: ce19a13c14d57456bdcc00077a68d908e8433e7995fe24b7eeaa96f4a32463b8
3
+ metadata.gz: b4f0478fbe975368c07f9ee2bb4ce72b0e35837063edacc480b0ec3a6074baac
4
+ data.tar.gz: 6c202e93e2308bc89970449f439e310b54a59868e04ace205814e51054bea779
5
5
  SHA512:
6
- metadata.gz: 6fa979409c1e6e5e9ff293b97a4341ded24c4ab5e1a788f0b782ce6be010572851266aabb7ada7b8c955cb5a5d044fb1a28f4e97cfc2f7acfa742ccb1141cfc5
7
- data.tar.gz: 57b9f530d593e32f64085e4b90e17ae5d23371382c91bbaa73e96268597d9d1ddf9bbd509806e955f3771d2a4cedd2a1fde300ea33ba470c0a4b46d9a5150247
6
+ metadata.gz: 4eff1cfedde99d1cb07fb2d84fb6b15943c5dd0daa771567f181d5160af8cb73bb4940cbdf3cf359a29153df54431b42950667b7a93ea6c40b5e68fe06072b7f
7
+ data.tar.gz: d4697ade9f40e18f160ee8e6fb17578353635a14b0c8be32085c653b7b8466587c56596ca570b096cdf62c5d6f203f77049ac651529d3b7aa85f6e7907a4459c
@@ -0,0 +1,7 @@
1
+ FROM ubuntu:22.04
2
+ WORKDIR /provision
3
+ COPY ./ssh_key_rsa.pub /root/.ssh/authorized_keys
4
+ COPY ./ubuntu_setup.sh ./
5
+ RUN ./ubuntu_setup.sh
6
+ EXPOSE 22
7
+ CMD ["/usr/sbin/sshd", "-D"]
@@ -0,0 +1,49 @@
1
+ -----BEGIN OPENSSH PRIVATE KE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
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ export DEBIAN_FRONTEND=noninteractive
6
+
7
+ # Create `deployer` user
8
+ adduser --disabled-password deployer < /dev/null
9
+ mkdir -p /home/deployer/.ssh
10
+ cp /root/.ssh/authorized_keys /home/deployer/.ssh
11
+ chown -R deployer:deployer /home/deployer/.ssh
12
+ chmod 600 /home/deployer/.ssh/authorized_keys
13
+
14
+ # Install and configure sshd
15
+ apt -y update
16
+ apt-get -y install openssh-server git
17
+ {
18
+ echo "Port 22"
19
+ echo "PasswordAuthentication no"
20
+ echo "ChallengeResponseAuthentication no"
21
+ } >> /etc/ssh/sshd_config
22
+ mkdir /var/run/sshd
23
+ chmod 0755 /var/run/sshd
@@ -0,0 +1,20 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: monthly
7
+ time: "16:00"
8
+ timezone: America/Los_Angeles
9
+ open-pull-requests-limit: 10
10
+ labels:
11
+ - "🏠 Housekeeping"
12
+ - package-ecosystem: github-actions
13
+ directory: "/"
14
+ schedule:
15
+ interval: monthly
16
+ time: "16:00"
17
+ timezone: America/Los_Angeles
18
+ open-pull-requests-limit: 10
19
+ labels:
20
+ - "🏠 Housekeeping"
@@ -1,5 +1,5 @@
1
- name-template: "$NEXT_PATCH_VERSION"
2
- tag-template: "v$NEXT_PATCH_VERSION"
1
+ name-template: "$RESOLVED_VERSION"
2
+ tag-template: "v$RESOLVED_VERSION"
3
3
  categories:
4
4
  - title: "⚠️ Breaking Changes"
5
5
  label: "⚠️ Breaking"
@@ -11,7 +11,15 @@ categories:
11
11
  label: "📚 Docs"
12
12
  - title: "🏠 Housekeeping"
13
13
  label: "🏠 Housekeeping"
14
+ version-resolver:
15
+ minor:
16
+ labels:
17
+ - "⚠️ Breaking"
18
+ - "✨ Feature"
19
+ default: patch
14
20
  change-template: "- $TITLE (#$NUMBER) @$AUTHOR"
15
21
  no-changes-template: "- No changes"
16
22
  template: |
17
23
  $CHANGES
24
+
25
+ **Full Changelog:** https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
@@ -0,0 +1,69 @@
1
+ name: CI
2
+ on:
3
+ push:
4
+ branches: [master]
5
+ pull_request:
6
+ jobs:
7
+ spec:
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ ruby: ["3.1", "3.2", "3.3", "3.4", "head"]
12
+ steps:
13
+ - uses: actions/checkout@v6
14
+ - name: Set up Ruby
15
+ uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: ${{ matrix.ruby }}
18
+ bundler-cache: true
19
+ - name: rake spec
20
+ run: bundle exec rake spec
21
+ spec-legacy:
22
+ runs-on: ubuntu-latest
23
+ strategy:
24
+ matrix:
25
+ ruby: ["2.5", "2.6", "2.7", "3.0"]
26
+ env:
27
+ BUNDLE_GEMFILE: gemfiles/legacy.gemfile
28
+ steps:
29
+ - uses: actions/checkout@v6
30
+ - name: Set up Ruby
31
+ uses: ruby/setup-ruby@v1
32
+ with:
33
+ ruby-version: ${{ matrix.ruby }}
34
+ bundler-cache: true
35
+ - name: rake spec
36
+ run: bundle exec rake spec
37
+ spec-all:
38
+ runs-on: ubuntu-latest
39
+ needs: [spec, spec-legacy]
40
+ if: always()
41
+ steps:
42
+ - name: All tests ok
43
+ if: ${{ !(contains(needs.*.result, 'failure')) }}
44
+ run: exit 0
45
+ - name: Some tests failed
46
+ if: ${{ contains(needs.*.result, 'failure') }}
47
+ run: exit 1
48
+ rubocop:
49
+ runs-on: ubuntu-latest
50
+ steps:
51
+ - uses: actions/checkout@v6
52
+ - name: Set up Ruby
53
+ uses: ruby/setup-ruby@v1
54
+ with:
55
+ ruby-version: "ruby" # latest-stable
56
+ bundler-cache: true
57
+ - run: bundle exec rubocop
58
+ features:
59
+ needs: spec-all
60
+ runs-on: ubuntu-latest
61
+ steps:
62
+ - uses: actions/checkout@v6
63
+ - name: Set up Ruby
64
+ uses: ruby/setup-ruby@v1
65
+ with:
66
+ ruby-version: "ruby" # latest-stable
67
+ bundler-cache: true
68
+ - name: rake features
69
+ run: bundle exec rake features
@@ -0,0 +1,18 @@
1
+ name: Release Drafter
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ permissions:
9
+ contents: write
10
+ pull-requests: read
11
+
12
+ jobs:
13
+ update_release_draft:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: release-drafter/release-drafter@v6
17
+ env:
18
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
data/.rubocop.yml CHANGED
@@ -1,11 +1,21 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
1
3
  AllCops:
2
4
  DisplayCopNames: true
3
5
  DisplayStyleGuide: true
4
- TargetRubyVersion: 2.0
6
+ NewCops: disable
7
+ SuggestExtensions: false
8
+ TargetRubyVersion: 2.5
5
9
 
10
+ Layout/HeredocIndentation:
11
+ Enabled: false
12
+ Layout/SpaceAroundEqualsInParameterDefault:
13
+ EnforcedStyle: no_space
6
14
  Lint/AmbiguousBlockAssociation:
7
- Enabled:
8
- false
15
+ Enabled: false
16
+ Lint/EmptyFile:
17
+ Exclude:
18
+ - "lib/capistrano.rb"
9
19
  Metrics/BlockLength:
10
20
  Exclude:
11
21
  - "*.gemspec"
@@ -17,13 +27,8 @@ Style/ClassAndModuleChildren:
17
27
  Enabled: false
18
28
  Style/DoubleNegation:
19
29
  Enabled: false
20
- Style/FileName:
21
- Exclude:
22
- - "Dangerfile"
23
- Style/IndentHeredoc:
30
+ Style/FrozenStringLiteralComment:
24
31
  Enabled: false
25
- Style/SpaceAroundEqualsInParameterDefault:
26
- EnforcedStyle: no_space
27
32
  Style/StringLiterals:
28
33
  EnforcedStyle: double_quotes
29
34
  Style/TrivialAccessors:
@@ -34,6 +39,12 @@ Style/SingleLineBlockParams:
34
39
  Enabled: false
35
40
  Style/ModuleFunction:
36
41
  Enabled: false
42
+ Style/FormatStringToken:
43
+ EnforcedStyle: template
44
+ Style/StringLiteralsInInterpolation:
45
+ Enabled: false
46
+ Style/StderrPuts:
47
+ Enabled: false
37
48
 
38
49
  # Enable someday
39
50
  Style/Documentation:
@@ -46,9 +57,9 @@ Metrics/CyclomaticComplexity:
46
57
  Enabled: false
47
58
  Metrics/MethodLength:
48
59
  Enabled: false
49
- Style/PredicateName:
60
+ Naming/PredicatePrefix:
50
61
  Enabled: false
51
- Metrics/LineLength:
62
+ Layout/LineLength:
52
63
  Enabled: false
53
64
  Metrics/AbcSize:
54
65
  Enabled: false
@@ -58,5 +69,5 @@ Metrics/ClassLength:
58
69
  Enabled: false
59
70
  Metrics/ModuleLength:
60
71
  Enabled: false
61
- Style/AccessorMethodName:
72
+ Naming/AccessorMethodName:
62
73
  Enabled: false
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,257 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2025-11-29 04:19:34 UTC using RuboCop version 1.81.7.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 4
10
+ # This cop supports safe autocorrection (--autocorrect).
11
+ Layout/ClosingHeredocIndentation:
12
+ Exclude:
13
+ - "lib/capistrano/configuration/scm_resolver.rb"
14
+ - "lib/capistrano/immutable_task.rb"
15
+
16
+ # Offense count: 1
17
+ # This cop supports safe autocorrection (--autocorrect).
18
+ # Configuration parameters: AllowBorderComment, AllowMarginComment.
19
+ Layout/EmptyComment:
20
+ Exclude:
21
+ - "features/step_definitions/assertions.rb"
22
+
23
+ # Offense count: 18
24
+ # This cop supports safe autocorrection (--autocorrect).
25
+ Layout/EmptyLineAfterGuardClause:
26
+ Exclude:
27
+ - "features/support/remote_ssh_helpers.rb"
28
+ - "lib/capistrano/configuration/filter.rb"
29
+ - "lib/capistrano/configuration/scm_resolver.rb"
30
+ - "lib/capistrano/configuration/validated_variables.rb"
31
+ - "lib/capistrano/configuration/variables.rb"
32
+ - "lib/capistrano/doctor/gems_doctor.rb"
33
+ - "lib/capistrano/doctor/output_helpers.rb"
34
+ - "lib/capistrano/doctor/servers_doctor.rb"
35
+ - "lib/capistrano/dsl/task_enhancements.rb"
36
+ - "lib/capistrano/tasks/deploy.rake"
37
+ - "lib/capistrano/version_validator.rb"
38
+
39
+ # Offense count: 1
40
+ # This cop supports safe autocorrection (--autocorrect).
41
+ # Configuration parameters: AllowAliasSyntax, AllowedMethods.
42
+ # AllowedMethods: alias_method, public, protected, private
43
+ Layout/EmptyLinesAroundAttributeAccessor:
44
+ Exclude:
45
+ - "lib/capistrano/configuration.rb"
46
+
47
+ # Offense count: 2
48
+ # Configuration parameters: AllowedMethods.
49
+ # AllowedMethods: enums
50
+ Lint/ConstantDefinitionInBlock:
51
+ Exclude:
52
+ - "spec/lib/capistrano/plugin_spec.rb"
53
+
54
+ # Offense count: 1
55
+ # This cop supports safe autocorrection (--autocorrect).
56
+ Lint/ElseLayout:
57
+ Exclude:
58
+ - "lib/capistrano/configuration/filter.rb"
59
+
60
+ # Offense count: 2
61
+ # This cop supports unsafe autocorrection (--autocorrect-all).
62
+ Lint/InterpolationCheck:
63
+ Exclude:
64
+ - "spec/lib/capistrano/dsl/paths_spec.rb"
65
+ - "spec/spec_helper.rb"
66
+
67
+ # Offense count: 1
68
+ # Configuration parameters: AllowedParentClasses.
69
+ Lint/MissingSuper:
70
+ Exclude:
71
+ - "lib/capistrano/configuration/validated_variables.rb"
72
+
73
+ # Offense count: 1
74
+ Lint/MixedRegexpCaptureTypes:
75
+ Exclude:
76
+ - "lib/capistrano/configuration/host_filter.rb"
77
+
78
+ # Offense count: 1
79
+ # This cop supports unsafe autocorrection (--autocorrect-all).
80
+ Lint/NonDeterministicRequireOrder:
81
+ Exclude:
82
+ - "spec/spec_helper.rb"
83
+
84
+ # Offense count: 1
85
+ # This cop supports safe autocorrection (--autocorrect).
86
+ Lint/ScriptPermission:
87
+ Exclude:
88
+ - "lib/Capfile"
89
+
90
+ # Offense count: 5
91
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
92
+ # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
93
+ Naming/MethodParameterName:
94
+ Exclude:
95
+ - "lib/capistrano/application.rb"
96
+ - "lib/capistrano/dsl/task_enhancements.rb"
97
+ - "lib/capistrano/proc_helpers.rb"
98
+ - "spec/support/test_app.rb"
99
+
100
+ # Offense count: 2
101
+ # This cop supports safe autocorrection (--autocorrect).
102
+ # Configuration parameters: EnforcedStyle.
103
+ # SupportedStyles: separated, grouped
104
+ Style/AccessorGrouping:
105
+ Exclude:
106
+ - "lib/capistrano/doctor/output_helpers.rb"
107
+
108
+ # Offense count: 1
109
+ # This cop supports safe autocorrection (--autocorrect).
110
+ # Configuration parameters: Keywords, RequireColon.
111
+ # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE
112
+ Style/CommentAnnotation:
113
+ Exclude:
114
+ - "lib/capistrano/scm/git.rb"
115
+
116
+ # Offense count: 1
117
+ # This cop supports safe autocorrection (--autocorrect).
118
+ Style/EmptyLambdaParameter:
119
+ Exclude:
120
+ - "lib/capistrano/dsl/paths.rb"
121
+
122
+ # Offense count: 1
123
+ # This cop supports safe autocorrection (--autocorrect).
124
+ Style/Encoding:
125
+ Exclude:
126
+ - "capistrano.gemspec"
127
+
128
+ # Offense count: 17
129
+ # This cop supports safe autocorrection (--autocorrect).
130
+ Style/ExpandPathArguments:
131
+ Exclude:
132
+ - "capistrano.gemspec"
133
+ - "lib/capistrano/configuration/variables.rb"
134
+ - "lib/capistrano/console.rb"
135
+ - "lib/capistrano/deploy.rb"
136
+ - "lib/capistrano/doctor.rb"
137
+ - "lib/capistrano/framework.rb"
138
+ - "lib/capistrano/scm/git.rb"
139
+ - "lib/capistrano/scm/hg.rb"
140
+ - "lib/capistrano/scm/svn.rb"
141
+ - "lib/capistrano/tasks/install.rake"
142
+ - "spec/lib/capistrano/doctor/environment_doctor_spec.rb"
143
+ - "spec/lib/capistrano/doctor/gems_doctor_spec.rb"
144
+ - "spec/lib/capistrano/doctor/servers_doctor_spec.rb"
145
+ - "spec/lib/capistrano/doctor/variables_doctor_spec.rb"
146
+ - "spec/lib/capistrano/plugin_spec.rb"
147
+
148
+ # Offense count: 1
149
+ # This cop supports safe autocorrection (--autocorrect).
150
+ Style/ExplicitBlockArgument:
151
+ Exclude:
152
+ - "lib/capistrano/configuration/servers.rb"
153
+
154
+ # Offense count: 1
155
+ # This cop supports unsafe autocorrection (--autocorrect-all).
156
+ Style/GlobalStdStream:
157
+ Exclude:
158
+ - "spec/spec_helper.rb"
159
+
160
+ # Offense count: 10
161
+ # This cop supports safe autocorrection (--autocorrect).
162
+ # Configuration parameters: EnforcedStyle.
163
+ # SupportedStyles: braces, no_braces
164
+ Style/HashAsLastArrayItem:
165
+ Exclude:
166
+ - "spec/lib/capistrano/configuration/servers_spec.rb"
167
+
168
+ # Offense count: 2
169
+ # This cop supports unsafe autocorrection (--autocorrect-all).
170
+ # Configuration parameters: AllowedReceivers.
171
+ # AllowedReceivers: Thread.current
172
+ Style/HashEachMethods:
173
+ Exclude:
174
+ - "lib/capistrano/configuration/servers.rb"
175
+ - "lib/capistrano/tasks/deploy.rake"
176
+
177
+ # Offense count: 7
178
+ # This cop supports safe autocorrection (--autocorrect).
179
+ Style/IfUnlessModifier:
180
+ Exclude:
181
+ - "lib/capistrano/configuration.rb"
182
+ - "lib/capistrano/configuration/scm_resolver.rb"
183
+ - "lib/capistrano/i18n.rb"
184
+ - "lib/capistrano/tasks/deploy.rake"
185
+
186
+ # Offense count: 4
187
+ Style/MixinUsage:
188
+ Exclude:
189
+ - "lib/Capfile"
190
+ - "lib/capistrano/dsl.rb"
191
+ - "lib/capistrano/setup.rb"
192
+ - "spec/integration_spec_helper.rb"
193
+
194
+ # Offense count: 2
195
+ # This cop supports safe autocorrection (--autocorrect).
196
+ Style/RedundantBegin:
197
+ Exclude:
198
+ - "spec/lib/capistrano/application_spec.rb"
199
+ - "spec/spec_helper.rb"
200
+
201
+ # Offense count: 2
202
+ # This cop supports unsafe autocorrection (--autocorrect-all).
203
+ # Configuration parameters: SafeForConstants.
204
+ Style/RedundantFetchBlock:
205
+ Exclude:
206
+ - "spec/integration/dsl_spec.rb"
207
+
208
+ # Offense count: 1
209
+ # This cop supports safe autocorrection (--autocorrect).
210
+ Style/RedundantParentheses:
211
+ Exclude:
212
+ - "lib/capistrano/configuration/validated_variables.rb"
213
+
214
+ # Offense count: 2
215
+ # This cop supports safe autocorrection (--autocorrect).
216
+ Style/RedundantRegexpEscape:
217
+ Exclude:
218
+ - "lib/capistrano/defaults.rb"
219
+
220
+ # Offense count: 1
221
+ # This cop supports safe autocorrection (--autocorrect).
222
+ # Configuration parameters: AllowMultipleReturnValues.
223
+ Style/RedundantReturn:
224
+ Exclude:
225
+ - "lib/capistrano/configuration/question.rb"
226
+
227
+ # Offense count: 2
228
+ # This cop supports safe autocorrection (--autocorrect).
229
+ # Configuration parameters: EnforcedStyle.
230
+ # SupportedStyles: implicit, explicit
231
+ Style/RescueStandardError:
232
+ Exclude:
233
+ - "features/support/remote_command_helpers.rb"
234
+ - "lib/capistrano/tasks/console.rake"
235
+
236
+ # Offense count: 3
237
+ # This cop supports unsafe autocorrection (--autocorrect-all).
238
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
239
+ # AllowedMethods: present?, blank?, presence, try, try!
240
+ Style/SafeNavigation:
241
+ Exclude:
242
+ - "lib/capistrano/configuration.rb"
243
+ - "lib/capistrano/doctor/variables_doctor.rb"
244
+ - "lib/capistrano/dsl.rb"
245
+
246
+ # Offense count: 1
247
+ # This cop supports unsafe autocorrection (--autocorrect-all).
248
+ # Configuration parameters: Mode.
249
+ Style/StringConcatenation:
250
+ Exclude:
251
+ - "spec/support/test_app.rb"
252
+
253
+ # Offense count: 1
254
+ # This cop supports safe autocorrection (--autocorrect).
255
+ Style/WhileUntilModifier:
256
+ Exclude:
257
+ - "lib/capistrano/configuration/variables.rb"
data/DEVELOPMENT.md CHANGED
@@ -20,22 +20,16 @@ Everyone can help improve Capistrano. There are ways to contribute even if you a
20
20
 
21
21
  ## Contributing documentation
22
22
 
23
- Improvements and additions to Capistrano's documentation are very much appreciated. The official documention is stored in the `docs/` directory as Markdown files. These files are used to automatically generate the [capistranorb.com](http://capistranorb.com/) website, which is hosted by GitHub Pages. Feel free to make changes to this documentation as you see fit. Before opening a pull request, make sure your documentation renders correctly by previewing the website in your local environment. Refer to [docs/README.md][] for instructions.
23
+ Improvements and additions to Capistrano's documentation are very much appreciated. The official documentation is stored in the `docs/` directory as Markdown files. These files are used to automatically generate the [capistranorb.com](https://capistranorb.com/) website, which is hosted by GitHub Pages. Feel free to make changes to this documentation as you see fit. Before opening a pull request, make sure your documentation renders correctly by previewing the website in your local environment. Refer to [docs/README.md][] for instructions.
24
24
 
25
25
  ## Setting up your development environment
26
26
 
27
- Capistrano is a Ruby project, so we expect you to have a functioning Ruby environment. To hack on Capistrano you will further need some specialized tools to run its test suite.
28
-
29
- Make sure to install:
30
-
31
- * [Bundler](https://bundler.io/)
32
- * [Vagrant](https://www.vagrantup.com/)
33
- * [VirtualBox](https://www.virtualbox.org/wiki/Downloads) (or another [Vagrant-supported](https://docs.vagrantup.com/v2/getting-started/providers.html) VM host)
27
+ Capistrano is a Ruby project, so we expect you to have a functioning Ruby environment with the latest stable version of Ruby. To run Cucumber tests, you'll also need [Docker installed](https://docs.docker.com/get-docker/) and running.
34
28
 
35
29
 
36
30
  ### Running tests
37
31
 
38
- Capistrano has two test suites: an RSpec suite and a Cucumber suite. The RSpec suite handles quick feedback unit specs. The Cucumber suite is an integration suite that uses Vagrant to deploy to a real virtual server.
32
+ Capistrano has two test suites: an RSpec suite and a Cucumber suite. The RSpec suite handles quick feedback unit specs. The Cucumber suite is an integration suite that uses a Docker container as an SSH server and deployment target.
39
33
 
40
34
  ```
41
35
  # Ensure all dependencies are installed
@@ -44,19 +38,10 @@ $ bundle install
44
38
  # Run the RSpec suite
45
39
  $ bundle exec rake spec
46
40
 
47
- # Run the Cucumber suite
41
+ # Run the Cucumber suite (Docker must be running)
48
42
  $ bundle exec rake features
49
-
50
- # Run the Cucumber suite and leave the VM running (faster for subsequent runs)
51
- $ bundle exec rake features KEEP_RUNNING=1
52
43
  ```
53
44
 
54
- ### Report failing Cucumber features!
55
-
56
- Currently, the Capistrano CI build does *not* run the Cucumber suite. This means it is possible for a failing Cucumber feature to sneak in without being noticed by our continuous integration checks.
57
-
58
- **If you come across a failing Cucumber feature, this is a bug.** Please report it by opening a GitHub issue. Or even better: do your best to fix the feature and submit a pull request!
59
-
60
45
  ## Coding guidelines
61
46
 
62
47
  This project uses [RuboCop](https://github.com/bbatsov/rubocop) to enforce standard Ruby coding guidelines.
data/Gemfile CHANGED
@@ -3,44 +3,7 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in capistrano.gemspec
4
4
  gemspec
5
5
 
6
- gem "mocha"
7
- gem "rspec"
8
- gem "rspec-core", "~> 3.4.4"
9
-
10
- group :cucumber do
11
- # Latest versions of cucumber don't support Ruby < 2.1
12
- # rubocop:disable Bundler/DuplicatedGem
13
- if Gem::Requirement.new("< 2.1").satisfied_by?(Gem::Version.new(RUBY_VERSION))
14
- gem "cucumber", "< 3.0.1"
15
- else
16
- gem "cucumber"
17
- end
18
- # rubocop:enable Bundler/DuplicatedGem
19
- end
20
-
21
- # Latest versions of net-ssh don't support Ruby < 2.2.6
22
- if Gem::Requirement.new("< 2.2.6").satisfied_by?(Gem::Version.new(RUBY_VERSION))
23
- gem "net-ssh", "< 5.0.0"
24
- end
25
-
26
- # Latest versions of public_suffix don't support Ruby < 2.1
27
- if Gem::Requirement.new("< 2.1").satisfied_by?(Gem::Version.new(RUBY_VERSION))
28
- gem "public_suffix", "< 3.0.0"
29
- end
30
-
31
- # Latest versions of i18n don't support Ruby < 2.4
32
- if Gem::Requirement.new("< 2.4").satisfied_by?(Gem::Version.new(RUBY_VERSION))
33
- gem "i18n", "< 1.3.0"
34
- end
35
-
36
- # Latest versions of rake don't support Ruby < 2.2
37
- if Gem::Requirement.new("< 2.2").satisfied_by?(Gem::Version.new(RUBY_VERSION))
38
- gem "rake", "< 13.0.0"
39
- end
40
-
41
- # We only run danger and rubocop on a new-ish ruby; no need to install them otherwise
42
- if Gem::Requirement.new("> 2.4").satisfied_by?(Gem::Version.new(RUBY_VERSION))
43
- gem "danger"
44
- gem "psych", "< 4" # Ensures rubocop works on Ruby 3.1
45
- gem "rubocop", "0.48.1"
46
- end
6
+ gem "cucumber", "~> 10.1"
7
+ gem "mocha", "~> 2.8"
8
+ gem "rspec", "~> 3.13"
9
+ gem "rubocop", "1.81.7"