puppet 4.9.2 → 4.9.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puppet might be problematic. Click here for more details.

@@ -7,12 +7,13 @@ describe provider_class do
7
7
 
8
8
  let (:packages) do
9
9
  <<-RPM_OUTPUT
10
- cracklib-dicts 0 2.8.9 3.3 x86_64
10
+ 'cracklib-dicts 0 2.8.9 3.3 x86_64
11
11
  basesystem 0 8.0 5.1.1.el5.centos noarch
12
12
  chkconfig 0 1.3.30.2 2.el5 x86_64
13
13
  myresource 0 1.2.3.4 5.el4 noarch
14
14
  mysummaryless 0 1.2.3.4 5.el4 noarch
15
15
  tomcat 1 1.2.3.4 5.el4 x86_64
16
+ '
16
17
  RPM_OUTPUT
17
18
  end
18
19
 
@@ -213,18 +213,245 @@ describe SemVer do
213
213
  expect(version.special).to eq('-beta6')
214
214
  end
215
215
 
216
- it 'should not log a deprecation warning when strict == off' do
217
- Puppet[:strict] = :off
218
- SemVer.new('1.2.3')
219
- expect(@logs).to be_empty
216
+ context 'should not log a deprecation warning when strict == off' do
217
+ before(:each) { Puppet[:strict] = :off }
218
+
219
+ it 'on new instance' do
220
+ SemVer.new('1.2.3')
221
+ expect(@logs).to be_empty
222
+ end
223
+
224
+ it 'on exact range' do
225
+ SemVer['1.2.3']
226
+ expect(@logs).to be_empty
227
+ end
228
+
229
+ it 'on simple range' do
230
+ SemVer['1.2.x']
231
+ expect(@logs).to be_empty
232
+ end
233
+
234
+ it 'on tilde range' do
235
+ SemVer['~1.2.0']
236
+ expect(@logs).to be_empty
237
+ end
238
+
239
+ it 'on from-to range' do
240
+ SemVer['1.2.0-1.3.0']
241
+ expect(@logs).to be_empty
242
+ end
243
+
244
+ it 'on >= range' do
245
+ SemVer['>=1.2.0']
246
+ expect(@logs).to be_empty
247
+ end
248
+
249
+ it 'on <= range' do
250
+ SemVer['<=1.2.0']
251
+ expect(@logs).to be_empty
252
+ end
253
+
254
+ it 'on > range' do
255
+ SemVer['>1.2.0']
256
+ expect(@logs).to be_empty
257
+ end
258
+
259
+ it 'on > range' do
260
+ SemVer['<1.2.0']
261
+ expect(@logs).to be_empty
262
+ end
263
+ end
264
+
265
+ context 'should log a deprecation warning when strict == warning' do
266
+ before(:each) { Puppet[:strict] = :warning }
267
+
268
+ it 'on new instance' do
269
+ SemVer.new('1.2.3')
270
+ expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
271
+ end
272
+
273
+ it 'on exact range' do
274
+ SemVer['1.2.3']
275
+ expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
276
+ end
277
+
278
+ it 'on simple range' do
279
+ SemVer['1.2.x']
280
+ expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
281
+ end
282
+
283
+ it 'on tilde range' do
284
+ SemVer['~1.2.0']
285
+ expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
286
+ end
287
+
288
+ it 'on from-to range' do
289
+ SemVer['1.2.0 - 1.3.0']
290
+ expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
291
+ end
292
+
293
+ it 'on >= range' do
294
+ SemVer['>=1.2.0']
295
+ expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
296
+ end
297
+
298
+ it 'on <= range' do
299
+ SemVer['<=1.2.0']
300
+ expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
301
+ end
302
+
303
+ it 'on > range' do
304
+ SemVer['>1.2.0']
305
+ expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
306
+ end
307
+
308
+ it 'on > range' do
309
+ SemVer['<1.2.0']
310
+ expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
311
+ end
312
+
313
+ context 'unless suppressed by argument' do
314
+ it 'on new instance' do
315
+ SemVer.new('1.2.3', true)
316
+ expect(@logs).to be_empty
317
+ end
318
+
319
+ it 'on exact range' do
320
+ SemVer['1.2.3', true]
321
+ expect(@logs).to be_empty
322
+ end
323
+
324
+ it 'on simple range' do
325
+ SemVer['1.2.x', true]
326
+ expect(@logs).to be_empty
327
+ end
328
+
329
+ it 'on tilde range' do
330
+ SemVer['~1.2.0', true]
331
+ expect(@logs).to be_empty
332
+ end
333
+
334
+ it 'on from-to range' do
335
+ SemVer['1.2.0 - 1.3.0', true]
336
+ expect(@logs).to be_empty
337
+ end
338
+
339
+ it 'on >= range' do
340
+ SemVer['>=1.2.0', true]
341
+ expect(@logs).to be_empty
342
+ end
343
+
344
+ it 'on <= range' do
345
+ SemVer['<=1.2.0', true]
346
+ expect(@logs).to be_empty
347
+ end
348
+
349
+ it 'on > range' do
350
+ SemVer['>1.2.0', true]
351
+ expect(@logs).to be_empty
352
+ end
353
+
354
+ it 'on > range' do
355
+ SemVer['<1.2.0', true]
356
+ expect(@logs).to be_empty
357
+ end
358
+ end
220
359
  end
