Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require Ruby 3.1 #1906

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Require Ruby 3.1 #1906

wants to merge 2 commits into from

Conversation

bastelfreak
Copy link
Member

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.

@bastelfreak bastelfreak force-pushed the ruby31 branch 2 times, most recently from af4d4c4 to d627817 Compare September 6, 2024 16:41
Copy link

codecov bot commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.26%. Comparing base (8199309) to head (d627817).
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1906   +/-   ##
=======================================
  Coverage   74.26%   74.26%           
=======================================
  Files          79       79           
  Lines        4395     4395           
=======================================
  Hits         3264     3264           
  Misses       1131     1131           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bastelfreak bastelfreak marked this pull request as ready for review October 28, 2024 18:13
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.
@bastelfreak
Copy link
Member Author

Tested in voxpupuli/puppet-example#78

@bastelfreak
Copy link
Member Author

So when any gem in a Gemfile requires a Ruby version that's newer than your local Ruby, bundler will stop. it doesn't matter if the Gem group is disabled or not. A simple workaround I came up with (https://github.com/voxpupuli/puppet-example/pull/78/files):

if Gem::Requirement.create('>= 3.1.0').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
  group :system_tests do
    gem 'beaker', git: 'https://github.com/bastelfreak/beaker', branch: 'ruby31'
    gem 'voxpupuli-acceptance', '~> 3.0',  :require => false
  end
end

We could easily add this to our modulesync_config. If that's fine for you, we can continue dropping old Ruby/minitar here in beaker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants