Skip to content

Commit

Permalink
(PDK-1208) Raise lower bound of 'puppet' requirement for new modules
Browse files Browse the repository at this point in the history
  • Loading branch information
scotje committed Oct 24, 2018
1 parent 7a8ef54 commit ce0fdf2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/pdk/module/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Metadata
OPERATING_SYSTEMS[os_name]
}.flatten,
'requirements' => [
{ 'name' => 'puppet', 'version_requirement' => '>= 4.7.0 < 7.0.0' },
{ 'name' => 'puppet', 'version_requirement' => '>= 4.10.0 < 7.0.0' },
],
}.freeze

Expand Down
7 changes: 2 additions & 5 deletions spec/unit/pdk/module/convert_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,8 @@
end

it 'creates a requirements array with a puppet requirement' do
expect(updated_metadata).to include(
'requirements' => [
{ 'name' => 'puppet', 'version_requirement' => '>= 4.7.0 < 7.0.0' },
],
)
expect(updated_metadata).to include('requirements')
expect(updated_metadata['requirements'].find { |req| req['name'] == 'puppet' }).to be
end

it 'creates an empty dependencies array' do
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 @@ -483,8 +483,8 @@ def result(pe_version)
let(:metadata) { PDK::Module::Metadata.new }

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

described_class.from_module_metadata(metadata)
Expand Down

0 comments on commit ce0fdf2

Please sign in to comment.