From 31a49c27aa345606350ecca984fd6585ab0f3abc Mon Sep 17 00:00:00 2001 From: Christos Papageorgiou Date: Fri, 13 Sep 2024 11:17:41 +0300 Subject: [PATCH] Add support for Ubuntu 24.04 --- lib/puppet_metadata/aio.rb | 1 + lib/puppet_metadata/operatingsystem.rb | 1 + spec/metadata_spec.rb | 4 ++-- spec/operatingsystem_spec.rb | 8 ++++---- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/puppet_metadata/aio.rb b/lib/puppet_metadata/aio.rb index a3be11c..19ae91d 100644 --- a/lib/puppet_metadata/aio.rb +++ b/lib/puppet_metadata/aio.rb @@ -50,6 +50,7 @@ class AIO '18.04' => 5..8, '20.04' => 6..8, '22.04' => 6..8, + '24.04' => 7..8, }, }.freeze diff --git a/lib/puppet_metadata/operatingsystem.rb b/lib/puppet_metadata/operatingsystem.rb index 8f3a8e3..ef39d57 100644 --- a/lib/puppet_metadata/operatingsystem.rb +++ b/lib/puppet_metadata/operatingsystem.rb @@ -125,6 +125,7 @@ class OperatingSystem }, # https://endoflife.software/operating-systems/linux/ubuntu 'Ubuntu' => { + '24.04' => '2029-04-30', '22.04' => '2027-04-15', '21.10' => '2022-07-15', '20.10' => '2021-07-15', diff --git a/spec/metadata_spec.rb b/spec/metadata_spec.rb index cfaa5d0..5e2a360 100644 --- a/spec/metadata_spec.rb +++ b/spec/metadata_spec.rb @@ -78,7 +78,7 @@ }, { operatingsystem: 'Ubuntu', - operatingsystemrelease: ['14.04', '16.04', '18.04', '20.04', '22.04'], + operatingsystemrelease: ['14.04', '16.04', '18.04', '20.04', '22.04', '24.04'], }, ], } @@ -94,7 +94,7 @@ 'CentOS' => %w[7 8 9], 'Debian' => %w[9 10], 'RedHat' => %w[7 8 9], - 'Ubuntu' => ['14.04', '16.04', '18.04', '20.04', '22.04'], + 'Ubuntu' => ['14.04', '16.04', '18.04', '20.04', '22.04', '24.04'], } is_expected.to eq(expected) end diff --git a/spec/operatingsystem_spec.rb b/spec/operatingsystem_spec.rb index fba0723..79bc65c 100644 --- a/spec/operatingsystem_spec.rb +++ b/spec/operatingsystem_spec.rb @@ -12,8 +12,8 @@ expect(described_class.latest_release('CentOS')).to eq('9') end - it 'returns 22.04 for Ubuntu' do - expect(described_class.latest_release('Ubuntu')).to eq('22.04') + it 'returns 24.04 for Ubuntu' do + expect(described_class.latest_release('Ubuntu')).to eq('24.04') end end @@ -33,8 +33,8 @@ context 'with Ubuntu' do let(:os) { 'Ubuntu' } - it 'returns 20.04 and 22.04' do - expect(described_class.supported_releases(os)).to contain_exactly('20.04', '22.04') + it 'returns 20.04, 22.04 and 24.04' do + expect(described_class.supported_releases(os)).to contain_exactly('20.04', '22.04', '24.04') end it 'the last entry matches latest_release' do