Skip to content

Commit a4d7b3f

Browse files
(PUP-11716) Update for jruby 9.4 and mri ruby >= 3.1.0
1 parent 4af5cdd commit a4d7b3f

File tree

5 files changed

+11
-15
lines changed

5 files changed

+11
-15
lines changed

.gemspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ Gem::Specification.new do |s|
2121
s.version = mdata ? mdata[1] : version
2222

2323
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1")
24-
# Bump this in PUP-11716
25-
s.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
24+
s.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
2625
s.authors = ["Puppet Labs"]
2726
s.date = "2012-08-17"
2827
s.description = "Puppet, an automated configuration management tool"

.github/workflows/checks.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
strategy:
1717
matrix:
1818
cfg:
19-
- {check: rubocop, os: ubuntu-latest, ruby: '2.7'}
20-
- {check: commits, os: ubuntu-latest, ruby: '2.7'}
21-
- {check: warnings, os: ubuntu-latest, ruby: '2.7'}
19+
- {check: rubocop, os: ubuntu-latest, ruby: '3.1'}
20+
- {check: commits, os: ubuntu-latest, ruby: '3.1'}
21+
- {check: warnings, os: ubuntu-latest, ruby: '3.1'}
2222

2323
runs-on: ${{ matrix.cfg.os }}
2424
steps:

.github/workflows/mend.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup Ruby
1616
uses: ruby/setup-ruby@v1
1717
with:
18-
ruby-version: 2.7
18+
ruby-version: 3.1
1919
- name: Create lock
2020
run: bundle lock
2121
- uses: actions/setup-java@v3

.github/workflows/rspec_tests.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@ jobs:
1616
strategy:
1717
matrix:
1818
cfg:
19-
- {os: ubuntu-latest, ruby: '2.7'}
20-
- {os: ubuntu-latest, ruby: '3.0'}
19+
- {os: ubuntu-latest, ruby: '3.1'}
2120
- {os: ubuntu-20.04, ruby: '3.2'} # openssl 1.1.1
2221
- {os: ubuntu-22.04, ruby: '3.2'} # openssl 3
23-
- {os: ubuntu-latest, ruby: 'jruby-9.2.21.0'}
24-
- {os: windows-2019, ruby: '2.7'}
25-
- {os: windows-2019, ruby: '3.0'}
22+
- {os: ubuntu-latest, ruby: 'jruby-9.4.2.0'}
23+
- {os: windows-2019, ruby: '3.1'}
2624
- {os: windows-2019, ruby: '3.2'} # openssl 3
2725

2826
runs-on: ${{ matrix.cfg.os }}

lib/puppet.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
require_relative 'puppet/version'
22
require_relative 'puppet/concurrent/synchronized'
33

4-
# Update JRuby version constraints in PUP-11716
5-
if !defined?(JRUBY_VERSION) && Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new("2.7.0")
6-
raise LoadError, "Puppet #{Puppet.version} requires Ruby 2.7.0 or greater, found Ruby #{RUBY_VERSION.dup}."
4+
Puppet::OLDEST_RECOMMENDED_RUBY_VERSION = '3.1.0'
5+
if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new(Puppet::OLDEST_RECOMMENDED_RUBY_VERSION)
6+
raise LoadError, "Puppet #{Puppet.version} requires Ruby #{Puppet::OLDEST_RECOMMENDED_RUBY_VERSION} or greater, found Ruby #{RUBY_VERSION.dup}."
77
end
88

9-
Puppet::OLDEST_RECOMMENDED_RUBY_VERSION = '2.7.0'
109

1110
$LOAD_PATH.extend(Puppet::Concurrent::Synchronized)
1211

0 commit comments

Comments
 (0)