puppet 6.7.0-x86-mingw32 → 6.7.2-x86-mingw32

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1c87237b40e10b29c04b19684e30ae3ca4a4c92dd0e4a1afb65017e8c9e8fdd
4
- data.tar.gz: ef353e61b54c2a53c887008eb6d6eb160d2b6170ee2783b7c5ebd1400f84e617
3
+ metadata.gz: '083205c99aadc168e9664e6455af96204159e47af8e5ea1c71a9c49cbdde3f7e'
4
+ data.tar.gz: 83c77594df30a3c8ba0866f2290b887d775a7969c89e6f45bb5ac41e70a033a6
5
5
  SHA512:
6
- metadata.gz: 4020aa8b4bceadda49b97628134a07fa7f1a5257bae294957cd735c5060c919d21bf21030630f8399ba97a07d500687b252436996e8081c416b5a8481430a70f
7
- data.tar.gz: d0362c944ecd07c6609edb192737f9df84ee6e24495537698d98340782a86924989b3a280da9d6995d6382c6c4c4eab7ec572e2888555dd94fff595d225aa03e
6
+ metadata.gz: e8196cadf2bf1bd1d01bc4350bd369f5706e658d3675062fd424c8346e69f8e79e47a06653a2e3a53ef45e771ad3d5eebccbc4fa4cc8ff9a8dfa260abb61fd20
7
+ data.tar.gz: 77af1c62fc57aa1e73358113cd95e64639a9bb957cc67a0a5573455806b439e88a0b16c6ec7886cc5b208bfd1ce09456a6f150794907590667304ebe51456b78
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- puppet (6.7.0)
4
+ puppet (6.7.2)
5
5
  CFPropertyList (~> 2.2)
6
6
  facter (>= 2.4.0, < 4)
7
7
  fast_gettext (~> 1.1)
@@ -62,14 +62,14 @@ GEM
62
62
  coderay (~> 1.1.0)
63
63
  method_source (~> 0.9.0)
64
64
  public_suffix (3.1.1)
65
- puppet-resource_api (1.8.4)
65
+ puppet-resource_api (1.8.6)
66
66
  hocon (>= 1.0)
67
67
  puppetserver-ca (1.3.2)
68
68
  facter (>= 2.0.1, < 4)
69
69
  racc (1.4.9)
70
70
  rainbow (2.2.2)
71
71
  rake
72
- rake (12.3.2)
72
+ rake (12.3.3)
73
73
  rdiscount (2.2.0.1)
74
74
  rdoc (6.1.1)
75
75
  ronn (0.7.3)
@@ -256,11 +256,11 @@ class Puppet::Transaction::Report
256
256
  @time = data['time']
257
257
  @corrective_change = data['corrective_change']
258
258
 
259
- if data['master_used']
259
+ if data['master_used']
260
260
  @master_used = data['master_used']
261
261
  end
262
262
 
263
- if data['catalog_uuid']
263
+ if data['catalog_uuid']
264
264
  @catalog_uuid = data['catalog_uuid']
265
265
  end
266
266
 
data/lib/puppet/type.rb CHANGED
@@ -2187,7 +2187,7 @@ end
2187
2187
  # Retrieve the list of names from the block.
2188
2188
  list = self.instance_eval(&block)
2189
2189
  next unless list
2190
- list = Array(list)
2190
+ list = [list] unless list.is_a?(Array)
2191
2191
 
2192
2192
  # Collect the current prereqs
2193
2193
  list.each { |dep|
@@ -2207,7 +2207,6 @@ end
2207
2207
  end
2208
2208
  }
2209
2209
  }
2210
-
2211
2210
  reqs
2212
2211
  end
2213
2212
 
@@ -573,7 +573,7 @@ module Puppet
573
573
  autorequire(:user) do
574
574
  # Autorequire users if they are specified by name
575
575
  user = self[:user]
576
- if user !~ /^\d+$/
576
+ if user && user !~ /^\d+$/
577
577
  user
578
578
  end
579
579
  end
@@ -201,7 +201,7 @@ module Puppet::Util::FileParsing
201
201
  else
202
202
  ret = {}
203
203
  sep = record.separator
204
-
204
+
205
205
  # String "helpfully" replaces ' ' with /\s+/ in splitting, so we
206
206
  # have to work around it.
207
207
  if sep == " "
@@ -216,20 +216,20 @@ module Puppet::Util::FileParsing
216
216
  ret[param] = :absent
217
217
  end
218
218
  end
219
-
219
+
220
220
  if record.rollup and ! line_fields.empty?
221
221
  last_field = record.fields[-1]
222
222
  val = ([ret[last_field]] + line_fields).join(record.joiner)
223
223
  ret[last_field] = val
224
224
  end
225
225
  end
226
-
227
- if ret
228
- ret[:record_type] = record.name
229
- return ret
230
- else
231
- return nil
232
- end
226
+ end
227
+
228
+ if ret
229
+ ret[:record_type] = record.name
230
+ return ret
231
+ else
232
+ return nil
233
233
  end
