Once we have puppet PUP - agent/ 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 and puppetserver ? '~> 6.1' : '~> 5.0', require: false Gemfile: gem 'webrick', '~> 1.7', require: false if RUBY_VERSION.to_f >= 3.0 benchmarks / jruby 9 catalog_memory/benchmarker . 4 builds 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 CI 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 , we should update 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 required MRI ruby version to at least 3. TLS 1 and maybe 3 . 0", if: RUBY_VERSION.to_f >= 2. See PUP 5 do spec/unit/network/http/connection_spec.rb: puppet_ua = "Puppet/#{Puppet.version} Ruby/#{RUBY_VERSION} - 11649 for details on how to p#{RUBY_PATCHLEVEL} (#{RUBY_PLATFORM})" spec/unit/puppet_spec.rb: context "Puppet::OLDEST_RECOMMENDED_RUBY_VERSION" do that 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) One possible issue with dropping 2 spec/unit/puppet_spec . 7 is this may affect packaging and shipping jobs that are still using ruby 2 rb: expect(SemanticPuppet::Version) . 7 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. |
|
|