Skip to content

Commit 491a132

Browse files
committed
Upgrade Ruby.
1 parent a65027e commit 491a132

12 files changed

+181
-101
lines changed

.circleci/config.yml

+41-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
version: 2.1
22

33
orbs:
4-
slack: circleci/slack@4.8.3
4+
slack: circleci/slack@4.13.2
55

6-
defaults: &defaults
6+
base_container: &base_container
7+
image: buildpack-deps:buster
8+
9+
build_container: &build_container
10+
resource_class: arm.medium
711
docker:
8-
- image: ruby:2.7.5
12+
- <<: *base_container
913

1014
slack_context: &slack_context
1115
context:
@@ -61,49 +65,76 @@ commands:
6165
event: pass
6266
channel: builds
6367
template: SLACK_SUCCESS_NOTIFICATION
64-
configure_tools:
68+
69+
configure_build_tools:
70+
steps:
71+
- run: ./scripts/ci/common/install-slack-deps.sh
72+
- restore_cache:
73+
keys:
74+
- asdf-dependencies-{{ arch }}-v2-{{ checksum ".tool-versions" }}
75+
- asdf-dependencies-{{ arch }}-v2-
76+
- run: ./scripts/ci/common/install-asdf.sh
77+
- run: ./scripts/ci/common/configure-asdf.sh
78+
- run: ./scripts/ci/common/install-asdf-dependencies.sh
79+
- save_cache:
80+
key: asdf-dependencies-{{ arch }}-v2-{{ checksum ".tool-versions" }}
81+
paths:
82+
- ~/.asdf
83+
84+
configure_secrets_tools:
6585
steps:
6686
- run: ./scripts/ci/common/install-git-crypt.sh
6787
- run: ./scripts/ci/common/install-gpg-key.sh
68-
- run: ./scripts/ci/common/install-orb-deps.sh
6988
- run: ./scripts/ci/common/configure-git.sh
89+
90+
configure_release_tools:
91+
steps:
92+
- add_ssh_keys:
93+
fingerprints:
94+
- "SHA256:FBsNLH/GlPX3s4wWMB0CGsH5Mam0IpyL7DlQ4qNIM9c"
7095
- run: ./scripts/ci/common/configure-rubygems.sh
7196

97+
configure_tools:
98+
steps:
99+
- configure_build_tools
100+
- configure_secrets_tools
101+
- configure_release_tools
102+
72103
jobs:
73104
build:
74-
<<: *defaults
105+
<<: *build_container
75106
steps:
76107
- checkout
77108
- configure_tools
78109
- run: ./scripts/ci/steps/build.sh
79110
- notify
80111

81112
test:
82-
<<: *defaults
113+
<<: *build_container
83114
steps:
84115
- checkout
85116
- configure_tools
86117
- run: ./scripts/ci/steps/test.sh
87118
- notify
88119

89120
prerelease:
90-
<<: *defaults
121+
<<: *build_container
91122
steps:
92123
- checkout
93124
- configure_tools
94125
- run: ./scripts/ci/steps/prerelease.sh
95126
- notify
96127

97128
release:
98-
<<: *defaults
129+
<<: *build_container
99130
steps:
100131
- checkout
101132
- configure_tools
102133
- run: ./scripts/ci/steps/release.sh
103134
- notify
104135

105136
merge_pull_request:
106-
<<: *defaults
137+
<<: *build_container
107138
steps:
108139
- checkout
109140
- configure_tools

.ruby-version

-1
This file was deleted.

.tool-versions

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby 2.7.5
1+
ruby 3.1.1

Gemfile.lock

+71-70
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ PATH
33
specs:
44
rake_ssh (0.11.0.pre.4)
55
colored2 (~> 3.1)
6-
rake_factory (~> 0.23)
6+
rake_factory (~> 0.33)
77
sshkey (~> 2.0)
88

