Skip to content

Commit b5bccbf

Browse files
authored
Update CI to latest (#40)
Add Ruby 3.4 and 4.0 to the CI matrix and update the Gemfile where needed. `gem_generator` 1.0 supports only Ruby 3.2 and above, so remove Ruby 3.0 and 3.1 from the CI matrix. Fix the bundle outdated test so it passes. Currently, rspec depends on diff-lcs 1.x, and diff-lcs 2.0 was recently released, which causes bundle outdated to fail. Add --only-explicit as a workaround.
1 parent fa95eaa commit b5bccbf

7 files changed

Lines changed: 18 additions & 17 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
ruby: [ '3.0', '3.1', '3.2', '3.3' ]
26+
ruby: [ '3.2', '3.3', '3.4', '4.0' ]
2727
steps:
2828
- uses: actions/checkout@v6
2929
- name: Set up Ruby

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require:
1+
plugins:
22
- rubocop-performance
33
- rubocop-rspec
44

Gemfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
source 'https://rubygems.org'
44

55
group :development, :test do
6-
gem 'gem_generator', '~> 0.4.0'
6+
gem 'gem_generator', '~> 1.0'
77

88
gem 'ffaker', '~> 2.20'
9+
gem 'reline'
910
gem 'rspec', '~> 3.10'
1011
end
1112

1213
group :development, :lint do
13-
gem 'rubocop', '~> 1.63.0'
14-
gem 'rubocop-performance', '~> 1.21.0'
15-
gem 'rubocop-rspec', '~> 2.29.1'
14+
gem 'rubocop', '~> 1.84'
15+
gem 'rubocop-performance', '~> 1.26'
16+
gem 'rubocop-rspec', '~> 3.9'
1617
end

spec/generated_project_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"gem_generator #{gem_name} #{__dir__}/../template --namespace=#{namespace}"
2828
) do |stdin, _stdout, stderr, wait_thread|
2929
Thread.new do
30-
stderr.each { |l| puts l } unless stderr.closed?
30+
stderr.each { |l| puts l } unless stderr.closed? # rubocop:disable RSpec/Output
3131
end
3232

3333
stdin.puts gem_summary
@@ -163,7 +163,7 @@
163163
describe 'outdated Ruby gems' do
164164
subject do
165165
Bundler.with_unbundled_env do
166-
system 'bundle outdated'
166+
system 'bundle outdated --only-explicit'
167167
end
168168
end
169169

template/.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require:
1+
plugins:
22
- rubocop-packaging
33
- rubocop-performance
44
- rubocop-rspec

template/Gemfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ install_if -> { ENV.fetch('FARADAY_VERSION', nil) } do
1212
gem 'faraday', ENV.fetch('FARADAY_VERSION', nil)
1313
end
1414

15-
gem 'bundler', '~> 2.0'
16-
gem 'rake', '~> 13.0'
17-
gem 'rspec', '~> 3.0'
15+
gem 'bundler', '>= 2.0'
16+
gem 'rake', '~> 13.3'
17+
gem 'rspec', '~> 3.13'
1818
gem 'simplecov', '~> 0.22.0'
1919

20-
gem 'rubocop', '~> 1.63.0'
21-
gem 'rubocop-packaging', '~> 0.5.2'
22-
gem 'rubocop-performance', '~> 1.21.0'
23-
gem 'rubocop-rspec', '~> 2.29.1'
20+
gem 'rubocop', '~> 1.84'
21+
gem 'rubocop-packaging', '~> 0.6'
22+
gem 'rubocop-performance', '~> 1.26'
23+
gem 'rubocop-rspec', '~> 3.9'

template/gem_name.gemspec.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
3030

3131
spec.files = Dir['lib/**/*', 'README.md', 'LICENSE.md', 'CHANGELOG.md']
3232

33-
spec.required_ruby_version = '>= 3.0', '< 4'
33+
spec.required_ruby_version = '>= 3.0'
3434

3535
spec.add_dependency 'faraday', '>= 2.9', '< 3'
3636
end

0 commit comments

Comments
 (0)