From dc14d48c636d02392b364b31936dc2ada9b831bf Mon Sep 17 00:00:00 2001 From: Dominik Gedon Date: Thu, 19 Dec 2024 19:31:10 +0100 Subject: [PATCH] Set minimal Ruby version to 3.1 --- .github/workflows/rubocop.yml | 2 ++ .github/workflows/test.yml | 6 ++++-- .rubocop.yml | 2 +- .rubocop_todo.yml | 12 +++--------- Gemfile.lock | 2 +- tetra.gemspec | 2 +- 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index 5a0f1d16..7527170c 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -40,6 +40,8 @@ jobs: run: bundle install - name: Run RuboCop run: | + ruby --version + rubocop --version rubocop 'bin/tetra' rubocop 'lib/tetra.rb' rubocop 'lib/tetra/' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e991cb99..5e14d37d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,7 @@ jobs: matrix: os: [ubuntu-latest] # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0' - ruby: ['2.7', '3.0', '3.1', '3.2', '3.3'] + ruby: ['3.1', '3.2', '3.3'] runs-on: ${{ matrix.os }} steps: - name: Checkout @@ -50,6 +50,8 @@ jobs: git config --global user.name "GitHub Actions Bot" git config --global user.email "<>" - name: Run tests and collect coverage - run: bundle exec rake + run: | + ruby --version + bundle exec rake - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 diff --git a/.rubocop.yml b/.rubocop.yml index fd91168b..a2961367 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,7 +2,7 @@ inherit_from: .rubocop_todo.yml AllCops: NewCops: disable - TargetRubyVersion: 2.7 + TargetRubyVersion: 3.1 Layout/LineLength: Max: 140 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index b1398504..e1352f98 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2024-02-06 10:24:39 UTC using RuboCop version 1.57.2. +# on 2024-12-19 18:05:31 UTC using RuboCop version 1.69.2. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -99,12 +99,6 @@ Lint/MissingSuper: - 'lib/tetra/facades/process_runner.rb' - 'lib/tetra/project.rb' -# Offense count: 1 -# This cop supports safe autocorrection (--autocorrect). -Lint/RedundantCopDisableDirective: - Exclude: - - 'spec/lib/fine/pom_spec.rb' - # Offense count: 1 Lint/UriEscapeUnescape: Exclude: @@ -158,7 +152,7 @@ Style/ConditionalAssignment: Exclude: - 'lib/tetra/ui/subcommand.rb' -# Offense count: 54 +# Offense count: 55 # This cop supports safe autocorrection (--autocorrect). Style/Encoding: Enabled: false @@ -182,7 +176,7 @@ Style/ExplicitBlockArgument: Style/FormatStringToken: EnforcedStyle: template -# Offense count: 60 +# Offense count: 61 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: always, always_true, never diff --git a/Gemfile.lock b/Gemfile.lock index 1273da14..baa34382 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -142,4 +142,4 @@ DEPENDENCIES tetra! BUNDLED WITH - 2.4.22 + 2.6.1 diff --git a/tetra.gemspec b/tetra.gemspec index 20d902b4..4b164195 100644 --- a/tetra.gemspec +++ b/tetra.gemspec @@ -24,7 +24,7 @@ Gem::Specification.new do |s| s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) } s.require_paths = ["lib"] - s.required_ruby_version = '>= 2.7.0' + s.required_ruby_version = '>= 3.1.0' s.add_development_dependency "aruba", "~> 0.6.2" s.add_development_dependency "simplecov", "~> 0.22.0"