From 2023135a39a5e1c2ab3d20f7a8f41f788926b298 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 20 Sep 2024 15:45:17 +0200 Subject: [PATCH] Require Ruby 3.1 This allows us to use the latest minitar and forge_ruby dependencies. --- .github/workflows/docker.yml | 4 ++-- .github/workflows/rspec_tests.yml | 4 ---- CHANGELOG.mkd | 1 + lib/r10k/tarball.rb | 2 +- r10k.gemspec | 8 ++++---- spec/shared-contexts/git-fixtures.rb | 4 ++-- 6 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index bac8436f2..e0696e1de 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -22,10 +22,10 @@ jobs: with: # This doesn't seem to work unless we point directly to the secrets username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - - name: Set up Ruby 2.6 + - name: Set up Ruby 3.1 uses: actions/setup-ruby@v1 with: - ruby-version: 2.6.x + ruby-version: 3.1 - run: gem install bundler - uses: actions/checkout@v3 - name: Set up QEMU diff --git a/.github/workflows/rspec_tests.yml b/.github/workflows/rspec_tests.yml index e271fdbaf..5c23ff70b 100644 --- a/.github/workflows/rspec_tests.yml +++ b/.github/workflows/rspec_tests.yml @@ -12,14 +12,10 @@ jobs: strategy: matrix: cfg: - - {os: ubuntu-latest, ruby: 2.6} - - {os: ubuntu-latest, ruby: 2.7} - {os: ubuntu-latest, ruby: 3.1} - {os: ubuntu-latest, ruby: 3.2} - {os: ubuntu-latest, ruby: 3.3} - - {os: ubuntu-latest, ruby: jruby-9.3} - {os: ubuntu-latest, ruby: jruby-9.4} - - {os: windows-latest, ruby: 2.6} - {os: windows-latest, ruby: 3.2} - {os: windows-latest, ruby: 3.3} diff --git a/CHANGELOG.mkd b/CHANGELOG.mkd index 9df219e35..c61d77446 100644 --- a/CHANGELOG.mkd +++ b/CHANGELOG.mkd @@ -5,6 +5,7 @@ Unreleased ---------- - Add Ruby 3.3 to CI [#1403](https://github.com/puppetlabs/r10k/pull/1403) +- Require Ruby 3.1 [#1402](https://github.com/puppetlabs/r10k/pull/1402) 4.1.0 ----- diff --git a/lib/r10k/tarball.rb b/lib/r10k/tarball.rb index 701cd665d..2e19ffd03 100644 --- a/lib/r10k/tarball.rb +++ b/lib/r10k/tarball.rb @@ -173,7 +173,7 @@ def cache_checksum def each_tarball_entry(&block) File.open(cache_path, 'rb') do |file| Zlib::GzipReader.wrap(file) do |reader| - Archive::Tar::Minitar::Input.each_entry(reader) do |entry| + Minitar::Input.each_entry(reader) do |entry| yield entry end end diff --git a/r10k.gemspec b/r10k.gemspec index f01416cc4..0f601bad9 100644 --- a/r10k.gemspec +++ b/r10k.gemspec @@ -18,22 +18,22 @@ Gem::Specification.new do |s| dynamic environments. DESCRIPTION - s.required_ruby_version = '>= 2.6.0' + s.required_ruby_version = '>= 3.1.0' s.license = 'Apache-2.0' - s.add_dependency 'colored2', '3.1.2' + s.add_dependency 'colored2', '~> 4.0' s.add_dependency 'cri', '>= 2.15.10' s.add_dependency 'log4r', '1.1.10' s.add_dependency 'multi_json', '~> 1.10' - s.add_dependency 'puppet_forge', '>= 4.1', '< 6' + s.add_dependency 'puppet_forge', '~> 6.0' s.add_dependency 'gettext-setup', '>=0.24', '<2.0' s.add_dependency 'jwt', '>= 2.2.3', '< 3' - s.add_dependency 'minitar', '~> 0.9' + s.add_dependency 'minitar', '~> 1.0', '>= 1.0.2' s.add_development_dependency 'rspec', '~> 3.1' diff --git a/spec/shared-contexts/git-fixtures.rb b/spec/shared-contexts/git-fixtures.rb index f64ef7550..92ab64935 100644 --- a/spec/shared-contexts/git-fixtures.rb +++ b/spec/shared-contexts/git-fixtures.rb @@ -1,4 +1,4 @@ -require 'archive/tar/minitar' +require 'minitar' require 'tmpdir' shared_context "Git integration" do @@ -26,7 +26,7 @@ def remote_path end def populate_remote_path - Archive::Tar::Minitar.unpack(File.join(fixture_path, 'puppet-boolean-bare.tar'), remote_path) + Minitar.unpack(File.join(fixture_path, 'puppet-boolean-bare.tar'), remote_path) end def clear_remote_path