From 79a4bb7cacb2457909b511fa76371a38c1575851 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Thu, 4 Jan 2024 12:56:54 +0100 Subject: [PATCH 1/2] Drop redundant check for Ruby 1.9+ Since aef17296fa073139453778b8f1ca80ba3a6824f5 the required Ruby version is 1.9.3 so this shouldn't install on Ruby 1.8 at all anymore. These days you won't find Ruby 1.8 unless you try very hard so it can be dropped safely. Fixes: aef17296fa07 ("(PDOC-119) Add required ruby version to gemspec") --- lib/puppet/face/strings.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/puppet/face/strings.rb b/lib/puppet/face/strings.rb index 47026258..5d5e56c2 100644 --- a/lib/puppet/face/strings.rb +++ b/lib/puppet/face/strings.rb @@ -144,7 +144,6 @@ def check_required_features raise "The 'yard' gem must be installed in order to use this face." unless Puppet.features.yard? raise "The 'rgen' gem must be installed in order to use this face." unless Puppet.features.rgen? - raise 'This face requires Ruby 1.9 or greater.' if RUBY_VERSION.match?(/^1\.8/) end # Builds the options to PuppetStrings.generate. From 3cbed729377e66725ab65959284fc2ccc155003d Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Thu, 4 Jan 2024 12:59:36 +0100 Subject: [PATCH 2/2] Drop empty Ruby version check This specific code has gone through some odd refactoring. In d7f5e446476d39e04c607b6a7a189616ad6061ad both branches of the if condition were made the same, which was then refactored into an empty unless condition in 10fd31e529772c8ed977157407321bb2318dc389. But 77150635f54370e33dbe540ca295a1d49061ac22 raised the minimum version to 2.7 so that should have simply removed the whole version check. Fixes: 77150635f543 ("(MAINT) Bump minumum ruby version") --- lib/puppet-strings/markdown.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/puppet-strings/markdown.rb b/lib/puppet-strings/markdown.rb index 40122796..3abd43a0 100644 --- a/lib/puppet-strings/markdown.rb +++ b/lib/puppet-strings/markdown.rb @@ -76,9 +76,6 @@ def self.render(path = nil) # @param [String] path The full path to the template file. # @return [ERB] Template def self.erb(path) - unless Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6.0') - # This outputs warnings in Ruby 2.6+. - end ERB.new(File.read(path), trim_mode: '-') end end