Skip to content

Commit

Permalink
Update lower puppet requirements bound when creating new modules
Browse files Browse the repository at this point in the history
Since puppet5 is EOL, new modules should be created with up-to-date version
requirements.
  • Loading branch information
DavidS committed Feb 16, 2021
1 parent 64eeb23 commit a14d6d0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/pdk/module/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Metadata
OPERATING_SYSTEMS[os_name]
}.flatten,
'requirements' => [
{ 'name' => 'puppet', 'version_requirement' => '>= 4.10.0 < 8.0.0' },
{ 'name' => 'puppet', 'version_requirement' => '>= 6.21.0 < 8.0.0' },
],
}.freeze

Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/build_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'issues_url' => 'https://github.com/testuser/puppet-build/issues',
'dependencies' => [],
'operatingsystem_support' => [{ 'operatingsystem' => 'windows', 'operatingsystemrelease' => ['10'] }],
'requirements' => [{ 'name' => 'puppet', 'version_requirement' => '> 4.10.0 < 7.0.0' }],
'requirements' => [{ 'name' => 'puppet', 'version_requirement' => '> 6.21.0 < 7.0.0' }],
'pdk-version' => '1.2.3',
'template-url' => 'https://github.com/puppetlabs/pdk-templates',
'template-ref' => 'heads/master-0-g1234abc',
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/pdk/cli/update_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 4.10.0 < 7.0.0"
"version_requirement": ">= 6.21.0 < 7.0.0"
}
],
"pdk-version": "99.99.0",
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/pdk/util/puppet_version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,8 @@ def result(pe_version)
let(:metadata) { PDK::Module::Metadata.new }

context 'with default metadata' do
it 'searches for a Puppet gem >= 4.10.0 < 8.0.0' do
requirement = Gem::Requirement.create(['>= 4.10.0', '< 8.0.0'])
it 'searches for a Puppet gem >= 6.21.0 < 8.0.0' do
requirement = Gem::Requirement.create(['>= 6.21.0', '< 8.0.0'])
expect(described_class.instance).to receive(:find_gem).with(requirement)

described_class.from_module_metadata(metadata)
Expand Down

0 comments on commit a14d6d0

Please sign in to comment.