capistrano 3.15.0 → 3.17.1

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: 3f0b8e22a26ba92d6cf7d062d7b1fd2571add774ff9522a8282080e25e0c885a
4
- data.tar.gz: 822a124b873390bd677370e4194103c94e756e0422feb1de5f3bdd0553a85315
3
+ metadata.gz: d1c38f58d2aa91116526937329147c2a8800623bf11d3354f1d3c2582fad602d
4
+ data.tar.gz: 5595af026c2fc6deef47413bc5dd094436193a51bebb655109f6510f12ebd250
5
5
  SHA512:
6
- metadata.gz: fa22266dc215f03041ba72b0b36a2dc88df951fea9426912c2aa34f8683daa622f0acffeb801768ed0cc82571eeebfd9bce11e0f6708b997f44d446d10d53ba4
7
- data.tar.gz: 338e679cf1601854f6d5f2f692693550fbd7d46d94add967df47770f830926bf55c170e09b748076b330f53f305be1dec990139c49b8a0a4c43527e573d9a9da
6
+ metadata.gz: 2822f52ebf86408b876aeb4fd9f8bcc791d64c987661d7ad33b71fb36f3abf0c7b1ab782e59cddca65cd7816b963266b3964030fbe9bed327c8b300501e07e34
7
+ data.tar.gz: fd6f100932f0a35404c3d332c7a6f18c3d06bf968301f71f56b38ccd9455e45abad3da40901e8ec3c41a81c3316e01b3af17f21db5b49898a65168bbc4a14db7
@@ -0,0 +1,129 @@
1
+ version: 2.1
2
+
3
+ executors:
4
+ ruby:
5
+ parameters:
6
+ version:
7
+ description: "Ruby version number"
8
+ default: "3.1"
9
+ type: string
10
+ docker:
11
+ - image: ruby:<< parameters.version >>
12
+
13
+ commands:
14
+ bundle_install:
15
+ description: Install Ruby dependencies with Bundler
16
+ parameters:
17
+ version:
18
+ description: "Ruby version number"
19
+ default: "3.1"
20
+ type: string
21
+ steps:
22
+ - restore_cache:
23
+ keys:
24
+ - bundle-v1-{{ arch }}-<< parameters.version >>
25
+ - run:
26
+ name: Install Ruby Dependencies
27
+ command: |
28
+ gem install bundler --conservative --no-document || gem install bundler -v '< 2' --no-document
29
+ bundle config --local path vendor/bundle
30
+ bundle check || (bundle install --jobs=4 --retry=3 && bundle clean)
31
+ - save_cache:
32
+ paths:
33
+ - ./vendor/bundle
34
+ key: bundle-v1-{{ arch }}-<< parameters.version >>-{{ checksum "Gemfile.lock" }}
35
+ update_ssh_client:
36
+ description: Install recent SSH client for compatibility with GitHub
37
+ steps:
38
+ - run:
39
+ name: Install OpenSSH 8.1p1 if necessary
40
+ command: |
41
+ if $(ssh -V 2>&1 | grep -q -v OpenSSH_8); then
42
+ apt-get update
43
+ apt-get install -y libssl-dev
44
+ mkdir ~/tempdownload
45
+ cd ~/tempdownload
46
+ wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.1p1.tar.gz
47
+ tar zxvf openssh-8.1p1.tar.gz
48
+ cd openssh-8.1p1 && ./configure --prefix=/usr && make ssh && make install
49
+ fi
50
+
51
+ jobs:
52
+ danger:
53
+ executor: ruby
54
+ steps:
55
+ - checkout
56
+ - bundle_install
57
+ - run: bundle exec danger
58
+
59
+ rubocop:
60
+ executor: ruby
61
+ steps:
62
+ - checkout
63
+ - bundle_install
64
+ - run: bundle exec rubocop
65
+
66
+ spec:
67
+ parameters:
68
+ version:
69
+ description: "Ruby version number"
70
+ default: "3.1"
71
+ type: string
72
+ executor:
73
+ name: ruby
74
+ version: << parameters.version >>
75
+ steps:
76
+ - update_ssh_client
77
+ - checkout
78
+ - bundle_install:
79
+ version: << parameters.version >>
80
+ - run: bundle exec rake spec
81
+
82
+ workflows:
83
+ version: 2
84
+ commit-workflow:
85
+ jobs:
86
+ - danger
87
+ - rubocop
88
+ - spec:
89
+ matrix:
90
+ parameters:
91
+ version:
92
+ [
93
+ "2.0",
94
+ "2.1",
95
+ "2.2",
96
+ "2.3",
97
+ "2.4",
98
+ "2.5",
99
+ "2.6",
100
+ "2.7",
101
+ "3.0",
102
+ "3.1",
103
+ ]
104
+ cron-workflow:
105
+ jobs:
106
+ - rubocop
107
+ - spec:
108
+ matrix:
109
+ parameters:
110
+ version:
111
+ [
112
+ "2.0",
113
+ "2.1",
114
+ "2.2",
115
+ "2.3",
116
+ "2.4",
117
+ "2.5",
118
+ "2.6",
119
+ "2.7",
120
+ "3.0",
121
+ "3.1",
122
+ ]
123
+ triggers:
124
+ - schedule:
125
+ cron: "0 13 * * 6"
126
+ filters:
127
+ branches:
128
+ only:
129
+ - master
data/DEVELOPMENT.md CHANGED
@@ -53,7 +53,7 @@ $ bundle exec rake features KEEP_RUNNING=1
53
53
 
