capistrano 3.14.1 → 3.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 +4 -4
- data/.travis.yml +8 -7
- data/features/step_definitions/assertions.rb +1 -1
- data/lib/capistrano/scm/git.rb +4 -4
- data/lib/capistrano/version.rb +1 -1
- data/spec/lib/capistrano/scm/git_spec.rb +2 -5
- data/spec/support/test_app.rb +8 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f0b8e22a26ba92d6cf7d062d7b1fd2571add774ff9522a8282080e25e0c885a
|
4
|
+
data.tar.gz: 822a124b873390bd677370e4194103c94e756e0422feb1de5f3bdd0553a85315
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa22266dc215f03041ba72b0b36a2dc88df951fea9426912c2aa34f8683daa622f0acffeb801768ed0cc82571eeebfd9bce11e0f6708b997f44d446d10d53ba4
|
7
|
+
data.tar.gz: 338e679cf1601854f6d5f2f692693550fbd7d46d94add967df47770f830926bf55c170e09b748076b330f53f305be1dec990139c49b8a0a4c43527e573d9a9da
|
data/.travis.yml
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
-
|
4
|
-
- 2.
|
5
|
-
- 2.
|
6
|
-
- 2.
|
7
|
-
- 2.
|
3
|
+
- 3.0
|
4
|
+
- 2.7
|
5
|
+
- 2.6
|
6
|
+
- 2.5
|
7
|
+
- 2.4
|
8
|
+
- 2.3
|
8
9
|
- 2.2
|
9
10
|
- 2.1
|
10
11
|
- 2.0
|
@@ -17,8 +18,8 @@ matrix:
|
|
17
18
|
include:
|
18
19
|
- rvm: rbx-2
|
19
20
|
script: bundle exec rake spec
|
20
|
-
# Run Danger only once, on 2.5
|
21
|
-
- rvm: 2.5
|
21
|
+
# Run Danger only once, on 2.5
|
22
|
+
- rvm: 2.5
|
22
23
|
before_script: bundle exec danger
|
23
24
|
|
24
25
|
script: bundle exec rake spec rubocop
|
@@ -5,7 +5,7 @@ Then(/^references in the remote repo are listed$/) do
|
|
5
5
|
end
|
6
6
|
|
7
7
|
Then(/^git wrapper permissions are 0700$/) do
|
8
|
-
permissions_test = %Q([ $(stat -c "%a" #{TestApp.
|
8
|
+
permissions_test = %Q([ $(stat -c "%a" #{TestApp.git_wrapper_path_glob}) == "700" ])
|
9
9
|
_stdout, _stderr, status = vagrant_cli_command("ssh -c #{permissions_test.shellescape}")
|
10
10
|
|
11
11
|
expect(status).to be_success
|
data/lib/capistrano/scm/git.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require "capistrano/scm/plugin"
|
2
2
|
require "cgi"
|
3
|
+
require "securerandom"
|
3
4
|
require "shellwords"
|
4
5
|
require "uri"
|
5
6
|
|
@@ -7,10 +8,9 @@ class Capistrano::SCM::Git < Capistrano::SCM::Plugin
|
|
7
8
|
def set_defaults
|
8
9
|
set_if_empty :git_shallow_clone, false
|
9
10
|
set_if_empty :git_wrapper_path, lambda {
|
10
|
-
#
|
11
|
-
#
|
12
|
-
|
13
|
-
"#{fetch(:tmp_dir)}/git-ssh-#{suffix}.sh"
|
11
|
+
# Use a unique name that won't collide with other deployments, and
|
12
|
+
# that cannot be guessed by other processes that have access to /tmp.
|
13
|
+
"#{fetch(:tmp_dir)}/git-ssh-#{SecureRandom.hex(10)}.sh"
|
14
14
|
}
|
15
15
|
set_if_empty :git_environmental_variables, lambda {
|
16
16
|
{
|
data/lib/capistrano/version.rb
CHANGED
@@ -28,13 +28,10 @@ module Capistrano
|
|
28
28
|
end
|
29
29
|
|
30
30
|
describe "#set_defaults" do
|
31
|
-
it "makes git_wrapper_path using
|
31
|
+
it "makes git_wrapper_path using a random hex value" do
|
32
32
|
env.set(:tmp_dir, "/tmp")
|
33
|
-
env.set(:application, "my_app")
|
34
|
-
env.set(:stage, "staging")
|
35
|
-
env.set(:local_user, "(Git Web User) via ShipIt")
|
36
33
|
subject.set_defaults
|
37
|
-
expect(env.fetch(:git_wrapper_path)).to
|
34
|
+
expect(env.fetch(:git_wrapper_path)).to match(%r{/tmp/git-ssh-\h{20}\.sh})
|
38
35
|
end
|
39
36
|
|
40
37
|
it "makes git_max_concurrent_connections" do
|
data/spec/support/test_app.rb
CHANGED
@@ -185,12 +185,17 @@ module TestApp
|
|
185
185
|
FileUtils.mv(config_path, location)
|
186
186
|
end
|
187
187
|
|
188
|
-
def
|
189
|
-
"/tmp/git-ssh
|
188
|
+
def git_wrapper_path_glob
|
189
|
+
"/tmp/git-ssh-*.sh"
|
190
190
|
end
|
191
191
|
|
192
192
|
def with_clean_bundler_env(&block)
|
193
193
|
return yield unless defined?(Bundler)
|
194
|
-
|
194
|
+
|
195
|
+
if Bundler.respond_to?(:with_unbundled_env)
|
196
|
+
Bundler.with_unbundled_env(&block)
|
197
|
+
else
|
198
|
+
Bundler.with_clean_env(&block)
|
199
|
+
end
|
195
200
|
end
|
196
201
|
end
|
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: 3.
|
4
|
+
version: 3.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Clements
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-01-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: airbrussh
|
@@ -277,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
277
277
|
- !ruby/object:Gem::Version
|
278
278
|
version: '0'
|
279
279
|
requirements: []
|
280
|
-
rubygems_version: 3.
|
280
|
+
rubygems_version: 3.2.4
|
281
281
|
signing_key:
|
282
282
|
specification_version: 4
|
283
283
|
summary: Capistrano - Welcome to easy deployment with Ruby over SSH
|