221
360
 
222
- it 'should log a deprecation warning unless strict == off' do
223
- (Puppet.settings.setting(:strict).values - [:off]).each do |setting|
224
- Puppet[:strict] = setting
361
+ context 'should log a deprecation warning when strict == error' do
362
+ before(:each) { Puppet[:strict] = :error }
363
+
364
+ it 'on new instance' do
225
365
  SemVer.new('1.2.3')
226
366
  expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
227
367
  end
368
+
369
+ it 'on exact range' do
370
+ SemVer['1.2.3']
371
+ expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
372
+ end
373
+
374
+ it 'on simple range' do
375
+ SemVer['1.2.x']
376
+ expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
377
+ end
378
+
379
+ it 'on tilde range' do
380
+ SemVer['~1.2.0']
381
+ expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
382
+ end
383
+
384
+ it 'on from-to range' do
385
+ SemVer['1.2.0 - 1.3.0']
386
+ expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
387
+ end
388
+
389
+ it 'on >= range' do
390
+ SemVer['>=1.2.0']
391
+ expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
392
+ end
393
+
394
+ it 'on <= range' do
395
+ SemVer['<=1.2.0']
396
+ expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
397
+ end
398
+
399
+ it 'on > range' do
400
+ SemVer['>1.2.0']
401
+ expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
402
+ end
403
+
404
+ it 'on > range' do
405
+ SemVer['<1.2.0']
406
+ expect(@logs.map(&:message)).to include(/Use of class Puppet::SemVer is deprecated. SemanticPuppet::Version or SemanticPuppet::VersionRange should be used instead/)
407
+ end
408
+
409
+ context 'unless suppressed by argument' do
410
+ it 'on new instance' do
411
+ SemVer.new('1.2.3', true)
412
+ expect(@logs).to be_empty
413
+ end
414
+
415
+ it 'on exact range' do
416
+ SemVer['1.2.3', true]
417
+ expect(@logs).to be_empty
418
+ end
419
+
420
+ it 'on simple range' do
421
+ SemVer['1.2.x', true]
422
+ expect(@logs).to be_empty
423
+ end
424
+
425
+ it 'on tilde range' do
426
+ SemVer['~1.2.0', true]
427
+ expect(@logs).to be_empty
428
+ end
429
+
430
+ it 'on from-to range' do
431
+ SemVer['1.2.0 - 1.3.0', true]
432
+ expect(@logs).to be_empty
433
+ end
434
+
435
+ it 'on >= range' do
436
+ SemVer['>=1.2.0', true]
437
+ expect(@logs).to be_empty
438
+ end
439
+
440
+ it 'on <= range' do
441
+ SemVer['<=1.2.0', true]
442
+ expect(@logs).to be_empty
443
+ end
444
+
445
+ it 'on > range' do
446
+ SemVer['>1.2.0', true]
447
+ expect(@logs).to be_empty
448
+ end
449
+
450
+ it 'on > range' do
451
+ SemVer['<1.2.0', true]
452
+ expect(@logs).to be_empty
453
+ end
454
+ end
228
455
  end
229
456
  end
230
457
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.9.2
4
+ version: 4.9.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-02-09 00:00:00.000000000 Z
12
+ date: 2017-02-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: facter
@@ -527,6 +527,7 @@ files:
527
527
  - lib/puppet/feature/cfacter.rb
528
528
  - lib/puppet/feature/selinux.rb
529
529
  - lib/puppet/feature/eventlog.rb
530
+ - lib/puppet/feature/hiera_eyaml.rb
530
531
  - lib/puppet/feature/telnet.rb
531
532
  - lib/puppet/feature/libuser.rb
532
533
  - lib/puppet/feature/external_facts.rb
@@ -1218,6 +1219,7 @@ files:
1218
1219
  - lib/puppet/functions/hocon_data.rb
1219
1220
  - lib/puppet/functions/alert.rb
1220
1221
  - lib/puppet/functions/hiera_hash.rb
1222
+ - lib/puppet/functions/eyaml_lookup_key.rb
1221
1223
  - lib/puppet/functions/info.rb
1222
1224
  - lib/puppet/functions/filter.rb
1223
1225
  - lib/puppet/functions/contain.rb