99
GEM
1010
remote: https://rubygems.org/
1111
specs:
12-
activesupport (7.1.2)
12+
activesupport (7.1.3.4)
1313
base64
1414
bigdecimal
1515
concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -19,124 +19,123 @@ GEM
1919
minitest (>= 5.1)
2020
mutex_m
2121
tzinfo (~> 2.0)
22-
addressable (2.8.5)
23-
public_suffix (>= 2.0.2, < 6.0)
22+
addressable (2.8.7)
23+
public_suffix (>= 2.0.2, < 7.0)
2424
ast (2.4.2)
2525
base64 (0.2.0)
26-
bigdecimal (3.1.4)
26+
bigdecimal (3.1.8)
27+
childprocess (5.0.0)
2728
colored2 (3.1.2)
28-
concurrent-ruby (1.2.2)
29+
concurrent-ruby (1.3.3)
2930
connection_pool (2.4.1)
30-
diff-lcs (1.5.0)
31+
diff-lcs (1.5.1)
3132
docile (1.4.0)
32-
drb (2.2.0)
33-
ruby2_keywords
34-
excon (0.104.0)
35-
faraday (2.7.11)
36-
base64
37-
faraday-net_http (>= 2.0, < 3.1)
38-
ruby2_keywords (>= 0.0.4)
39-
faraday-net_http (3.0.2)
33+
drb (2.2.1)
34+
excon (0.111.0)
35+
faraday (2.10.0)
36+
faraday-net_http (>= 2.0, < 3.2)
37+
logger
38+
faraday-net_http (3.1.0)
39+
net-http
4040
gem-release (2.2.2)
41-
git (1.18.0)
41+
git (1.19.1)
4242
addressable (~> 2.8)
4343
rchardet (~> 1.8)
4444
hamster (3.0.0)
4545
concurrent-ruby (~> 1.0)
46-
i18n (1.14.1)
46+
i18n (1.14.5)
4747
concurrent-ruby (~> 1.0)
4848
immutable-struct (2.4.1)
49-
json (2.7.1)
49+
json (2.7.2)
5050
language_server-protocol (3.17.0.3)
51-
lino (3.1.0)
51+
lino (4.1.0)
52+
childprocess (~> 5.0.0)
5253
hamster (~> 3.0)
5354
open4 (~> 1.3)
55+
logger (1.6.0)
5456
memfs (1.0.0)
55-
minitest (5.20.0)
57+
minitest (5.24.1)
5658
mutex_m (0.2.0)
57-
octokit (8.0.0)
59+
net-http (0.4.1)
60+
uri
61+
octokit (8.1.0)
62+
base64
5863
faraday (>= 1, < 3)
5964
sawyer (~> 0.9)
6065
open4 (1.3.4)
61-
parallel (1.23.0)
62-
parser (3.2.2.4)
66+
parallel (1.25.1)
67+
parser (3.3.4.0)
6368
ast (~> 2.4.1)
6469
racc
65-
public_suffix (5.0.3)
66-
racc (1.7.3)
70+
public_suffix (6.0.0)
71+
racc (1.8.0)
6772
rainbow (3.1.1)
68-
rake (13.1.0)
69-
rake_circle_ci (0.11.0)
73+
rake (13.2.1)
74+
rake_circle_ci (0.13.0)
7075
colored2 (~> 3.1)
7176
excon (~> 0.72)
72-
rake_factory (~> 0.23)
77+
rake_factory (~> 0.33)
7378
sshkey (~> 2.0)
74-
rake_factory (0.32.0.pre.2)
79+
rake_factory (0.33.0)
7580
activesupport (>= 4)
7681
rake (~> 13.0)
77-
rake_git (0.1.0.pre.10)
82+
rake_git (0.2.0)
7883
colored2 (~> 3.1)
7984
git (~> 1.13, >= 1.13.2)
80-
rake_factory (= 0.32.0.pre.2)
81-
rake_git_crypt (0.1.0.pre.29)
85+
rake_factory (~> 0.33)
86+
rake_git_crypt (0.2.0)
8287
colored2 (~> 3.1)
83-
rake_factory (= 0.32.0.pre.2)
84-
ruby_git_crypt (= 0.1.0.pre.4)
85-
ruby_gpg2 (~> 0.6)
88+
rake_factory (~> 0.33)
89+
ruby_git_crypt (~> 0.1)
90+
ruby_gpg2 (~> 0.12)
8691
rake_github (0.13.0)
8792
colored2 (~> 3.1)
8893
octokit (>= 4.16, < 9.0)
8994
rake_factory (~> 0.23)
9095
sshkey (~> 2.0)
91-
rake_gpg (0.18.0)
92-
rake_factory (~> 0.23)
93-
ruby_gpg2 (~> 0.6)
96+
rake_gpg (0.20.0)
97+
rake_factory (~> 0.33)
98+
ruby_gpg2 (~> 0.12)
9499
rchardet (1.8.0)
95-
regexp_parser (2.8.3)
96-
rexml (3.2.6)
97-
rspec (3.12.0)
98-
rspec-core (~> 3.12.0)
99-
rspec-expectations (~> 3.12.0)
100-
rspec-mocks (~> 3.12.0)
101-
rspec-core (3.12.2)
102-
rspec-support (~> 3.12.0)
103-
rspec-expectations (3.12.3)
100+
regexp_parser (2.9.2)
101+
rexml (3.3.2)
102+
strscan
103+
rspec (3.13.0)
104+
rspec-core (~> 3.13.0)
105+
rspec-expectations (~> 3.13.0)
106+
rspec-mocks (~> 3.13.0)
107+
rspec-core (3.13.0)
108+
rspec-support (~> 3.13.0)
109+
rspec-expectations (3.13.1)
104110
diff-lcs (>= 1.2.0, < 2.0)
105-
rspec-support (~> 3.12.0)
106-
rspec-mocks (3.12.6)
111+
rspec-support (~> 3.13.0)
112+
rspec-mocks (3.13.1)
107113
diff-lcs (>= 1.2.0, < 2.0)
108-
rspec-support (~> 3.12.0)
109-
rspec-support (3.12.1)
110-
rubocop (1.59.0)
114+
rspec-support (~> 3.13.0)
115+
rspec-support (3.13.1)
116+
rubocop (1.65.0)
111117
json (~> 2.3)
112118
language_server-protocol (>= 3.17.0)
113119
parallel (~> 1.10)
114-
parser (>= 3.2.2.4)
120+
parser (>= 3.3.0.2)
115121
rainbow (>= 2.2.2, < 4.0)
116-
regexp_parser (>= 1.8, < 3.0)
122+
regexp_parser (>= 2.4, < 3.0)
117123
rexml (>= 3.2.5, < 4.0)
118-
rubocop-ast (>= 1.30.0, < 2.0)
124+
rubocop-ast (>= 1.31.1, < 2.0)
119125
ruby-progressbar (~> 1.7)
120126
unicode-display_width (>= 2.4.0, < 3.0)
121-
rubocop-ast (1.30.0)
122-
parser (>= 3.2.1.0)
123-
rubocop-capybara (2.19.0)
124-
rubocop (~> 1.41)
125-
rubocop-factory_bot (2.24.0)
126-
rubocop (~> 1.33)
127+
rubocop-ast (1.31.3)
128+
parser (>= 3.3.1.0)
127129
rubocop-rake (0.6.0)
128130
rubocop (~> 1.0)
129-
rubocop-rspec (2.25.0)
130-
rubocop (~> 1.40)
131-
rubocop-capybara (~> 2.17)
132-
rubocop-factory_bot (~> 2.22)
131+
rubocop-rspec (3.0.3)
132+
rubocop (~> 1.61)
133133
ruby-progressbar (1.13.0)
134-
ruby2_keywords (0.0.5)
135-
ruby_git_crypt (0.1.0.pre.4)
134+
ruby_git_crypt (0.1.0)
136135
immutable-struct (~> 2.4)
137-
lino (~> 3.0)
138-
ruby_gpg2 (0.10.0)
139-
lino (~> 3.0)
136+
lino (>= 4.1)
137+
ruby_gpg2 (0.12.0)
138+
lino (>= 4.1)
140139
sawyer (0.9.2)
141140
addressable (>= 2.3.5)
142141
faraday (>= 0.17.3, < 3)
@@ -147,9 +146,11 @@ GEM
147146
simplecov-html (0.12.3)
148147
simplecov_json_formatter (0.1.4)
149148
sshkey (2.0.0)
149+
strscan (3.1.0)
150150
tzinfo (2.0.6)
151151
concurrent-ruby (~> 1.0)
152152
unicode-display_width (2.5.0)
153+
uri (0.13.0)
153154