234
234
  end
235
235
 
@@ -373,7 +373,7 @@ module Puppet::Util::FileParsing
373
373
 
374
374
  def valid_attr?(type, attr)
375
375
  type = type.intern
376
- record = record_type(type)
376
+ record = record_type(type)
377
377
  if record && record.fields.include?(attr.intern)
378
378
  return true
379
379
  else
@@ -6,7 +6,7 @@
6
6
  # Raketasks and such to set the version based on the output of `git describe`
7
7
 
8
8
  module Puppet
9
- PUPPETVERSION = '6.7.0'
9
+ PUPPETVERSION = '6.7.2'
10
10
 
11
11
  ##
12
12
  # version is a public API method intended to always provide a fast and
@@ -0,0 +1,2 @@
1
+ manager: root
2
+ dumper: postmaster
@@ -224,4 +224,30 @@ describe "A very basic provider based on ParsedFile" do
224
224
  end
225
225
  end
226
226
  end
227
+
228
+ context 'parsing a record type' do
229
+ let(:input_text) { File.read(my_fixture('aliases.txt')) }
230
+ let(:target) { tmpfile('parsedfile_spec') }
231
+ let(:provider) do
232
+ example_provider_class = Class.new(Puppet::Provider::ParsedFile)
233
+ example_provider_class.default_target = target
234
+ # Setup some record rules
235
+ example_provider_class.instance_eval do
236
+ record_line :aliases, :fields => %w{manager alias}, :separator => ':'
237
+ end
238
+ example_provider_class.initvars
239
+ example_provider_class.prefetch
240
+ example_provider_class
241
+ end
242
+ let(:expected_result) do
243
+ [
244
+ {:manager=>"manager", :alias=>" root", :record_type=>:aliases},
245
+ {:manager=>"dumper", :alias=>" postmaster", :record_type=>:aliases}
246
+ ]
247
+ end
248
+
249
+ subject { provider.parse(input_text) }
250
+
251
+ it { is_expected.to match_array(expected_result) }
252
+ end
227
253
  end
@@ -408,6 +408,24 @@ describe Puppet::Type, :unless => Puppet::Util::Platform.windows? do
408
408
  end
409
409
 
410
410
  describe "when building autorelations" do
411
+ it "should be able to autorequire puppet resources" do
412
+ Puppet::Type.newtype(:autorelation_two) do
413
+ newparam(:name) { isnamevar }
414
+ autorequire(:autorelation_one) { Puppet::Type.type(:notify).new(name: 'test') }
415
+ end
416
+
417
+ relationship_graph = compile_to_relationship_graph(<<-MANIFEST)
418
+ autorelation_one { 'Notify[test]': }
419
+ autorelation_two { 'bar': }
420
+ MANIFEST
421
+
422
+ src = relationship_graph.vertices.select{ |x| x.ref.to_s == 'Notify[test]' }.first
423
+ dst = relationship_graph.vertices.select{ |x| x.ref.to_s == 'Autorelation_two[bar]' }.first
424
+
425
+ expect(relationship_graph.edge?(src,dst)).to be_truthy
426
+ expect(relationship_graph.edges_between(src,dst).first.event).to eq(:NONE)
427
+ end
428
+
411
429
  it "should be able to autorequire resources" do
412
430
  Puppet::Type.newtype(:autorelation_two) do
413
431
  newparam(:name) { isnamevar }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.7.0
4
+ version: 6.7.2
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-19 00:00:00.000000000 Z
11
+ date: 2019-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facter
@@ -1780,6 +1780,7 @@ files:
1780
1780
  - spec/fixtures/unit/provider/package/yum/yum-check-update-simple.txt
1781
1781
  - spec/fixtures/unit/provider/package/zypper/zypper-list-updates-SLES11sp1.out
1782
1782
  - spec/fixtures/unit/provider/package/zypper/zypper-list-updates-empty.out
1783
+ - spec/fixtures/unit/provider/parsedfile/aliases.txt
1783
1784
  - spec/fixtures/unit/provider/parsedfile/simple.txt
1784
1785
  - spec/fixtures/unit/provider/service/base/ps_ef.mixed_encoding
1785
1786
  - spec/fixtures/unit/provider/service/gentoo/rc_update_show
@@ -3023,6 +3024,7 @@ test_files:
3023
3024
  - spec/fixtures/unit/provider/package/yum/yum-check-update-simple.txt
3024
3025
  - spec/fixtures/unit/provider/package/zypper/zypper-list-updates-SLES11sp1.out
3025
3026
  - spec/fixtures/unit/provider/package/zypper/zypper-list-updates-empty.out
3027
+ - spec/fixtures/unit/provider/parsedfile/aliases.txt
3026
3028
  - spec/fixtures/unit/provider/parsedfile/simple.txt
3027
3029
  - spec/fixtures/unit/provider/service/base/ps_ef.mixed_encoding
3028
3030
  - spec/fixtures/unit/provider/service/gentoo/rc_update_show