From d627817c5c872fc7f1f00a8a5abad187ece36a1f Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 6 Sep 2024 18:35:18 +0200 Subject: [PATCH] Require Ruby 3.1 Ruby 3.0 and older are dead upstream. Requiring 3.1 or newer allows us to safely use latest gem dependencies. Beaker isn't tied to the Puppet AIO Ruby versions, so we don't need to stay on Ruby 2.6 or 2.7. --- .github/workflows/test.yml | 2 -- .rubocop.yml | 3 +++ beaker.gemspec | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7789077eb..b6eb8cf14 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,8 +27,6 @@ jobs: fail-fast: false matrix: include: - - ruby: "2.7" - - ruby: "3.0" - ruby: "3.1" - ruby: "3.2" - ruby: "3.3" diff --git a/.rubocop.yml b/.rubocop.yml index 8caeaee8c..ba927a65c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,6 +4,9 @@ inherit_from: .rubocop_todo.yml inherit_gem: voxpupuli-rubocop: rubocop.yml +AllCops: + TargetRubyVersion: 3.1 + Layout/LineLength: Exclude: - acceptance/**/*.rb diff --git a/beaker.gemspec b/beaker.gemspec index 663771cca..3da1b74eb 100644 --- a/beaker.gemspec +++ b/beaker.gemspec @@ -16,7 +16,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 = Gem::Requirement.new('>= 2.7') + s.required_ruby_version = Gem::Requirement.new('>= 3.1') # Testing dependencies s.add_development_dependency 'fakefs', '~> 2.4' @@ -25,7 +25,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'voxpupuli-rubocop', '~> 2.8.0' # Run time dependencies - s.add_runtime_dependency 'minitar', '~> 0.12' # newer versions require Ruby 3.1 + s.add_runtime_dependency 'minitar', '>= 0.12', '< 2' s.add_runtime_dependency 'minitest', '~> 5.4' s.add_runtime_dependency 'rexml', '~> 3.2', '>= 3.2.5'