This is a follow-on to PUP-11649 and PUP-11716. Ruby 2.7 will be EOL before Puppet 8 ships, so we should more aggressively prune the list of supported ruby versions.
Once PUP-11716 is complete, we should be able to remove special cases in code and tests for older ruby versions like
{noformat} Gemfile: gem 'vcr', RUBY_VERSION.to_f >= 3.2 ? '~> 6.1' : '~> 5.0', require: false Gemfile: gem 'webrick', '~> 1.7', require: false if RUBY_VERSION.to_f >= 3.0 benchmarks/catalog_memory/benchmarker.rb:RUBYVER_ARRAY = RUBY_VERSION.split(".").collect {|s| s.to_i } lib/puppet.rb:if !defined?(JRUBY_VERSION) && Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new("2.7.0") lib/puppet.rb: raise LoadError, "Puppet #{Puppet.version} requires Ruby 2.7.0 or greater, found Ruby #{RUBY_VERSION.dup}." lib/puppet.rb:Puppet::OLDEST_RECOMMENDED_RUBY_VERSION = '2.7.0' lib/puppet.rb: if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new(Puppet::OLDEST_RECOMMENDED_RUBY_VERSION) lib/puppet.rb: Puppet.deprecation_warning(_("Support for ruby version %{version} is deprecated and will be removed in a future release. See https://puppet.com/docs/puppet/latest/system_requirements.html for a list of supported ruby versions.") % { version: RUBY_VERSION }) lib/puppet/application.rb: 'ruby_version' => RUBY_VERSION, lib/puppet/defaults.rb: :default => "Puppet/#{Puppet.version} Ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} (#{RUBY_PLATFORM})", lib/puppet/util.rb: if RUBY_VERSION >= "2.6" lib/puppet/util/monkey_patches.rb:if RUBY_VERSION.to_f < 3.0 spec/unit/http/factory_spec.rb: it "sets the minimum version to TLS 1.0", if: RUBY_VERSION.to_f >= 2.5 do spec/unit/network/http/connection_spec.rb: puppet_ua = "Puppet/#{Puppet.version} Ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} (#{RUBY_PLATFORM})" spec/unit/puppet_spec.rb: context "Puppet::OLDEST_RECOMMENDED_RUBY_VERSION" do spec/unit/puppet_spec.rb: expect(Puppet::OLDEST_RECOMMENDED_RUBY_VERSION).not_to be_nil spec/unit/puppet_spec.rb: expect(Puppet::OLDEST_RECOMMENDED_RUBY_VERSION).to be_a_kind_of(String) spec/unit/puppet_spec.rb: expect(SemanticPuppet::Version).to be_valid(Puppet::OLDEST_RECOMMENDED_RUBY_VERSION) spec/unit/reports/store_spec.rb: if RUBY_VERSION < "3.0" spec/unit/util_spec.rb: :if => Puppet::Util::Platform.windows? && RUBY_VERSION.to_f < 3 do {noformat}
Also double check lib/puppet/util/monkey_patches.rb to see if any code is no longer relevant , especially if .
Also MRI 3.1 ships with the openssl 3.0.0 gem (https://github.com/ruby/ruby/blob/v3_1_0/NEWS.md#stdlib-updates) and that version requires openssl 1.1.1 or later greater (https://github.com/ruby/openssl/blob/v3.0.0/History.md#version-300), so we can delete any code paths that are specific to openssl 1.0.2. |
|
|