puppet 5.0.0-universal-darwin → 5.0.1-universal-darwin

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.

Files changed (101) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +1 -1
  3. data/ext/puppet-test +1 -1
  4. data/lib/puppet.rb +3 -1
  5. data/lib/puppet/application/lookup.rb +2 -2
  6. data/lib/puppet/defaults.rb +1 -1
  7. data/lib/puppet/face/epp.rb +26 -24
  8. data/lib/puppet/face/module/search.rb +1 -1
  9. data/lib/puppet/forge.rb +3 -2
  10. data/lib/puppet/functions/each.rb +1 -1
  11. data/lib/puppet/functions/filter.rb +1 -1
  12. data/lib/puppet/module.rb +28 -1
  13. data/lib/puppet/module_tool.rb +2 -2
  14. data/lib/puppet/module_tool/applications/installer.rb +5 -5
  15. data/lib/puppet/module_tool/applications/uninstaller.rb +1 -1
  16. data/lib/puppet/module_tool/applications/upgrader.rb +5 -5
  17. data/lib/puppet/module_tool/shared_behaviors.rb +2 -2
  18. data/lib/puppet/parser/compiler.rb +4 -0
  19. data/lib/puppet/parser/functions/assert_type.rb +1 -1
  20. data/lib/puppet/parser/functions/binary_file.rb +1 -1
  21. data/lib/puppet/parser/functions/break.rb +1 -1
  22. data/lib/puppet/parser/functions/defined.rb +1 -1
  23. data/lib/puppet/parser/functions/dig.rb +1 -1
  24. data/lib/puppet/parser/functions/each.rb +2 -2
  25. data/lib/puppet/parser/functions/epp.rb +1 -1
  26. data/lib/puppet/parser/functions/filter.rb +2 -2
  27. data/lib/puppet/parser/functions/find_file.rb +1 -1
  28. data/lib/puppet/parser/functions/inline_epp.rb +1 -1
  29. data/lib/puppet/parser/functions/lest.rb +1 -1
  30. data/lib/puppet/parser/functions/map.rb +1 -1
  31. data/lib/puppet/parser/functions/match.rb +1 -1
  32. data/lib/puppet/parser/functions/new.rb +1 -1
  33. data/lib/puppet/parser/functions/next.rb +1 -1
  34. data/lib/puppet/parser/functions/reduce.rb +1 -1
  35. data/lib/puppet/parser/functions/return.rb +1 -1
  36. data/lib/puppet/parser/functions/reverse_each.rb +2 -2
  37. data/lib/puppet/parser/functions/slice.rb +1 -1
  38. data/lib/puppet/parser/functions/step.rb +2 -2
  39. data/lib/puppet/parser/functions/strftime.rb +1 -1
  40. data/lib/puppet/parser/functions/then.rb +1 -1
  41. data/lib/puppet/parser/functions/type.rb +1 -1
  42. data/lib/puppet/parser/functions/with.rb +1 -1
  43. data/lib/puppet/pops/merge_strategy.rb +1 -1
  44. data/lib/puppet/pops/time/timestamp.rb +2 -2
  45. data/lib/puppet/provider/nameservice.rb +4 -2
  46. data/lib/puppet/reference/configuration.rb +1 -1
  47. data/lib/puppet/reports/http.rb +4 -2
  48. data/lib/puppet/resource/capability_finder.rb +1 -1
  49. data/lib/puppet/util/execution.rb +1 -1
  50. data/lib/puppet/util/logging.rb +8 -4
  51. data/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/gem_version.rb +1 -1
  52. data/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version.rb +1 -1
  53. data/lib/puppet/version.rb +1 -1
  54. data/locales/puppet.pot +66 -58
  55. data/man/man5/puppet.conf.5 +233 -63
  56. data/man/man8/puppet-agent.8 +31 -9
  57. data/man/man8/puppet-apply.8 +20 -5
  58. data/man/man8/puppet-ca.8 +48 -34
  59. data/man/man8/puppet-catalog.8 +12 -15
  60. data/man/man8/puppet-cert.8 +23 -6
  61. data/man/man8/puppet-certificate.8 +52 -36
  62. data/man/man8/puppet-certificate_request.8 +10 -10
  63. data/man/man8/puppet-certificate_revocation_list.8 +9 -9
  64. data/man/man8/puppet-config.8 +5 -5
  65. data/man/man8/puppet-describe.8 +3 -3
  66. data/man/man8/puppet-device.8 +13 -5
  67. data/man/man8/puppet-doc.8 +5 -5
  68. data/man/man8/puppet-epp.8 +16 -10
  69. data/man/man8/puppet-facts.8 +9 -9
  70. data/man/man8/puppet-filebucket.8 +44 -5
  71. data/man/man8/puppet-generate.8 +84 -0
  72. data/man/man8/puppet-help.8 +4 -4
  73. data/man/man8/puppet-key.8 +11 -11
  74. data/man/man8/puppet-lookup.8 +104 -0
  75. data/man/man8/puppet-man.8 +5 -5
  76. data/man/man8/puppet-master.8 +5 -5
  77. data/man/man8/puppet-module.8 +29 -17
  78. data/man/man8/puppet-node.8 +9 -9
  79. data/man/man8/puppet-parser.8 +4 -4
  80. data/man/man8/puppet-plugin.8 +4 -4
  81. data/man/man8/puppet-report.8 +9 -9
  82. data/man/man8/puppet-resource.8 +4 -8
  83. data/man/man8/puppet-status.8 +9 -9
  84. data/man/man8/puppet.8 +12 -3
  85. data/spec/integration/util/execution_spec.rb +8 -0
  86. data/spec/unit/application/lookup_spec.rb +1 -1
  87. data/spec/unit/face/epp_face_spec.rb +9 -0
  88. data/spec/unit/face/module/search_spec.rb +1 -1
  89. data/spec/unit/functions/lookup_spec.rb +26 -0
  90. data/spec/unit/indirector/file_bucket_file/file_spec.rb +3 -3
  91. data/spec/unit/module_spec.rb +64 -0
  92. data/spec/unit/module_tool_spec.rb +22 -0
  93. data/spec/unit/parser/scope_spec.rb +1 -1
  94. data/spec/unit/pops/types/p_timestamp_type_spec.rb +30 -1
  95. data/spec/unit/puppet_spec.rb +33 -0
  96. data/spec/unit/util/logging_spec.rb +18 -9
  97. data/tasks/generate_ast_model.rake +48 -44
  98. data/tasks/manpages.rake +9 -1
  99. data/tasks/parallel.rake +12 -7
  100. metadata +3515 -3526
  101. data/man/man8/puppet-inspect.8 +0 -36
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 273a35f20a1bb72a5cf393a7117114b92b70d20a
4
+ data.tar.gz: fde5abdeaf7dff7906811ebbaf5aa0eae45d291d
5
+ SHA512:
6
+ metadata.gz: 27dad1cda1fb27c0f679e8c5aae68d759e2c197ef8c61c4c820ccba879b113a21747ca21ea0faf3b000c9386def70d523765147f132c78e51d028d736aee0a28
7
+ data.tar.gz: 7b20f10677a845e905b05c6ae833c881e16198e4b81c0073306f25102c534aa33582891595917748faf50e75c61c675134b73aa767876440b881e0f2dbc04cde
data/README.md CHANGED
@@ -26,7 +26,7 @@ which also includes orchestration features, a web console, and professional supp
26
26
  [The PE documentation is available here.](https://docs.puppetlabs.com/pe/latest)
27
27
 
28
28
  To install an open source release of Puppet,
29
- [see the installation guide on the docs site.](http://docs.puppetlabs.com/puppet/latest/reference/install_pre.html)
29
+ [see the installation guide on the docs site.](https://docs.puppetlabs.com/puppet/latest/reference/install_pre.html)
30
30
 
31
31
  If you need to run Puppet from source as a tester or developer,
32
32
  [see the running from source guide on the docs site.](https://docs.puppetlabs.com/guides/from_source.html)
data/ext/puppet-test CHANGED
@@ -23,7 +23,7 @@
23
23
  # parameter, so you can specify '--server <servername>' as an argument.
24
24
  #
25
25
  # See the configuration file documentation at
26
- # http://docs.puppetlabs.com/puppet/latest/reference/config_about_settings.html
26
+ # https://docs.puppetlabs.com/puppet/latest/reference/config_about_settings.html
27
27
  # for the full list of acceptable parameters. A commented list of all
28
28
  # configuration $options can also be generated by running puppetd with
29
29
  # '--genconfig'.
data/lib/puppet.rb CHANGED
@@ -251,9 +251,11 @@ module Puppet
251
251
  # doesn't exist
252
252
  default_environment = Puppet[:environment].to_sym
253
253
  if default_environment == :production
254
+ modulepath = settings[:modulepath]
255
+ modulepath = (modulepath.nil? || '' == modulepath) ? basemodulepath : Puppet::Node::Environment.split_path(modulepath)
254
256
  loaders << Puppet::Environments::StaticPrivate.new(
255
257
  Puppet::Node::Environment.create(default_environment,
256
- basemodulepath,
258
+ modulepath,
257
259
  Puppet::Node::Environment::NO_MANIFEST))
258
260
  end
259
261
  end
@@ -258,7 +258,7 @@ Copyright (c) 2015 Puppet Inc., LLC Licensed under the Apache 2.0 License
258
258
  # raise "No node was given via the '--node' flag for the scope of the lookup.\n#{RUN_HELP}"
259
259
  #end
260
260
 
261
- if (options[:sort_merge_arrays] || options[:merge_hash_arrays] || options[:prefix]) && options[:merge] != 'deep'
261
+ if (options[:sort_merged_arrays] || options[:merge_hash_arrays] || options[:prefix]) && options[:merge] != 'deep'
262
262
  raise _("The options %{deep_merge_opts} are only available with '--merge deep'\n%{run_help}") % { deep_merge_opts: DEEP_MERGE_OPTIONS, run_help: RUN_HELP }
263
263
  end
264
264
 
@@ -275,7 +275,7 @@ Copyright (c) 2015 Puppet Inc., LLC Licensed under the Apache 2.0 License
275
275
 
276
276
  if merge == 'deep'
277
277
  merge_options = {'strategy' => 'deep',
278
- 'sort_merge_arrays' => !options[:sort_merge_arrays].nil?,
278
+ 'sort_merged_arrays' => !options[:sort_merged_arrays].nil?,
279
279
  'merge_hash_arrays' => !options[:merge_hash_arrays].nil?}
280
280
 
281
281
  if options[:prefix]
@@ -996,7 +996,7 @@ EOT
996
996
  the request.
997
997
 
998
998
  For info on autosign configuration files, see
999
- [the guide to Puppet's config files](http://docs.puppetlabs.com/puppet/latest/reference/config_about_settings.html).",
999
+ [the guide to Puppet's config files](https://docs.puppetlabs.com/puppet/latest/reference/config_about_settings.html).",
1000
1000
  },
1001
1001
  :allow_duplicate_certs => {
1002
1002
  :default => false,
@@ -316,34 +316,36 @@ Puppet::Face.define(:epp, '0.0.1') do
316
316
  options[:header] = options[:header].nil? ? true : options[:header]
317
317
 
318
318
  compiler = create_compiler(options)
319
-
320
- # Print to a buffer since the face needs to return the resulting string
321
- # and the face API is "all or nothing"
322
- #
323
- buffer = StringIO.new
324
- status = true
325
- if options[:e]
326
- buffer.print render_inline(options[:e], compiler, options)
327
- elsif args.empty?
328
- if ! STDIN.tty?
329
- buffer.print render_inline(STDIN.read, compiler, options)
319
+ compiler.with_context_overrides('For rendering epp') do
320
+
321
+ # Print to a buffer since the face needs to return the resulting string
322
+ # and the face API is "all or nothing"
323
+ #
324
+ buffer = StringIO.new
325
+ status = true
326
+ if options[:e]
327
+ buffer.print render_inline(options[:e], compiler, options)
328
+ elsif args.empty?
329
+ if ! STDIN.tty?
330
+ buffer.print render_inline(STDIN.read, compiler, options)
331
+ else
332
+ raise Puppet::Error, _("No input to process given on command line or stdin")
333
+ end
330
334
  else
331
- raise Puppet::Error, _("No input to process given on command line or stdin")
332
- end
333
- else
334
- show_filename = args.count > 1
335
- file_nbr = 0
336
- args.each do |file|
337
- begin
338
- buffer.print render_file(file, compiler, options, show_filename, file_nbr += 1)
339
- rescue Puppet::ParseError => detail
340
- Puppet.err(detail.message)
341
- status = false
335
+ show_filename = args.count > 1
336
+ file_nbr = 0
337
+ args.each do |file|
338
+ begin
339
+ buffer.print render_file(file, compiler, options, show_filename, file_nbr += 1)
340
+ rescue Puppet::ParseError => detail
341
+ Puppet.err(detail.message)
342
+ status = false
343
+ end
342
344
  end
343
345
  end
346
+ raise Puppet::Error, _("error while rendering epp") unless status
347
+ buffer.string
344
348
  end
345
- raise Puppet::Error, _("error while rendering epp") unless status
346
- buffer.string
347
349
  end
348
350
  end
349
351
 
@@ -23,7 +23,7 @@ Puppet::Face.define(:module, '1.0.0') do
23
23
 
24
24
  when_invoked do |term, options|
25
25
  Puppet::ModuleTool.set_option_defaults options
26
- Puppet::ModuleTool::Applications::Searcher.new(term, Puppet::Forge.new, options).run
26
+ Puppet::ModuleTool::Applications::Searcher.new(term, Puppet::Forge.new(options[:module_repository] || Puppet[:module_repository], options[:strict_semver]), options).run
27
27
  end
28
28
 
29
29
  when_rendering :console do |results, term, options|
data/lib/puppet/forge.rb CHANGED
@@ -19,9 +19,10 @@ class Puppet::Forge < SemanticPuppet::Dependency::Source
19
19
 
20
20
  attr_reader :host, :repository
21
21
 
22
- def initialize(host = Puppet[:module_repository])
22
+ def initialize(host = Puppet[:module_repository], strict_semver = true)
23
23
  @host = host
24
24
  @repository = Puppet::Forge::Repository.new(host, USER_AGENT)
25
+ @strict_semver = strict_semver
25
26
  end
26
27
 
27
28
  # Return a list of module metadata hashes that match the search query.
@@ -216,7 +217,7 @@ class Puppet::Forge < SemanticPuppet::Dependency::Source
216
217
  l = list.map do |release|
217
218
  metadata = release['metadata']
218
219
  begin
219
- ModuleRelease.new(self, release)
220
+ ModuleRelease.new(self, release, @strict_semver)
220
221
  rescue ArgumentError => e
221
222
  Puppet.warning _("Cannot consider release %{name}-%{version}: %{error}") % { name: metadata['name'], version: metadata['version'], error: e }
222
223
  false
@@ -1,4 +1,4 @@
1
- # Runs a [lambda](http://docs.puppetlabs.com/puppet/latest/reference/lang_lambdas.html)
1
+ # Runs a [lambda](https://docs.puppetlabs.com/puppet/latest/reference/lang_lambdas.html)
2
2
  # repeatedly using each value in a data structure, then returns the values unchanged.
3
3
  #
4
4
  # This function takes two mandatory arguments, in this order:
@@ -1,4 +1,4 @@
1
- # Applies a [lambda](http://docs.puppetlabs.com/puppet/latest/reference/lang_lambdas.html)
1
+ # Applies a [lambda](https://docs.puppetlabs.com/puppet/latest/reference/lang_lambdas.html)
2
2
  # to every value in a data structure and returns an array or hash containing any elements
3
3
  # for which the lambda evaluates to `true`.
4
4
  #
data/lib/puppet/module.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'puppet/util/logging'
2
2
  require 'json'
3
+ require 'semantic_puppet/gem_version'
3
4
 
4
5
  # Support for modules
5
6
  class Puppet::Module
@@ -52,6 +53,32 @@ class Puppet::Module
52
53
  return false
53
54
  end
54
55
 
56
+ # @api private
57
+ def self.parse_range(range, strict)
58
+ @parse_range_method ||= SemanticPuppet::VersionRange.method(:parse)
59
+ if @parse_range_method.arity == 1
60
+ @semver_gem_version ||= SemanticPuppet::Version.parse(SemanticPuppet::VERSION)
61
+
62
+ # Give user a heads-up if the desired strict setting cannot be honored
63
+ if strict
64
+ if @semver_gem_version.major < 1
65
+ Puppet.warn_once('strict_version_ranges', 'version_range_cannot_be_strict',
66
+ _('VersionRanges will never be strict when using non-vendored SemanticPuppet gem, version %{version}') % { version: @semver_gem_version},
67
+ :default, :default, :notice)
68
+ end
69
+ else
70
+ if @semver_gem_version.major >= 1
71
+ Puppet.warn_once('strict_version_ranges', 'version_range_always_strict',
72
+ _('VersionRanges will always be strict when using non-vendored SemanticPuppet gem, version %{version}') % { version: @semver_gem_version},
73
+ :default, :default, :notice)
74
+ end
75
+ end
76
+ @parse_range_method.call(range)
77
+ else
78
+ @parse_range_method.call(range, strict)
79
+ end
80
+ end
81
+
55
82
  attr_reader :name, :environment, :path, :metadata
56
83
  attr_writer :environment
57
84
 
@@ -328,7 +355,7 @@ class Puppet::Module
328
355
 
329
356
  if version_string
330
357
  begin
331
- required_version_semver_range = SemanticPuppet::VersionRange.parse(version_string, @strict_semver)
358
+ required_version_semver_range = self.class.parse_range(version_string, @strict_semver)
332
359
  actual_version_semver = SemanticPuppet::Version.parse(dep_mod.version)
333
360
  rescue ArgumentError
334
361
  error_details[:reason] = :non_semantic_version
@@ -132,7 +132,7 @@ module Puppet
132
132
  options[:target_dir] = face_environment.full_modulepath.first
133
133
 
134
134
  # Default false to retain backward compatibility with SemanticPuppet 0.1.4
135
- options[:strict_semver] = false
135
+ options[:strict_semver] = false unless options.include?(:strict_semver)
136
136
  end
137
137
 
138
138
  # Given a hash of options, we should discover or create a
@@ -174,7 +174,7 @@ module Puppet
174
174
  range = dep['version_requirement'] || '>= 0.0.0'
175
175
 
176
176
  begin
177
- parsed_range = SemanticPuppet::VersionRange.parse(range, strict_semver)
177
+ parsed_range = Module.parse_range(range, strict_semver)
178
178
  rescue ArgumentError => e
179
179
  Puppet.debug "Error in #{where} parsing dependency #{dep_name} (#{e.message}); using empty range."
180
180
  parsed_range = SemanticPuppet::VersionRange::EMPTY_RANGE
@@ -60,7 +60,7 @@ module Puppet::ModuleTool
60
60
  begin
61
61
  if installed_module = installed_modules[name]
62
62
  unless forced?
63
- if SemanticPuppet::VersionRange.parse(version, @strict_semver).include? installed_module.version
63
+ if Puppet::Module.parse_range(version, @strict_semver).include? installed_module.version
64
64
  results[:result] = :noop
65
65
  results[:version] = installed_module.version
66
66
  return results
@@ -104,7 +104,7 @@ module Puppet::ModuleTool
104
104
  # locking it to upgrades within the same major version.
105
105
  installed_range = ">=#{version} #{version.major}.x"
106
106
  graph.add_constraint('installed', mod, installed_range) do |node|
107
- SemanticPuppet::VersionRange.parse(installed_range, @strict_semver).include? node.version
107
+ Puppet::Module.parse_range(installed_range, @strict_semver).include? node.version
108
108
  end
109
109
 
110
110
  release.mod.dependencies.each do |dep|
@@ -112,7 +112,7 @@ module Puppet::ModuleTool
112
112
 
113
113
  range = dep['version_requirement']
114
114
  graph.add_constraint("#{mod} constraint", dep_name, range) do |node|
115
- SemanticPuppet::VersionRange.parse(range, @strict_semver).include? node.version
115
+ Puppet::Module.parse_range(range, @strict_semver).include? node.version
116
116
  end
117
117
  end
118
118
  end
@@ -186,7 +186,7 @@ module Puppet::ModuleTool
186
186
  private
187
187
 
188
188
  def module_repository
189
- @repo ||= Puppet::Forge.new
189
+ @repo ||= Puppet::Forge.new(Puppet[:module_repository], @strict_semver)
190
190
  end
191
191
 
192
192
  def local_tarball_source
@@ -206,7 +206,7 @@ module Puppet::ModuleTool
206
206
  end
207
207
 
208
208
  def build_single_module_graph(name, version)
209
- range = SemanticPuppet::VersionRange.parse(version, @strict_semver)
209
+ range = Puppet::Module.parse_range(version, @strict_semver)
210
210
  graph = SemanticPuppet::Dependency::Graph.new(name => range)
211
211
  releases = SemanticPuppet::Dependency.fetch_releases(name)
212
212
  releases.each { |release| release.dependencies.clear }
@@ -58,7 +58,7 @@ module Puppet::ModuleTool
58
58
  :path => mod.modulepath,
59
59
  }
60
60
  if @options[:version] && mod.version
61
- next unless SemanticPuppet::VersionRange.parse(@options[:version], @strict_semver).include?(SemanticPuppet::Version.parse(mod.version))
61
+ next unless Puppet::Module.parse_range(@options[:version], @strict_semver).include?(SemanticPuppet::Version.parse(mod.version))
62
62
  end
63
63
  @installed << mod
64
64
  elsif mod_name =~ /#{@name}/
@@ -91,7 +91,7 @@ module Puppet::ModuleTool
91
91
  if available_versions.empty?
92
92
  raise NoCandidateReleasesError, results.merge(:module_name => name, :source => module_repository.host)
93
93
  elsif results[:requested_version] != :latest
94
- requested = SemanticPuppet::VersionRange.parse(results[:requested_version], @strict_semver)
94
+ requested = Puppet::Module.parse_range(results[:requested_version], @strict_semver)
95
95
  unless available_versions.any? {|m| requested.include? m.version}
96
96
  raise NoCandidateReleasesError, results.merge(:module_name => name, :source => module_repository.host)
97
97
  end
@@ -120,7 +120,7 @@ module Puppet::ModuleTool
120
120
  # module, locking it to upgrades within the same major version.
121
121
  installed_range = ">=#{version} #{version.major}.x"
122
122
  graph.add_constraint('installed', installed_module, installed_range) do |node|
123
- SemanticPuppet::VersionRange.parse(installed_range, @strict_semver).include? node.version
123
+ Puppet::Module.parse_range(installed_range, @strict_semver).include? node.version
124
124
  end
125
125
 
126
126
  release.mod.dependencies.each do |dep|
@@ -128,7 +128,7 @@ module Puppet::ModuleTool
128
128
 
129
129
  range = dep['version_requirement']
130
130
  graph.add_constraint("#{installed_module} constraint", dep_name, range) do |node|
131
- SemanticPuppet::VersionRange.parse(range, @strict_semver).include? node.version
131
+ Puppet::Module.parse_range(range, @strict_semver).include? node.version
132
132
  end
133
133
  end
134
134
  end
@@ -216,7 +216,7 @@ module Puppet::ModuleTool
216
216
 
217
217
  private
218
218
  def module_repository
219
- @repo ||= Puppet::Forge.new
219
+ @repo ||= Puppet::Forge.new(Puppet[:module_repository], @strict_semver)
220
220
  end
221
221
 
222
222
  def installed_modules_source
@@ -228,7 +228,7 @@ module Puppet::ModuleTool
228
228
  end
229
229
 
230
230
  def build_single_module_graph(name, version)
231
- range = SemanticPuppet::VersionRange.parse(version, @strict_semver)
231
+ range = Puppet::Module.parse_range(version, @strict_semver)
232
232
  graph = SemanticPuppet::Dependency::Graph.new(name => range)
233
233
  releases = SemanticPuppet::Dependency.fetch_releases(name)
234
234
  releases.each { |release| release.dependencies.clear }
@@ -76,10 +76,10 @@ module Puppet::ModuleTool::Shared
76
76
  }
77
77
 
78
78
  if forced?
79
- range = SemanticPuppet::VersionRange.parse(@version, @strict_semver) rescue SemanticPuppet::VersionRange.parse('>= 0.0.0', @strict_semver)
79
+ range = Puppet::Module.parse_range(@version, @strict_semver) rescue Puppet::Module.parse_range('>= 0.0.0', @strict_semver)
80
80
  else
81
81
  range = (@conditions[mod]).map do |r|
82
- SemanticPuppet::VersionRange.parse(r[:dependency], @strict_semver) rescue SemanticPuppet::VersionRange.parse('>= 0.0.0', @strict_semver)
82
+ Puppet::Module.parse_range(r[:dependency], @strict_semver) rescue Puppet::Module.parse_range('>= 0.0.0', @strict_semver)
83
83
  end.inject(&:&)
84
84
  end
85
85
 
@@ -143,6 +143,10 @@ class Puppet::Parser::Compiler
143
143
  # Return a list of all of the defined classes.
144
144
  def_delegator :@catalog, :classes, :classlist
145
145
 
146
+ def with_context_overrides(description = '', &block)
147
+ Puppet.override( @context_overrides , description, &block)
148
+ end
149
+
146
150
  # Compiler our catalog. This mostly revolves around finding and evaluating classes.
147
151
  # This is the main entry into our catalog.
148
152
  def compile
@@ -56,5 +56,5 @@ For more information about data types, see the
56
56
  - Since 4.0.0
57
57
  DOC
58
58
  ) do |args|
59
- Error.is4x('assert_type')
59
+ Puppet::Parser::Functions::Error.is4x('assert_type')
60
60
  end
@@ -20,5 +20,5 @@ To search for the existence of files, use the `find_file()` function.
20
20
  - since 4.8.0
21
21
  DOC
22
22
  ) do |args|
23
- Error.is4x('binary_file')
23
+ Puppet::Parser::Functions::Error.is4x('binary_file')
24
24
  end
@@ -35,5 +35,5 @@ Would notice the value `[10]`
35
35
  * Since 4.8.0
36
36
  DOC
37
37
  ) do |args|
38
- Error.is4x('break')
38
+ Puppet::Parser::Functions::Error.is4x('break')
39
39
  end
@@ -103,5 +103,5 @@ defined('$tmp_file2')
103
103
  - Since 4.0.0 includes all future parser features
104
104
  DOC
105
105
  ) do |vals|
