capistrano 3.11.2 → 3.14.1
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 +4 -4
- data/.github/pull_request_template.md +0 -4
- data/.travis.yml +6 -5
- data/Gemfile +7 -2
- data/LICENSE.txt +1 -1
- data/README.md +2 -2
- data/RELEASING.md +1 -1
- data/lib/capistrano/configuration/question.rb +9 -1
- data/lib/capistrano/dsl.rb +1 -1
- data/lib/capistrano/i18n.rb +2 -0
- data/lib/capistrano/scm/git.rb +2 -0
- data/lib/capistrano/scm/tasks/git.rake +7 -7
- data/lib/capistrano/templates/stage.rb.erb +1 -1
- data/lib/capistrano/version.rb +1 -1
- data/spec/lib/capistrano/configuration/question_spec.rb +18 -0
- data/spec/lib/capistrano/scm/git_spec.rb +14 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 043f8c3dd4ea32b466125930ad359a67860c01276635d874027331c7cbd833c2
|
4
|
+
data.tar.gz: abd8062f97408bb47b7238979b8d34c12e247d09f8d67b57f622bbf6774aed17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1a16d9d47f4e46f359a8efefff98552b0cbaba85ac56cb78675f051aba779d34bd0e1546ea92952a553ae3619ad4c7e5f1586133f831cff07b9c794027f768b
|
7
|
+
data.tar.gz: 4ff34f37f143133e8499dc9897222828d28cfb4a160fa0462a74b7180dda29c3efe7d98147d7d2134202360ad5503d77506827fd12b6b86e63d010c7dcbe8122
|
@@ -13,14 +13,10 @@ to keep the conversation linked together.
|
|
13
13
|
- [ ] Did you run `bundle exec rubocop -a` to fix linter issues?
|
14
14
|
- [ ] If relevant, did you create a test?
|
15
15
|
- [ ] Did you confirm that the RSpec tests pass?
|
16
|
-
- [ ] If you are fixing a bug or introducing a new feature, did you add a CHANGELOG entry?
|
17
16
|
|
18
17
|
### Other Information
|
19
18
|
|
20
19
|
If there's anything else that's important and relevant to your pull
|
21
20
|
request, mention that information here.
|
22
21
|
|
23
|
-
If you are updating any of the CHANGELOG files or are asked to update the
|
24
|
-
CHANGELOG files by reviewers, please add the CHANGELOG entry at the top of the file where indicated.
|
25
|
-
|
26
22
|
Thanks for helping improve Capistrano!
|
data/.travis.yml
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 2.
|
4
|
-
- 2.
|
5
|
-
- 2.
|
3
|
+
- 2.7.1
|
4
|
+
- 2.6.6
|
5
|
+
- 2.5.8
|
6
|
+
- 2.4.10
|
6
7
|
- 2.3.8
|
7
8
|
- 2.2
|
8
9
|
- 2.1
|
@@ -16,8 +17,8 @@ matrix:
|
|
16
17
|
include:
|
17
18
|
- rvm: rbx-2
|
18
19
|
script: bundle exec rake spec
|
19
|
-
# Run Danger only once, on 2.5.
|
20
|
-
- rvm: 2.5.
|
20
|
+
# Run Danger only once, on 2.5.8
|
21
|
+
- rvm: 2.5.8
|
21
22
|
before_script: bundle exec danger
|
22
23
|
|
23
24
|
script: bundle exec rake spec rubocop
|
data/Gemfile
CHANGED
@@ -26,11 +26,16 @@ if Gem::Requirement.new("< 2.1").satisfied_by?(Gem::Version.new(RUBY_VERSION))
|
|
26
26
|
gem "public_suffix", "< 3.0.0"
|
27
27
|
end
|
28
28
|
|
29
|
-
# Latest versions of i18n don't support Ruby < 2.
|
30
|
-
if Gem::Requirement.new("< 2.
|
29
|
+
# Latest versions of i18n don't support Ruby < 2.4
|
30
|
+
if Gem::Requirement.new("< 2.4").satisfied_by?(Gem::Version.new(RUBY_VERSION))
|
31
31
|
gem "i18n", "< 1.3.0"
|
32
32
|
end
|
33
33
|
|
34
|
+
# Latest versions of rake don't support Ruby < 2.2
|
35
|
+
if Gem::Requirement.new("< 2.2").satisfied_by?(Gem::Version.new(RUBY_VERSION))
|
36
|
+
gem "rake", "< 13.0.0"
|
37
|
+
end
|
38
|
+
|
34
39
|
# We only run danger once on a new-ish ruby; no need to install it otherwise
|
35
40
|
if Gem::Requirement.new("> 2.4").satisfied_by?(Gem::Version.new(RUBY_VERSION))
|
36
41
|
gem "danger"
|
data/LICENSE.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2012-
|
3
|
+
Copyright (c) 2012-2020 Tom Clements, Lee Hambley
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -107,7 +107,7 @@ Add Capistrano to your project's Gemfile using `require: false`:
|
|
107
107
|
|
108
108
|
``` ruby
|
109
109
|
group :development do
|
110
|
-
gem "capistrano", "~> 3.
|
110
|
+
gem "capistrano", "~> 3.14", require: false
|
111
111
|
end
|
112
112
|
```
|
113
113
|
|
@@ -200,7 +200,7 @@ Contributions to Capistrano, in the form of code, documentation or idea, are gla
|
|
200
200
|
|
201
201
|
MIT License (MIT)
|
202
202
|
|
203
|
-
Copyright (c) 2012-
|
203
|
+
Copyright (c) 2012-2020 Tom Clements, Lee Hambley
|
204
204
|
|
205
205
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
206
206
|
of this software and associated documentation files (the "Software"), to deal
|
data/RELEASING.md
CHANGED
@@ -12,6 +12,6 @@
|
|
12
12
|
3. Determine which would be the correct next version number according to [semver](http://semver.org/).
|
13
13
|
4. Update the version in `./lib/capistrano/version.rb`.
|
14
14
|
5. Update the version in the `./README.md` Gemfile example (`gem "capistrano", "~> X.Y"`).
|
15
|
-
6. Commit the `version.rb` and `README.md` changes in a single commit, the message should be "
|
15
|
+
6. Commit the `version.rb` and `README.md` changes in a single commit, the message should be "Release vX.Y.Z"
|
16
16
|
7. Run `rake release`; this will tag, push to GitHub, and publish to rubygems.org.
|
17
17
|
8. Update the draft release on the [GitHub releases page](https://github.com/capistrano/capistrano/releases) to point to the new tag and publish the release
|
@@ -49,7 +49,11 @@ module Capistrano
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def question
|
52
|
-
if default.nil?
|
52
|
+
if prompt && default.nil?
|
53
|
+
I18n.t(:question_prompt, key: prompt, scope: :capistrano)
|
54
|
+
elsif prompt
|
55
|
+
I18n.t(:question_prompt_default, key: prompt, default_value: default, scope: :capistrano)
|
56
|
+
elsif default.nil?
|
53
57
|
I18n.t(:question, key: key, scope: :capistrano)
|
54
58
|
else
|
55
59
|
I18n.t(:question_default, key: key, default_value: default, scope: :capistrano)
|
@@ -63,6 +67,10 @@ module Capistrano
|
|
63
67
|
def stdin
|
64
68
|
(options || {}).fetch(:stdin, $stdin)
|
65
69
|
end
|
70
|
+
|
71
|
+
def prompt
|
72
|
+
(options || {}).fetch(:prompt, nil)
|
73
|
+
end
|
66
74
|
end
|
67
75
|
end
|
68
76
|
end
|
data/lib/capistrano/dsl.rb
CHANGED
data/lib/capistrano/i18n.rb
CHANGED
@@ -12,6 +12,8 @@ en = {
|
|
12
12
|
written_file: "create %{file}",
|
13
13
|
question: "Please enter %{key}: ",
|
14
14
|
question_default: "Please enter %{key} (%{default_value}): ",
|
15
|
+
question_prompt: "%{key}: ",
|
16
|
+
question_prompt_default: "%{key} (%{default_value}): ",
|
15
17
|
keeping_releases: "Keeping %{keep_releases} of %{releases} deployed releases on %{host}",
|
16
18
|
skip_cleanup: "Skipping cleanup of invalid releases on %{host}; unexpected foldername found (should be timestamp)",
|
17
19
|
wont_delete_current_release: "Current release was marked for being removed but it's going to be skipped on %{host}",
|
data/lib/capistrano/scm/git.rb
CHANGED
@@ -4,9 +4,9 @@ git_plugin = self
|
|
4
4
|
namespace :git do
|
5
5
|
desc "Upload the git wrapper script, this script guarantees that we can script git without getting an interactive prompt"
|
6
6
|
task :wrapper do
|
7
|
-
on release_roles
|
7
|
+
on release_roles(:all), in: :groups, limit: fetch(:git_max_concurrent_connections), wait: fetch(:git_wait_interval) do
|
8
8
|
execute :mkdir, "-p", File.dirname(fetch(:git_wrapper_path)).shellescape
|
9
|
-
upload! StringIO.new("#!/bin/sh -e\nexec /usr/bin/ssh -o PasswordAuthentication=no -o StrictHostKeyChecking=no \"$@\"\n"), fetch(:git_wrapper_path)
|
9
|
+
upload! StringIO.new("#!/bin/sh -e\nexec /usr/bin/env ssh -o PasswordAuthentication=no -o StrictHostKeyChecking=no \"$@\"\n"), fetch(:git_wrapper_path)
|
10
10
|
execute :chmod, "700", fetch(:git_wrapper_path).shellescape
|
11
11
|
end
|
12
12
|
end
|
@@ -14,7 +14,7 @@ namespace :git do
|
|
14
14
|
desc "Check that the repository is reachable"
|
15
15
|
task check: :'git:wrapper' do
|
16
16
|
fetch(:branch)
|
17
|
-
on release_roles
|
17
|
+
on release_roles(:all), in: :groups, limit: fetch(:git_max_concurrent_connections), wait: fetch(:git_wait_interval) do
|
18
18
|
with fetch(:git_environmental_variables) do
|
19
19
|
git_plugin.check_repo_is_reachable
|
20
20
|
end
|
@@ -23,7 +23,7 @@ namespace :git do
|
|
23
23
|
|
24
24
|
desc "Clone the repo to the cache"
|
25
25
|
task clone: :'git:wrapper' do
|
26
|
-
on release_roles
|
26
|
+
on release_roles(:all), in: :groups, limit: fetch(:git_max_concurrent_connections), wait: fetch(:git_wait_interval) do
|
27
27
|
if git_plugin.repo_mirror_exists?
|
28
28
|
info t(:mirror_exists, at: repo_path)
|
29
29
|
else
|
@@ -38,7 +38,7 @@ namespace :git do
|
|
38
38
|
|
39
39
|
desc "Update the repo mirror to reflect the origin state"
|
40
40
|
task update: :'git:clone' do
|
41
|
-
on release_roles
|
41
|
+
on release_roles(:all), in: :groups, limit: fetch(:git_max_concurrent_connections), wait: fetch(:git_wait_interval) do
|
42
42
|
within repo_path do
|
43
43
|
with fetch(:git_environmental_variables) do
|
44
44
|
git_plugin.update_mirror
|
@@ -49,7 +49,7 @@ namespace :git do
|
|
49
49
|
|
50
50
|
desc "Copy repo to releases"
|
51
51
|
task create_release: :'git:update' do
|
52
|
-
on release_roles
|
52
|
+
on release_roles(:all), in: :groups, limit: fetch(:git_max_concurrent_connections), wait: fetch(:git_wait_interval) do
|
53
53
|
with fetch(:git_environmental_variables) do
|
54
54
|
within repo_path do
|
55
55
|
execute :mkdir, "-p", release_path
|
@@ -61,7 +61,7 @@ namespace :git do
|
|
61
61
|
|
62
62
|
desc "Determine the revision that will be deployed"
|
63
63
|
task :set_current_revision do
|
64
|
-
on release_roles
|
64
|
+
on release_roles(:all), in: :groups, limit: fetch(:git_max_concurrent_connections), wait: fetch(:git_wait_interval) do
|
65
65
|
within repo_path do
|
66
66
|
with fetch(:git_environmental_variables) do
|
67
67
|
set :current_revision, git_plugin.fetch_revision
|
data/lib/capistrano/version.rb
CHANGED
@@ -6,6 +6,8 @@ module Capistrano
|
|
6
6
|
let(:question) { Question.new(key, default, stdin: stdin) }
|
7
7
|
let(:question_without_echo) { Question.new(key, default, echo: false, stdin: stdin) }
|
8
8
|
let(:question_without_default) { Question.new(key, nil, stdin: stdin) }
|
9
|
+
let(:question_prompt) { Question.new(key, default, stdin: stdin, prompt: "Your favorite branch") }
|
10
|
+
let(:question_prompt_without_default) { Question.new(key, nil, stdin: stdin, prompt: "Your favorite branch") }
|
9
11
|
let(:default) { :default }
|
10
12
|
let(:key) { :branch }
|
11
13
|
let(:stdin) { stub(tty?: true) }
|
@@ -43,6 +45,22 @@ module Capistrano
|
|
43
45
|
|
44
46
|
expect(question_without_default.call).to eq(branch)
|
45
47
|
end
|
48
|
+
|
49
|
+
it "uses prompt and returns the value" do
|
50
|
+
$stdout.expects(:print).with("Your favorite branch (default): ")
|
51
|
+
stdin.expects(:gets).returns(branch)
|
52
|
+
stdin.expects(:noecho).never
|
53
|
+
|
54
|
+
expect(question_prompt.call).to eq(branch)
|
55
|
+
end
|
56
|
+
|
57
|
+
it "uses prompt and returns the value but has no default between parenthesis" do
|
58
|
+
$stdout.expects(:print).with("Your favorite branch: ")
|
59
|
+
stdin.expects(:gets).returns(branch)
|
60
|
+
stdin.expects(:noecho).never
|
61
|
+
|
62
|
+
expect(question_prompt_without_default.call).to eq(branch)
|
63
|
+
end
|
46
64
|
end
|
47
65
|
|
48
66
|
context "value is not entered" do
|
@@ -36,6 +36,20 @@ module Capistrano
|
|
36
36
|
subject.set_defaults
|
37
37
|
expect(env.fetch(:git_wrapper_path)).to eq("/tmp/git-ssh-my_app-staging-(Git Web User) via ShipIt.sh")
|
38
38
|
end
|
39
|
+
|
40
|
+
it "makes git_max_concurrent_connections" do
|
41
|
+
subject.set_defaults
|
42
|
+
expect(env.fetch(:git_max_concurrent_connections)).to eq(10)
|
43
|
+
env.set(:git_max_concurrent_connections, 7)
|
44
|
+
expect(env.fetch(:git_max_concurrent_connections)).to eq(7)
|
45
|
+
end
|
46
|
+
|
47
|
+
it "makes git_wait_interval" do
|
48
|
+
subject.set_defaults
|
49
|
+
expect(env.fetch(:git_wait_interval)).to eq(0)
|
50
|
+
env.set(:git_wait_interval, 5)
|
51
|
+
expect(env.fetch(:git_wait_interval)).to eq(5)
|
52
|
+
end
|
39
53
|
end
|
40
54
|
|
41
55
|
describe "#git" do
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.14.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: 2020-06-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: airbrussh
|
@@ -262,7 +262,7 @@ metadata:
|
|
262
262
|
source_code_uri: https://github.com/capistrano/capistrano
|
263
263
|
homepage_uri: https://capistranorb.com/
|
264
264
|
documentation_uri: https://capistranorb.com/
|
265
|
-
post_install_message:
|
265
|
+
post_install_message:
|
266
266
|
rdoc_options: []
|
267
267
|
require_paths:
|
268
268
|
- lib
|
@@ -277,8 +277,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
277
277
|
- !ruby/object:Gem::Version
|
278
278
|
version: '0'
|
279
279
|
requirements: []
|
280
|
-
rubygems_version: 3.
|
281
|
-
signing_key:
|
280
|
+
rubygems_version: 3.1.4
|
281
|
+
signing_key:
|
282
282
|
specification_version: 4
|
283
283
|
summary: Capistrano - Welcome to easy deployment with Ruby over SSH
|
284
284
|
test_files:
|