54
54
  ### Report failing Cucumber features!
55
55
 
56
- Currently, the Capistrano Travis 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.
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
57
 
58
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
59
 
@@ -63,7 +63,7 @@ This project uses [RuboCop](https://github.com/bbatsov/rubocop) to enforce stand
63
63
 
64
64
  * Test that your contributions pass with `rake rubocop`
65
65
  * Rubocop is also run as part of the full test suite with `rake`
66
- * Note the Travis build will fail and your PR cannot be merged if Rubocop finds errors
66
+ * Note the CI build will fail and your PR cannot be merged if Rubocop finds errors
67
67
 
68
68
  ## Submitting a pull request
69
69
 
data/Gemfile CHANGED
@@ -3,6 +3,10 @@ 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
+
6
10
  group :cucumber do
7
11
  # Latest versions of cucumber don't support Ruby < 2.1
8
12
  # rubocop:disable Bundler/DuplicatedGem
@@ -12,8 +16,6 @@ group :cucumber do
12
16
  gem "cucumber"
13
17
  end
14
18
  # rubocop:enable Bundler/DuplicatedGem
15
- gem "rspec"
16
- gem "rspec-core", "~> 3.4.4"
17
19
  end
18
20
 
19
21
  # Latest versions of net-ssh don't support Ruby < 2.2.6
@@ -36,7 +38,9 @@ if Gem::Requirement.new("< 2.2").satisfied_by?(Gem::Version.new(RUBY_VERSION))
36
38
  gem "rake", "< 13.0.0"
37
39
  end
38
40
 
39
- # We only run danger once on a new-ish ruby; no need to install it otherwise
41
+ # We only run danger and rubocop on a new-ish ruby; no need to install them otherwise
40
42
  if Gem::Requirement.new("> 2.4").satisfied_by?(Gem::Version.new(RUBY_VERSION))
41
43
  gem "danger"
44
+ gem "psych", "< 4" # Ensures rubocop works on Ruby 3.1
45
+ gem "rubocop", "0.48.1"
42
46
  end
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  # Capistrano: A deployment automation tool built on Ruby, Rake, and SSH.
3
3
 
4
- [![Gem Version](https://badge.fury.io/rb/capistrano.svg)](http://badge.fury.io/rb/capistrano) [![Build Status](https://travis-ci.org/capistrano/capistrano.svg?branch=master)](https://travis-ci.org/capistrano/capistrano) [![Code Climate](https://codeclimate.com/github/capistrano/capistrano/badges/gpa.svg)](https://codeclimate.com/github/capistrano/capistrano) [![CodersClan](https://img.shields.io/badge/get-support-blue.svg)](http://codersclan.net/?repo_id=325&source=small)
4
+ [![Gem Version](https://badge.fury.io/rb/capistrano.svg)](http://badge.fury.io/rb/capistrano) [![Build Status](https://circleci.com/gh/capistrano/capistrano/tree/master.svg?style=shield)](https://app.circleci.com/pipelines/github/capistrano/capistrano?branch=master) [![Code Climate](https://codeclimate.com/github/capistrano/capistrano/badges/gpa.svg)](https://codeclimate.com/github/capistrano/capistrano) [![CodersClan](https://img.shields.io/badge/get-support-blue.svg)](http://codersclan.net/?repo_id=325&source=small)
5
5
 
6
6
  Capistrano is a framework for building automated deployment scripts. Although Capistrano itself is written in Ruby, it can easily be used to deploy projects of any language or framework, be it Rails, Java, or PHP.
7
7
 
@@ -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.14", require: false
110
+ gem "capistrano", "~> 3.17", require: false
111
111
  end
112
112
  ```
113
113
 
data/Rakefile CHANGED
@@ -1,16 +1,19 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "cucumber/rake/task"
3
3
  require "rspec/core/rake_task"
4
- require "rubocop/rake_task"
5
4
 
6
- task default: %i(spec rubocop)
7
- RSpec::Core::RakeTask.new
5
+ begin
6
+ require "rubocop/rake_task"
7
+ desc "Run RuboCop checks"
8
+ RuboCop::RakeTask.new
9
+ task default: %i(spec rubocop)
10
+ rescue LoadError
11
+ task default: :spec
12
+ end
8
13
 
14
+ RSpec::Core::RakeTask.new
9
15
  Cucumber::Rake::Task.new(:features)
10
16
 
11
- desc "Run RuboCop checks"
12
- RuboCop::RakeTask.new
13
-
14
17
  Rake::Task["release"].enhance do
15
18
  puts "Don't forget to publish the release on GitHub!"
16
19
  system "open https://github.com/capistrano/capistrano/releases"
data/capistrano.gemspec CHANGED
@@ -31,8 +31,4 @@ Gem::Specification.new do |gem|
31
31
  gem.add_dependency "i18n"
32
32
  gem.add_dependency "rake", ">= 10.0.0"
33
33
  gem.add_dependency "sshkit", ">= 1.9.0"
34
-
35
- gem.add_development_dependency "mocha"
36
- gem.add_development_dependency "rspec"
37
- gem.add_development_dependency "rubocop", "0.48.1"
38
34
  end
@@ -30,6 +30,12 @@ module VagrantHelpers
30
30
  return [stdout, stderr] if status.success?
31
31
  raise VagrantSSHCommandError, status
32
32
  end
33
+
34
+ def puts(message)
35
+ # Attach log messages to the current cucumber feature (`log`),
36
+ # or simply puts to the console (`super`) if we are outside of cucumber.
37
+ respond_to?(:log) ? log(message) : super(message)
38
+ end
33
39
  end
34
40
 
35
41
  World(VagrantHelpers)
@@ -10,6 +10,8 @@ module Capistrano
10
10
  WHITELIST = %i(
11
11
  application
12
12
  current_directory
13
+ linked_dirs
14
+ linked_files
13
15
  releases_directory
14
16
  repo_url
15
17
  repo_tree
@@ -60,6 +60,10 @@ class Capistrano::SCM::Git < Capistrano::SCM::Plugin
60
60
  end
61
61
  end
62
62
 
63
+ def verify_commit
64
+ git :"verify-commit", fetch_revision
65
+ end
66
+
63
67
  def archive_to_release_path
64
68
  if (tree = fetch(:repo_tree))
65
69
  tree = tree.slice %r#^/?(.*?)/?$#, 1
@@ -42,6 +42,7 @@ namespace :git do
42
42
  within repo_path do
43
43
  with fetch(:git_environmental_variables) do
44
44
  git_plugin.update_mirror
45
+ git_plugin.verify_commit if fetch(:git_verify_commit)
45
46
  end
46
47
  end
47
48
  end
@@ -21,10 +21,10 @@ set :repo_url, "git@example.com:me/my_repo.git"
21
21
  # set :pty, true
22
22
 
23
23
  # Default value for :linked_files is []
24
- # append :linked_files, "config/database.yml"
24
+ # append :linked_files, "config/database.yml", 'config/master.key'
25
25
 
26
26
  # Default value for linked_dirs is []
27
- # append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "public/system"
27
+ # append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "tmp/webpacker", "public/system", "vendor", "storage"
28
28
 
29
29
  # Default value for default_env is {}
30
30
  # set :default_env, { path: "/opt/ruby/bin:$PATH" }
@@ -1,3 +1,3 @@
1
1
  module Capistrano
2
- VERSION = "3.15.0".freeze
2
+ VERSION = "3.17.1".freeze
3
3
  end
@@ -169,5 +169,16 @@ module Capistrano
169
169
  expect(revision).to eq("81cec13b777ff46348693d327fc8e7832f79bf43")
170
170
  end
171
171
  end
172
+
173
+ describe "#verify_commit" do
174
+ it "should run git verify-commit" do
175
+ env.set(:branch, "branch")
176
+
177
+ backend.expects(:capture).with(:git, "rev-list --max-count=1 branch").returns("81cec13b777ff46348693d327fc8e7832f79bf43")
178
+ backend.expects(:execute).with(:git, :"verify-commit", "81cec13b777ff46348693d327fc8e7832f79bf43")
179
+
180
+ subject.verify_commit
181
+ end
182
+ end
172
183
  end
173
184
  end
@@ -6,7 +6,7 @@ Vagrant.configure("2") do |config|
6
6
  [:app].each_with_index do |role, i|
7
7
  config.vm.define(role, primary: true) do |primary|
8
8
  primary.vm.define role
9
- primary.vm.box = "hashicorp/precise64"
9
+ primary.vm.box = "hashicorp/bionic64"
10
10
  primary.vm.network "forwarded_port", guest: 22, host: "222#{i}".to_i
11
11
  primary.vm.provision :shell, inline: "sudo apt-get -y install git-core"
12
12
 
@@ -12,7 +12,7 @@ module TestApp
12
12
  def default_config
13
13
  <<-CONFIG
14
14
  set :deploy_to, '#{deploy_to}'
15
- set :repo_url, 'git://github.com/capistrano/capistrano.git'
15
+ set :repo_url, 'https://github.com/capistrano/capistrano.git'
16
16
  set :branch, 'master'
17
17
  set :ssh_options, { keys: "\#{ENV['HOME']}/.vagrant.d/insecure_private_key", auth_methods: ['publickey'] }
18
18
  server 'vagrant@localhost:2220', roles: %w{web app}
@@ -40,6 +40,7 @@ module TestApp
40
40
  FileUtils.mkdir(test_app_path)
41
41
 
42
42
  File.open(gemfile, "w+") do |file|
43
+ file.write "source 'https://rubygems.org'\n"
43
44
  file.write "gem 'capistrano', path: '#{path_to_cap}'"
44
45
  end
45
46
 
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.15.0
4
+ version: 3.17.1
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: 2021-01-05 00:00:00.000000000 Z
12
+ date: 2022-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: airbrussh
@@ -67,48 +67,6 @@ dependencies:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: 1.9.0
70
- - !ruby/object:Gem::Dependency
71
- name: mocha
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: '0'
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- version: '0'
84
- - !ruby/object:Gem::Dependency
85
- name: rspec
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: '0'
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- version: '0'
98
- - !ruby/object:Gem::Dependency
99
- name: rubocop
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - '='
103
- - !ruby/object:Gem::Version
104
- version: 0.48.1
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - '='
110
- - !ruby/object:Gem::Version
111
- version: 0.48.1
112
70
  description: Capistrano is a utility and framework for executing commands in parallel
113
71
  on multiple remote machines, via SSH.
114
72
  email:
@@ -120,13 +78,13 @@ executables:
120
78
  extensions: []
121
79
  extra_rdoc_files: []
122
80
  files:
81
+ - ".circleci/config.yml"
123
82
  - ".github/issue_template.md"
124
83
  - ".github/pull_request_template.md"
125
84
  - ".github/release-drafter.yml"
126
85
  - ".github/workflows/push.yml"
127
86
  - ".gitignore"
128
87
  - ".rubocop.yml"
129
- - ".travis.yml"
130
88
  - CHANGELOG.md
131
89
  - CONTRIBUTING.md
132
90
  - DEVELOPMENT.md
@@ -277,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
277
235
  - !ruby/object:Gem::Version
278
236
  version: '0'
279
237
  requirements: []
280
- rubygems_version: 3.2.4
238
+ rubygems_version: 3.3.18
281
239
  signing_key:
282
240
  specification_version: 4
283
241
  summary: Capistrano - Welcome to easy deployment with Ruby over SSH
data/.travis.yml DELETED
@@ -1,30 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 3.0
4
- - 2.7
5
- - 2.6
6
- - 2.5
7
- - 2.4
8
- - 2.3
9
- - 2.2
10
- - 2.1
11
- - 2.0
12
- matrix:
13
- # Rubinius periodically fails in general, and it always segfaults for RuboCop
14
- # in particular. Until we figure out how to make it work consistently, allow
15
- # it to fail without breaking the build.
16
- allow_failures:
17
- - rvm: rbx-2
18
- include:
19
- - rvm: rbx-2
20
- script: bundle exec rake spec
21
- # Run Danger only once, on 2.5
22
- - rvm: 2.5
23
- before_script: bundle exec danger
24
-
25
- script: bundle exec rake spec rubocop
26
- install: bundle install --jobs=1
27
- cache: bundler
28
- branches:
29
- only:
30
- - master