puppet 5.0.0-x86-mingw32 → 5.0.1-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 +7 -0
- data/README.md +1 -1
- data/ext/puppet-test +1 -1
- data/lib/puppet.rb +3 -1
- data/lib/puppet/application/lookup.rb +2 -2
- data/lib/puppet/defaults.rb +1 -1
- data/lib/puppet/face/epp.rb +26 -24
- data/lib/puppet/face/module/search.rb +1 -1
- data/lib/puppet/forge.rb +3 -2
- data/lib/puppet/functions/each.rb +1 -1
- data/lib/puppet/functions/filter.rb +1 -1
- data/lib/puppet/module.rb +28 -1
- data/lib/puppet/module_tool.rb +2 -2
- data/lib/puppet/module_tool/applications/installer.rb +5 -5
- data/lib/puppet/module_tool/applications/uninstaller.rb +1 -1
- data/lib/puppet/module_tool/applications/upgrader.rb +5 -5
- data/lib/puppet/module_tool/shared_behaviors.rb +2 -2
- data/lib/puppet/parser/compiler.rb +4 -0
- data/lib/puppet/parser/functions/assert_type.rb +1 -1
- data/lib/puppet/parser/functions/binary_file.rb +1 -1
- data/lib/puppet/parser/functions/break.rb +1 -1
- data/lib/puppet/parser/functions/defined.rb +1 -1
- data/lib/puppet/parser/functions/dig.rb +1 -1
- data/lib/puppet/parser/functions/each.rb +2 -2
- data/lib/puppet/parser/functions/epp.rb +1 -1
- data/lib/puppet/parser/functions/filter.rb +2 -2
- data/lib/puppet/parser/functions/find_file.rb +1 -1
- data/lib/puppet/parser/functions/inline_epp.rb +1 -1
- data/lib/puppet/parser/functions/lest.rb +1 -1
- data/lib/puppet/parser/functions/map.rb +1 -1
- data/lib/puppet/parser/functions/match.rb +1 -1
- data/lib/puppet/parser/functions/new.rb +1 -1
- data/lib/puppet/parser/functions/next.rb +1 -1
- data/lib/puppet/parser/functions/reduce.rb +1 -1
- data/lib/puppet/parser/functions/return.rb +1 -1
- data/lib/puppet/parser/functions/reverse_each.rb +2 -2
- data/lib/puppet/parser/functions/slice.rb +1 -1
- data/lib/puppet/parser/functions/step.rb +2 -2
- data/lib/puppet/parser/functions/strftime.rb +1 -1
- data/lib/puppet/parser/functions/then.rb +1 -1
- data/lib/puppet/parser/functions/type.rb +1 -1
- data/lib/puppet/parser/functions/with.rb +1 -1
- data/lib/puppet/pops/merge_strategy.rb +1 -1
- data/lib/puppet/pops/time/timestamp.rb +2 -2
- data/lib/puppet/provider/nameservice.rb +4 -2
- data/lib/puppet/reference/configuration.rb +1 -1
- data/lib/puppet/reports/http.rb +4 -2
- data/lib/puppet/resource/capability_finder.rb +1 -1
- data/lib/puppet/util/execution.rb +1 -1
- data/lib/puppet/util/logging.rb +8 -4
- data/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/gem_version.rb +1 -1
- data/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version.rb +1 -1
- data/lib/puppet/version.rb +1 -1
- data/locales/puppet.pot +66 -58
- data/man/man5/puppet.conf.5 +233 -63
- data/man/man8/puppet-agent.8 +31 -9
- data/man/man8/puppet-apply.8 +20 -5
- data/man/man8/puppet-ca.8 +48 -34
- data/man/man8/puppet-catalog.8 +12 -15
- data/man/man8/puppet-cert.8 +23 -6
- data/man/man8/puppet-certificate.8 +52 -36
- data/man/man8/puppet-certificate_request.8 +10 -10
- data/man/man8/puppet-certificate_revocation_list.8 +9 -9
- data/man/man8/puppet-config.8 +5 -5
- data/man/man8/puppet-describe.8 +3 -3
- data/man/man8/puppet-device.8 +13 -5
- data/man/man8/puppet-doc.8 +5 -5
- data/man/man8/puppet-epp.8 +16 -10
- data/man/man8/puppet-facts.8 +9 -9
- data/man/man8/puppet-filebucket.8 +44 -5
- data/man/man8/puppet-generate.8 +84 -0
- data/man/man8/puppet-help.8 +4 -4
- data/man/man8/puppet-key.8 +11 -11
- data/man/man8/puppet-lookup.8 +104 -0
- data/man/man8/puppet-man.8 +5 -5
- data/man/man8/puppet-master.8 +5 -5
- data/man/man8/puppet-module.8 +29 -17
- data/man/man8/puppet-node.8 +9 -9
- data/man/man8/puppet-parser.8 +4 -4
- data/man/man8/puppet-plugin.8 +4 -4
- data/man/man8/puppet-report.8 +9 -9
- data/man/man8/puppet-resource.8 +4 -8
- data/man/man8/puppet-status.8 +9 -9
- data/man/man8/puppet.8 +12 -3
- data/spec/integration/util/execution_spec.rb +8 -0
- data/spec/unit/application/lookup_spec.rb +1 -1
- data/spec/unit/face/epp_face_spec.rb +9 -0
- data/spec/unit/face/module/search_spec.rb +1 -1
- data/spec/unit/functions/lookup_spec.rb +26 -0
- data/spec/unit/indirector/file_bucket_file/file_spec.rb +3 -3
- data/spec/unit/module_spec.rb +64 -0
- data/spec/unit/module_tool_spec.rb +22 -0
- data/spec/unit/parser/scope_spec.rb +1 -1
- data/spec/unit/pops/types/p_timestamp_type_spec.rb +30 -1
- data/spec/unit/puppet_spec.rb +33 -0
- data/spec/unit/util/logging_spec.rb +18 -9
- data/tasks/generate_ast_model.rake +48 -44
- data/tasks/manpages.rake +9 -1
- data/tasks/parallel.rake +12 -7
- metadata +3517 -3538
- data/man/man8/puppet-inspect.8 +0 -36
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: fd109c726b1b05e919562a24e24ba6a5ab6cad7d
|
4
|
+
data.tar.gz: ef0f9d45f247182ed34b5c87099c115f08f27825
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 078a49377b1496c79276e2118a19b2d581f9fe84bed2a3de6fcbb9266f86f288dd71a1675f40be30c2457550fa510228b98ec7fdb6908c156faab4f6fb827da4
|
7
|
+
data.tar.gz: 7ef578ab8001bacf5463d585ad787a726418dc67021090deda1d95363a48a76a9ca19a60ae301ce5a80ecce50cf674f3301d152e4dfb12030f2097251fdbc921
|
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.](
|
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
|
-
#
|
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
|
-
|
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[:
|
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
|
-
'
|
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]
|
data/lib/puppet/defaults.rb
CHANGED
@@ -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](
|
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,
|
data/lib/puppet/face/epp.rb
CHANGED
@@ -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
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
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
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
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](
|
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](
|
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 =
|
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
|
data/lib/puppet/module_tool.rb
CHANGED
@@ -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 =
|
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
|
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
|
-
|
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
|
-
|
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 =
|
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
|
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 =
|
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
|
-
|
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
|
-
|
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 =
|
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 =
|
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
|
-
|
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
|
@@ -3,7 +3,7 @@ Puppet::Parser::Functions::newfunction(
|
|
3
3
|
:type => :rvalue,
|
4
4
|
:arity => -3,
|
5
5
|
:doc => <<-DOC
|
6
|
-
Runs a [lambda](
|
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
|
@@ -3,7 +3,7 @@ Puppet::Parser::Functions::newfunction(
|
|
3
3
|
:type => :rvalue,
|
4
4
|
:arity => -3,
|
5
5
|
:doc => <<-DOC
|
6
|
-
Applies a [lambda](
|
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
|