puppetfile-resolver 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1199057b00e6f612fd02343cc707cc1e6a4dba3ab20a6956b270c92387a66c7
4
- data.tar.gz: d5e706548dc0a8a31fa8573ef96fd130c84307a9a3ca74e97a9966612c731baf
3
+ metadata.gz: 9c85fe530d4b414e940f20be1fd30bf83a367f28c1ddbf1247e63793402e6961
4
+ data.tar.gz: 3c3a48ab0edd969e05ca8af43a1d14e4766f4518503d1cc2a8f46562262bd02d
5
5
  SHA512:
6
- metadata.gz: c1424077c5301bd3b7bdc95bee51576c469d27a29d0637b7bada2d7a04f22b744b560cd84c47652e0ca9ff780d1d07252bffd103a096c1b5e931ca20fda58bb3
7
- data.tar.gz: 6492e8028bbb1e4c91ea2a3fe9825a3554cdf30826a3d5eff16a519589422b452cd0faebf1663ca8cd53bbe24ba70ee84ac14f16f067234166b73df3471801ff
6
+ metadata.gz: 759e11ef1ffd31080daa28c2ff4911324189a16c763e7298bd686957ae69d2f80ff39ffdb606fe6847719d0450e0463bbadc2649da5a5a1886308293fd05197e
7
+ data.tar.gz: 640d45b0cd4ca3540a2d7329c8bb90c1133905625a8b4690b6e56f13a0fe0b178494750c1bdacc023e0937ace3cad36def9d3b4089ff22e9d06646ae34c82f7f
@@ -1,7 +1,7 @@
1
1
  ##
2
2
  ## Bundle of CA Root Certificates
3
3
  ##
4
- ## Certificate data from Mozilla as of: Wed Jan 1 04:12:10 2020 GMT
4
+ ## Certificate data from Mozilla as of: Wed Jun 24 03:12:10 2020 GMT
5
5
  ##
6
6
  ## This is a bundle of X.509 certificates of public Certificate Authorities
7
7
  ## (CA). These were automatically extracted from Mozilla's root certificates
@@ -13,8 +13,8 @@
13
13
  ## an Apache+mod_ssl webserver for SSL client authentication.
14
14
  ## Just configure this file as the SSLCACertificateFile.
15
15
  ##
16
- ## Conversion done with mk-ca-bundle.pl version 1.27.
17
- ## SHA256: f3bdcd74612952da8476a9d4147f50b29ad0710b7dd95b4c8690500209986d70
16
+ ## Conversion done with mk-ca-bundle.pl version 1.28.
17
+ ## SHA256: 5796295533cad5a648a20a115b0894dc9b318c41501796e7158e824c323f11c3
18
18
  ##
19
19
 
20
20
 
@@ -90,7 +90,7 @@ module PuppetfileResolver
90
90
  @dependencies = meta[:dependencies].map do |dep|
91
91
  ModuleDependency.new(
92
92
  name: dep[:name],
93
- version_requirement: dep[:version_requirement]
93
+ version_requirement: dep[:version_requirement] || dep[:version_range] || '>= 0.0.0'
94
94
  )
95
95
  end
96
96
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PuppetfileResolver
4
- VERSION ||= '0.2.0'
4
+ VERSION ||= '0.3.0'
5
5
  end
@@ -282,6 +282,70 @@ describe PuppetfileResolver::Resolver do
282
282
  end
283
283
  end
284
284
 
285
+ context "Given a document with resolvable but legacy module definition" do
286
+ let(:puppetfile_module) { PuppetfileResolver::Puppetfile::LocalModule.new('module1') }
287
+ let(:puppetfile_document) do
288
+ doc = valid_document('foo')
289
+ doc.add_module(puppetfile_module)
290
+ doc
291
+ end
292
+
293
+ before(:each) do
294
+ # Module 1 depends on Module 2
295
+ cache.add_local_module_spec(
296
+ 'module1',
297
+ [{ name: 'module2', version_range: '> 1.0.0 < 2.0.0' }]
298
+ )
299
+ cache.add_local_module_spec('module2', [], nil, '2.0.0')
300
+ cache.add_local_module_spec('module2', [], nil, '1.5.0')
301
+ end
302
+
303
+ [true, false].each do |testcase|
304
+ context "and Allow Missing Modules option is #{testcase}" do
305
+ let(:resolve_options) { default_resolve_options.merge(allow_missing_modules: testcase) }
306
+
307
+ it 'should resolve with the most appropriate specification' do
308
+ result = subject.resolve(resolve_options)
309
+
310
+ expect(result.specifications).to include('module2')
311
+ expect(result.specifications['module2'].version.to_s).to eq('1.5.0')
312
+ end
313
+ end
314
+ end
315
+ end
316
+
317
+ context "Given a document with resolvable but partial module definition" do
318
+ let(:puppetfile_module) { PuppetfileResolver::Puppetfile::LocalModule.new('module1') }
319
+ let(:puppetfile_document) do
320
+ doc = valid_document('foo')
321
+ doc.add_module(puppetfile_module)
322
+ doc
323
+ end
324
+
325
+ before(:each) do
326
+ # Module 1 depends on Module 2
327
+ cache.add_local_module_spec(
328
+ 'module1',
329
+ [{ name: 'module2' }]
330
+ )
331
+ cache.add_local_module_spec('module2', [], nil, '2.0.0')
332
+ cache.add_local_module_spec('module2', [], nil, '1.5.0')
333
+ end
334
+
335
+ [true, false].each do |testcase|
336
+ context "and Allow Missing Modules option is #{testcase}" do
337
+ let(:resolve_options) { default_resolve_options.merge(allow_missing_modules: testcase) }
338
+
339
+ it 'should resolve with the most appropriate specification' do
340
+ result = subject.resolve(resolve_options)
341
+
342
+ expect(result.specifications).to include('module2')
343
+ expect(result.specifications['module2'].version.to_s).to eq('2.0.0')
344
+ end
345
+ end
346
+ end
347
+ end
348
+
285
349
  context "Given a document with a unresolvable Puppet requirement" do
286
350
  let(:puppet_version) { '99.99.99' }
287
351
  let(:puppetfile_module) { PuppetfileResolver::Puppetfile::LocalModule.new('module1') }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppetfile-resolver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Glenn Sarti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-20 00:00:00.000000000 Z
11
+ date: 2020-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: molinillo
@@ -112,8 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0'
114
114
  requirements: []
115
- rubyforge_project:
116
- rubygems_version: 2.7.7
115
+ rubygems_version: 3.1.2
117
116
  signing_key:
118
117
  specification_version: 4
119
118
  summary: Dependency resolver for Puppetfiles