154155
PLATFORMS
155156
arm64-darwin-21

lib/rake_ssh.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require 'rake_ssh/task_sets'
66

77
module RakeSSH
8-
def self.define_key_tasks(opts = {}, &block)
9-
RakeSSH::TaskSets::Key.define(opts, &block)
8+
def self.define_key_tasks(opts = {}, &)
9+
RakeSSH::TaskSets::Key.define(opts, &)
1010
end
1111
end

rake_ssh.gemspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ Gem::Specification.new do |spec|
3333
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
3434
spec.require_paths = ['lib']
3535

36-
spec.required_ruby_version = '>= 2.7'
36+
spec.required_ruby_version = '>= 3.1'
3737

3838
spec.add_dependency 'colored2', '~> 3.1'
39-
spec.add_dependency 'rake_factory', '~> 0.23'
39+
spec.add_dependency 'rake_factory', '~> 0.33'
4040
spec.add_dependency 'sshkey', '~> 2.0'
4141

4242
spec.metadata['rubygems_mfa_required'] = 'false'

scripts/ci/common/configure-asdf.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
[ -n "$DEBUG" ] && set -x
4+
set -e
5+
set -o pipefail
6+
7+
function ensure-asdf-plugin() {
8+
local name="$1"
9+
local repo="$2"
10+
11+
if ! asdf plugin list | grep -q "$name"; then
12+
asdf plugin add "$name" "$repo"
13+
fi
14+
}
15+
16+
ensure-asdf-plugin "ruby" "https://github.com/asdf-vm/asdf-ruby.git"
17+
ensure-asdf-plugin "java" "https://github.com/halcyon/asdf-java.git"
18+
ensure-asdf-plugin "golang" "https://github.com/asdf-community/asdf-golang.git"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
[ -n "$DEBUG" ] && set -x
4+
set -e
5+
set -o pipefail
6+
7+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
8+
PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )"
9+
10+
cd "$PROJECT_DIR"
11+
12+
asdf install

0 commit comments

Comments
 (0)