106
- Error.is4x('defined')
106
+ Puppet::Parser::Functions::Error.is4x('defined')
107
107
  end
@@ -25,5 +25,5 @@ Would notice the value 100.
25
25
  * Since 4.5.0
26
26
  DOC
27
27
  ) do |args|
28
- Error.is4x('dig')
28
+ Puppet::Parser::Functions::Error.is4x('dig')
29
29
  end
@@ -3,7 +3,7 @@ Puppet::Parser::Functions::newfunction(
3
3
  :type => :rvalue,
4
4
  :arity => -3,
5
5
  :doc => <<-DOC
6
- Runs a [lambda](http://docs.puppetlabs.com/puppet/latest/reference/lang_lambdas.html)
6
+ Runs a [lambda](https://docs.puppetlabs.com/puppet/latest/reference/lang_lambdas.html)
7
7
  repeatedly using each value in a data structure, then returns the values unchanged.
8
8
 
9
9
  This function takes two mandatory arguments, in this order:
@@ -100,5 +100,5 @@ documentation.
100
100
  - Since 4.0.0
101
101
  DOC
102
102
  ) do |args|
103
- Error.is4x('each')
103
+ Puppet::Parser::Functions::Error.is4x('each')
104
104
  end
@@ -32,5 +32,5 @@ function fails to pass any required parameter.
32
32
 
33
33
  - Since 4.0.0") do |args|
34
34
 
35
- Error.is4x('epp')
35
+ Puppet::Parser::Functions::Error.is4x('epp')
36
36
  end
@@ -3,7 +3,7 @@ Puppet::Parser::Functions::newfunction(
3
3
  :type => :rvalue,
4
4
  :arity => -3,
5
5
  :doc => <<-DOC
6
- Applies a [lambda](http://docs.puppetlabs.com/puppet/latest/reference/lang_lambdas.html)
6
+ Applies a [lambda](https://docs.puppetlabs.com/puppet/latest/reference/lang_lambdas.html)
7
7
  to every value in a data structure and returns an array or hash containing any elements
8
8
  for which the lambda evaluates to `true`.
9
9
 
@@ -74,5 +74,5 @@ $filtered_data = $data.filter |$keys, $values| { $keys =~ /berry$/ and $values <
74
74
  - Since 4.0.0
75
75
  DOC
76
76
  ) do |args|
77
- Error.is4x('filter')
77
+ Puppet::Parser::Functions::Error.is4x('filter')
78
78
  end