Update upstream source from tag 'upstream/3.17.0'
Update to upstream version '3.17.0'
with Debian dir 14eb454fbd2a375fbad530f54b84917097ba0359
Samuel Henrique
2 years ago
|
0 |
version: 2.1
|
|
1 |
|
|
2 |
executors:
|
|
3 |
ruby:
|
|
4 |
parameters:
|
|
5 |
version:
|
|
6 |
description: "Ruby version number"
|
|
7 |
default: "3.1"
|
|
8 |
type: string
|
|
9 |
docker:
|
|
10 |
- image: ruby:<< parameters.version >>
|
|
11 |
|
|
12 |
commands:
|
|
13 |
bundle_install:
|
|
14 |
description: Install Ruby dependencies with Bundler
|
|
15 |
parameters:
|
|
16 |
version:
|
|
17 |
description: "Ruby version number"
|
|
18 |
default: "3.1"
|
|
19 |
type: string
|
|
20 |
steps:
|
|
21 |
- restore_cache:
|
|
22 |
keys:
|
|
23 |
- bundle-v1-{{ arch }}-<< parameters.version >>
|
|
24 |
- run:
|
|
25 |
name: Install Ruby Dependencies
|
|
26 |
command: |
|
|
27 |
gem install bundler --conservative --no-document || gem install bundler -v '< 2' --no-document
|
|
28 |
bundle config --local path vendor/bundle
|
|
29 |
bundle check || (bundle install --jobs=4 --retry=3 && bundle clean)
|
|
30 |
- save_cache:
|
|
31 |
paths:
|
|
32 |
- ./vendor/bundle
|
|
33 |
key: bundle-v1-{{ arch }}-<< parameters.version >>-{{ checksum "Gemfile.lock" }}
|
|
34 |
|
|
35 |
jobs:
|
|
36 |
danger:
|
|
37 |
executor: ruby
|
|
38 |
steps:
|
|
39 |
- checkout
|
|
40 |
- bundle_install
|
|
41 |
- run: bundle exec danger
|
|
42 |
|
|
43 |
rubocop:
|
|
44 |
executor: ruby
|
|
45 |
steps:
|
|
46 |
- checkout
|
|
47 |
- bundle_install
|
|
48 |
- run: bundle exec rubocop
|
|
49 |
|
|
50 |
spec:
|
|
51 |
parameters:
|
|
52 |
version:
|
|
53 |
description: "Ruby version number"
|
|
54 |
default: "3.1"
|
|
55 |
type: string
|
|
56 |
executor:
|
|
57 |
name: ruby
|
|
58 |
version: << parameters.version >>
|
|
59 |
steps:
|
|
60 |
- checkout
|
|
61 |
- bundle_install:
|
|
62 |
version: << parameters.version >>
|
|
63 |
- run: bundle exec rake spec
|
|
64 |
|
|
65 |
workflows:
|
|
66 |
version: 2
|
|
67 |
commit-workflow:
|
|
68 |
jobs:
|
|
69 |
- danger
|
|
70 |
- rubocop
|
|
71 |
- spec:
|
|
72 |
matrix:
|
|
73 |
parameters:
|
|
74 |
version:
|
|
75 |
[
|
|
76 |
"2.0",
|
|
77 |
"2.1",
|
|
78 |
"2.2",
|
|
79 |
"2.3",
|
|
80 |
"2.4",
|
|
81 |
"2.5",
|
|
82 |
"2.6",
|
|
83 |
"2.7",
|
|
84 |
"3.0",
|
|
85 |
"3.1",
|
|
86 |
]
|
|
87 |
cron-workflow:
|
|
88 |
jobs:
|
|
89 |
- rubocop
|
|
90 |
- spec:
|
|
91 |
matrix:
|
|
92 |
parameters:
|
|
93 |
version:
|
|
94 |
[
|
|
95 |
"2.0",
|
|
96 |
"2.1",
|
|
97 |
"2.2",
|
|
98 |
"2.3",
|
|
99 |
"2.4",
|
|
100 |
"2.5",
|
|
101 |
"2.6",
|
|
102 |
"2.7",
|
|
103 |
"3.0",
|
|
104 |
"3.1",
|
|
105 |
]
|
|
106 |
triggers:
|
|
107 |
- schedule:
|
|
108 |
cron: "0 13 * * 6"
|
|
109 |
filters:
|
|
110 |
branches:
|
|
111 |
only:
|
|
112 |
- master
|
0 | |
language: ruby
|
1 | |
rvm:
|
2 | |
- 3.0
|
3 | |
- 2.7
|
4 | |
- 2.6
|
5 | |
- 2.5
|
6 | |
- 2.4
|
7 | |
- 2.3
|
8 | |
- 2.2
|
9 | |
- 2.1
|
10 | |
- 2.0
|
11 | |
matrix:
|
12 | |
# Rubinius periodically fails in general, and it always segfaults for RuboCop
|
13 | |
# in particular. Until we figure out how to make it work consistently, allow
|
14 | |
# it to fail without breaking the build.
|
15 | |
allow_failures:
|
16 | |
- rvm: rbx-2
|
17 | |
include:
|
18 | |
- rvm: rbx-2
|
19 | |
script: bundle exec rake spec
|
20 | |
# Run Danger only once, on 2.5
|
21 | |
- rvm: 2.5
|
22 | |
before_script: bundle exec danger
|
23 | |
|
24 | |
script: bundle exec rake spec rubocop
|
25 | |
install: bundle install --jobs=1
|
26 | |
cache: bundler
|
27 | |
branches:
|
28 | |
only:
|
29 | |
- master
|
52 | 52 |
|
53 | 53 |
### Report failing Cucumber features!
|
54 | 54 |
|
55 | |
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.
|
|
55 |
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.
|
56 | 56 |
|
57 | 57 |
**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!
|
58 | 58 |
|
|
62 | 62 |
|
63 | 63 |
* Test that your contributions pass with `rake rubocop`
|
64 | 64 |
* Rubocop is also run as part of the full test suite with `rake`
|
65 | |
* Note the Travis build will fail and your PR cannot be merged if Rubocop finds errors
|
|
65 |
* Note the CI build will fail and your PR cannot be merged if Rubocop finds errors
|
66 | 66 |
|
67 | 67 |
## Submitting a pull request
|
68 | 68 |
|
1 | 1 |
|
2 | 2 |
# Specify your gem's dependencies in capistrano.gemspec
|
3 | 3 |
gemspec
|
|
4 |
|
|
5 |
gem "mocha"
|
|
6 |
gem "rspec"
|
|
7 |
gem "rspec-core", "~> 3.4.4"
|
4 | 8 |
|
5 | 9 |
group :cucumber do
|
6 | 10 |
# Latest versions of cucumber don't support Ruby < 2.1
|
|
11 | 15 |
gem "cucumber"
|
12 | 16 |
end
|
13 | 17 |
# rubocop:enable Bundler/DuplicatedGem
|
14 | |
gem "rspec"
|
15 | |
gem "rspec-core", "~> 3.4.4"
|
16 | 18 |
end
|
17 | 19 |
|
18 | 20 |
# Latest versions of net-ssh don't support Ruby < 2.2.6
|
|
35 | 37 |
gem "rake", "< 13.0.0"
|
36 | 38 |
end
|
37 | 39 |
|
38 | |
# We only run danger once on a new-ish ruby; no need to install it otherwise
|
|
40 |
# We only run danger and rubocop on a new-ish ruby; no need to install them otherwise
|
39 | 41 |
if Gem::Requirement.new("> 2.4").satisfied_by?(Gem::Version.new(RUBY_VERSION))
|
40 | 42 |
gem "danger"
|
|
43 |
gem "psych", "< 4" # Ensures rubocop works on Ruby 3.1
|
|
44 |
gem "rubocop", "0.48.1"
|
41 | 45 |
end
|
0 | 0 |
|
1 | 1 |
# Capistrano: A deployment automation tool built on Ruby, Rake, and SSH.
|
2 | 2 |
|
3 | |
[![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)
|
|
3 |
[![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)
|
4 | 4 |
|
5 | 5 |
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.
|
6 | 6 |
|
|
106 | 106 |
|
107 | 107 |
``` ruby
|
108 | 108 |
group :development do
|
109 | |
gem "capistrano", "~> 3.16", require: false
|
|
109 |
gem "capistrano", "~> 3.17", require: false
|
110 | 110 |
end
|
111 | 111 |
```
|
112 | 112 |
|
0 | 0 |
require "bundler/gem_tasks"
|
1 | 1 |
require "cucumber/rake/task"
|
2 | 2 |
require "rspec/core/rake_task"
|
3 | |
require "rubocop/rake_task"
|
4 | 3 |
|
5 | |
task default: %i(spec rubocop)
|
|
4 |
begin
|
|
5 |
require "rubocop/rake_task"
|
|
6 |
desc "Run RuboCop checks"
|
|
7 |
RuboCop::RakeTask.new
|
|
8 |
task default: %i(spec rubocop)
|
|
9 |
rescue LoadError
|
|
10 |
task default: :spec
|
|
11 |
end
|
|
12 |
|
6 | 13 |
RSpec::Core::RakeTask.new
|
7 | |
|
8 | 14 |
Cucumber::Rake::Task.new(:features)
|
9 | |
|
10 | |
desc "Run RuboCop checks"
|
11 | |
RuboCop::RakeTask.new
|
12 | 15 |
|
13 | 16 |
Rake::Task["release"].enhance do
|
14 | 17 |
puts "Don't forget to publish the release on GitHub!"
|
30 | 30 |
gem.add_dependency "i18n"
|
31 | 31 |
gem.add_dependency "rake", ">= 10.0.0"
|
32 | 32 |
gem.add_dependency "sshkit", ">= 1.9.0"
|
33 | |
|
34 | |
gem.add_development_dependency "mocha"
|
35 | |
gem.add_development_dependency "rspec"
|
36 | |
gem.add_development_dependency "rubocop", "0.48.1"
|
37 | 33 |
end
|
9 | 9 |
WHITELIST = %i(
|
10 | 10 |
application
|
11 | 11 |
current_directory
|
|
12 |
linked_dirs
|
|
13 |
linked_files
|
12 | 14 |
releases_directory
|
13 | 15 |
repo_url
|
14 | 16 |
repo_tree
|
20 | 20 |
# set :pty, true
|
21 | 21 |
|
22 | 22 |
# Default value for :linked_files is []
|
23 | |
# append :linked_files, "config/database.yml"
|
|
23 |
# append :linked_files, "config/database.yml", 'config/master.key'
|
24 | 24 |
|
25 | 25 |
# Default value for linked_dirs is []
|
26 | |
# append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "public/system"
|
|
26 |
# append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "tmp/webpacker", "public/system", "vendor", "storage"
|
27 | 27 |
|
28 | 28 |
# Default value for default_env is {}
|
29 | 29 |
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
|
0 | 0 |
module Capistrano
|
1 | |
VERSION = "3.16.0".freeze
|
|
1 |
VERSION = "3.17.0".freeze
|
2 | 2 |
end
|
5 | 5 |
[:app].each_with_index do |role, i|
|
6 | 6 |
config.vm.define(role, primary: true) do |primary|
|
7 | 7 |
primary.vm.define role
|
8 | |
primary.vm.box = "hashicorp/precise64"
|
|
8 |
primary.vm.box = "hashicorp/bionic64"
|
9 | 9 |
primary.vm.network "forwarded_port", guest: 22, host: "222#{i}".to_i
|
10 | 10 |
primary.vm.provision :shell, inline: "sudo apt-get -y install git-core"
|
11 | 11 |
|
39 | 39 |
FileUtils.mkdir(test_app_path)
|
40 | 40 |
|
41 | 41 |
File.open(gemfile, "w+") do |file|
|
|
42 |
file.write "source 'https://rubygems.org'\n"
|
42 | 43 |
file.write "gem 'capistrano', path: '#{path_to_cap}'"
|
43 | 44 |
end
|
44 | 45 |
|