capistrano 3.14.1 → 3.15.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 043f8c3dd4ea32b466125930ad359a67860c01276635d874027331c7cbd833c2
4
- data.tar.gz: abd8062f97408bb47b7238979b8d34c12e247d09f8d67b57f622bbf6774aed17
3
+ metadata.gz: 3f0b8e22a26ba92d6cf7d062d7b1fd2571add774ff9522a8282080e25e0c885a
4
+ data.tar.gz: 822a124b873390bd677370e4194103c94e756e0422feb1de5f3bdd0553a85315
5
5
  SHA512:
6
- metadata.gz: f1a16d9d47f4e46f359a8efefff98552b0cbaba85ac56cb78675f051aba779d34bd0e1546ea92952a553ae3619ad4c7e5f1586133f831cff07b9c794027f768b
7
- data.tar.gz: 4ff34f37f143133e8499dc9897222828d28cfb4a160fa0462a74b7180dda29c3efe7d98147d7d2134202360ad5503d77506827fd12b6b86e63d010c7dcbe8122
6
+ metadata.gz: fa22266dc215f03041ba72b0b36a2dc88df951fea9426912c2aa34f8683daa622f0acffeb801768ed0cc82571eeebfd9bce11e0f6708b997f44d446d10d53ba4
7
+ data.tar.gz: 338e679cf1601854f6d5f2f692693550fbd7d46d94add967df47770f830926bf55c170e09b748076b330f53f305be1dec990139c49b8a0a4c43527e573d9a9da
@@ -1,10 +1,11 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.7.1
4
- - 2.6.6
5
- - 2.5.8
6
- - 2.4.10
7
- - 2.3.8
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.8
21
- - rvm: 2.5.8
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.git_wrapper_path.shellescape}) == "700" ])
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
@@ -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
- # Try to avoid permissions issues when multiple users deploy the same app
11
- # by using different file names in the same dir for each deployer and stage.
12
- suffix = %i(application stage local_user).map { |key| fetch(key).to_s }.join("-")
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
  {
@@ -1,3 +1,3 @@
1
1
  module Capistrano
2
- VERSION = "3.14.1".freeze
2
+ VERSION = "3.15.0".freeze
3
3
  end
@@ -28,13 +28,10 @@ module Capistrano
28
28
  end
29
29
 
30
30
  describe "#set_defaults" do
31
- it "makes git_wrapper_path using application, stage, and local_user" do
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 eq("/tmp/git-ssh-my_app-staging-(Git Web User) via ShipIt.sh")
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
@@ -185,12 +185,17 @@ module TestApp
185
185
  FileUtils.mv(config_path, location)
186
186
  end
187
187
 
188
- def git_wrapper_path
189
- "/tmp/git-ssh-my_app_name-#{stage}-#{current_user}.sh"
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
- Bundler.with_clean_env(&block)
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.14.1
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: 2020-06-10 00:00:00.000000000 Z
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.1.4
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