Skip to content

Commit ab43286

Browse files
authored
Merge branch 'puppetlabs:main' into main
2 parents 26046da + 0fdd52b commit ab43286

38 files changed

+86
-64
lines changed

.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
Gem::Specification.new do |s|
1818
s.name = "puppet"
19-
version = "8.6.0"
19+
version = "8.7.0"
2020
mdata = version.match(/(\d+\.\d+\.\d+)/)
2121
s.version = mdata ? mdata[1] : version
2222

ext/project_data.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ gem_rdoc_options:
3636
gem_platform_dependencies:
3737
universal-darwin:
3838
gem_runtime_dependencies:
39-
CFPropertyList: '~> 2.2'
39+
CFPropertyList: ['>= 3.0.6', '< 4']
4040
x86-mingw32:
4141
gem_runtime_dependencies:
4242
ffi: '1.15.5'

lib/puppet/info_service/class_information_service.rb

+4-5
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def extract_param(p)
7474
def extract_type(structure, p)
7575
return structure if p.type_expr.nil?
7676

77-
structure[:type] = typeexpr_to_string(p.type_expr)
77+
structure[:type] = typeexpr_to_string(p.name, p.type_expr)
7878
structure
7979
end
8080

@@ -88,11 +88,10 @@ def extract_default(structure, p)
8888
structure
8989
end
9090

91-
def typeexpr_to_string(type_expr)
91+
def typeexpr_to_string(name, type_expr)
9292
type_parser.interpret_any(type_expr, nil).to_s
93-
rescue Puppet::ParseError
94-
# type is to complex - contains expressions that are not literal
95-
nil
93+
rescue Puppet::ParseError => e
94+
raise Puppet::Error, "The parameter '$#{name}' is invalid: #{e.message}", e.backtrace
9695
end
9796

9897
def value_as_literal(value_expr)

lib/puppet/pops/loader/static_loader.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ def initialize
4646

4747
def discover(type, error_collector = nil, name_authority = Pcore::RUNTIME_NAME_AUTHORITY)
4848
# Static loader only contains runtime types
49-
return EMPTY_ARRAY unless type == :type && name_authority == name_authority = Pcore::RUNTIME_NAME_AUTHORITY
49+
return EMPTY_ARRAY unless type == :type && name_authority == Pcore::RUNTIME_NAME_AUTHORITY
5050

51-
typed_names = type == :type && name_authority == Pcore::RUNTIME_NAME_AUTHORITY ? @loaded.keys : EMPTY_ARRAY
51+
typed_names = @loaded.keys
5252
block_given? ? typed_names.select { |tn| yield(tn) } : typed_names
5353
end
5454

lib/puppet/pops/validation/validator_factory_4_0.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def severity_producer
3737
p[Issues::EMPTY_RESOURCE_SPECIALIZATION] = :ignore
3838
p[Issues::CLASS_NOT_VIRTUALIZABLE] = :error
3939

40-
p[Issues::ILLEGAL_NONLITERAL_PARAMETER_TYPE] = Puppet[:strict] == :off ? :ignore : Puppet[:strict]
40+
p[Issues::ILLEGAL_NONLITERAL_PARAMETER_TYPE] = :deprecation
4141
p
4242
end
4343
end

lib/puppet/type/exec.rb

+8
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,14 @@ def check(value)
436436
back by re-extracting the tarball. If `important.tar` does **not**
437437
actually contain `myfile`, the exec will keep running every time
438438
Puppet runs.
439+
440+
This parameter can also take an array of files and the command will
441+
not run if **any** of these files exist. For example:
442+
443+
creates => ['/tmp/file1', '/tmp/file2'],
444+
445+
will only run the command if both files don't exist.
446+
439447
EOT
440448

441449
accept_arrays

lib/puppet/util/rpm_compare.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module Puppet::Util::RpmCompare
77
armv5tejl armv6l armv7l m68kmint s390 s390x ia64 x86_64 sh3 sh4
88
].freeze
99

10-
ARCH_REGEX = Regexp.new(ARCH_LIST.join('|\.'))
10+
ARCH_REGEX = Regexp.new(ARCH_LIST.map { |arch| "\\.#{arch}" }.join('|'))
1111

1212
# This is an attempt at implementing RPM's
1313
# lib/rpmvercmp.c rpmvercmp(a, b) in Ruby.

lib/puppet/util/windows/com.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def initialize(pointer)
141141

142142
self::VTBL.members.each do |name|
143143
define_method(name) do |*args|
144-
if Puppet::Util::Windows::COM.FAILED(result = @vtbl[name].call(self, *args))
144+
if Puppet::Util::Windows::COM.FAILED((result = @vtbl[name].call(self, *args)))
145145
raise Puppet::Util::Windows::Error.new(_("Failed to call %{klass}::%{name} with HRESULT: %{result}.") % { klass: self, name: name, result: result }, result)
146146
end
147147

@@ -183,7 +183,7 @@ def initialize(opts = {})
183183

184184
self::VTBL.members.each do |name|
185185
define_method(name) do |*args|
186-
if Puppet::Util::Windows::COM.FAILED(result = @vtbl[name].call(self, *args))
186+
if Puppet::Util::Windows::COM.FAILED((result = @vtbl[name].call(self, *args)))
187187
raise Puppet::Util::Windows::Error.new(_("Failed to call %{klass}::%{name} with HRESULT: %{result}.") % { klass: self, name: name, result: result }, result)
188188
end
189189

lib/puppet/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Raketasks and such to set the version based on the output of `git describe`
99

1010
module Puppet
11-
PUPPETVERSION = '8.6.0'
11+
PUPPETVERSION = '8.7.0'
1212

1313
##
1414
# version is a public API method intended to always provide a fast and

man/man5/puppet.conf.5

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPETCONF" "5" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPETCONF" "5" "April 2024" "Puppet, Inc." "Puppet manual"
55
\fBThis page is autogenerated; any changes will get overwritten\fR
66
.
77
.SH "Configuration settings"
@@ -973,7 +973,7 @@ The time to wait for data to be read from an HTTP connection\. If nothing is rea
973973
The HTTP User\-Agent string to send when making network requests\.
974974
.
975975
.IP "\(bu" 4
976-
\fIDefault\fR: \fBPuppet/8\.6\.0 Ruby/3\.1\.1\-p18 (x86_64\-linux)\fR
976+
\fIDefault\fR: \fBPuppet/8\.7\.0 Ruby/3\.1\.1\-p18 (x86_64\-linux)\fR
977977
.
978978
.IP "" 0
979979
.

man/man8/puppet-agent.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-AGENT" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-AGENT" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-agent\fR \- The puppet agent daemon

man/man8/puppet-apply.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-APPLY" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-APPLY" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-apply\fR \- Apply Puppet manifests locally

man/man8/puppet-catalog.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-CATALOG" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-CATALOG" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-catalog\fR \- Compile, save, view, and convert catalogs\.

man/man8/puppet-config.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-CONFIG" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-CONFIG" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-config\fR \- Interact with Puppet\'s settings\.

man/man8/puppet-describe.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-DESCRIBE" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-DESCRIBE" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-describe\fR \- Display help about resource types

man/man8/puppet-device.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-DEVICE" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-DEVICE" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-device\fR \- Manage remote network devices

man/man8/puppet-doc.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-DOC" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-DOC" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-doc\fR \- Generate Puppet references

man/man8/puppet-epp.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-EPP" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-EPP" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-epp\fR \- Interact directly with the EPP template parser/renderer\.

man/man8/puppet-facts.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-FACTS" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-FACTS" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-facts\fR \- Retrieve and store facts\.

man/man8/puppet-filebucket.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-FILEBUCKET" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-FILEBUCKET" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-filebucket\fR \- Store and retrieve files in a filebucket

man/man8/puppet-generate.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-GENERATE" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-GENERATE" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-generate\fR \- Generates Puppet code from Ruby definitions\.

man/man8/puppet-help.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-HELP" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-HELP" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-help\fR \- Display Puppet help\.

man/man8/puppet-lookup.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-LOOKUP" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-LOOKUP" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-lookup\fR \- Interactive Hiera lookup

man/man8/puppet-module.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-MODULE" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-MODULE" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-module\fR \- Creates, installs and searches for modules on the Puppet Forge\.

man/man8/puppet-node.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-NODE" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-NODE" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-node\fR \- View and manage node definitions\.

man/man8/puppet-parser.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-PARSER" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-PARSER" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-parser\fR \- Interact directly with the parser\.

man/man8/puppet-plugin.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-PLUGIN" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-PLUGIN" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-plugin\fR \- Interact with the Puppet plugin system\.

man/man8/puppet-report.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-REPORT" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-REPORT" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-report\fR \- Create, display, and submit reports\.

man/man8/puppet-resource.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-RESOURCE" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-RESOURCE" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-resource\fR \- The resource abstraction layer shell

man/man8/puppet-script.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-SCRIPT" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-SCRIPT" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-script\fR \- Run a puppet manifests as a script without compiling a catalog

man/man8/puppet-ssl.8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET\-SSL" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET\-SSL" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\-ssl\fR \- Manage SSL keys and certificates for puppet SSL clients

man/man8/puppet.8

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "PUPPET" "8" "March 2024" "Puppet, Inc." "Puppet manual"
4+
.TH "PUPPET" "8" "April 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
77
\fBpuppet\fR
@@ -25,4 +25,4 @@ Specialized:
2525
catalog Compile, save, view, and convert catalogs\. describe Display help about resource types device Manage remote network devices doc Generate Puppet references epp Interact directly with the EPP template parser/renderer\. facts Retrieve and store facts\. filebucket Store and retrieve files in a filebucket generate Generates Puppet code from Ruby definitions\. node View and manage node definitions\. parser Interact directly with the parser\. plugin Interact with the Puppet plugin system\. script Run a puppet manifests as a script without compiling a catalog ssl Manage SSL keys and certificates for puppet SSL clients
2626
.
2727
.P
28-
See \'puppet help \fIsubcommand\fR \fIaction\fR\' for help on a specific subcommand action\. See \'puppet help \fIsubcommand\fR\' for help on a specific subcommand\. Puppet v8\.6\.0
28+
See \'puppet help \fIsubcommand\fR \fIaction\fR\' for help on a specific subcommand action\. See \'puppet help \fIsubcommand\fR\' for help on a specific subcommand\. Puppet v8\.7\.0

spec/lib/puppet_spec/matchers.rb

+6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
end
1515
end
1616

17+
RSpec::Matchers.define :have_matching_log_with_source do |expected, file, line, pos|
18+
match do |actual|
19+
actual.any? { |item| item.message =~ expected && item.file == file && item.line == line && item.pos == pos }
20+
end
21+
end
22+
1723
RSpec::Matchers.define :exit_with do |expected|
1824
actual = nil
1925
match do |block|

spec/shared_examples/rhel_package_provider.rb

+14
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,20 @@
172172
allow(arch_provider).to receive(:query).and_return(:ensure => version)
173173
arch_provider.install
174174
end
175+
176+
it "does not move '-noarch' to the end of version" do
177+
version = '1.2.3'
178+
resource = Puppet::Type.type(:package).new(
179+
:name => "#{name}-noarch",
180+
:ensure => version,
181+
:provider =>provider_name
182+
)
183+
expect(Puppet::Util::Execution).to receive(:execute).with(["/usr/bin/#{provider_name}", '-d', '0', '-e', error_level, '-y', :install, "#{name}-noarch-#{version}"])
184+
provider = provider_class.new
185+
provider.resource = resource
186+
allow(provider).to receive(:query).and_return(:ensure => version)
187+
provider.install
188+
end
175189
end
176190

177191
describe 'when uninstalling' do

spec/unit/info_service_spec.rb

+5-2
Original file line numberDiff line numberDiff line change
@@ -518,12 +518,15 @@ class oops_2(Optional[[String]] $double_brackets) { }
518518
it "errors with a descriptive message if non-literal class parameter is given" do
519519
files = ['non_literal.pp', 'non_literal_2.pp'].map {|f| File.join(code_dir, f) }
520520
result = Puppet::InfoService.classes_per_environment({'production' => files })
521+
expect(@logs).to have_matching_log_with_source(/The parameter '\$bad_int' must be a literal type, not a Puppet::Pops::Model::AccessExpression/, "#{code_dir}/non_literal.pp", 1, 37)
522+
expect(@logs).to have_matching_log_with_source(/The parameter '\$double_brackets' must be a literal type, not a Puppet::Pops::Model::AccessExpression/, "#{code_dir}/non_literal_2.pp", 1, 44)
523+
521524
expect(result).to eq({
522525
"production"=>{
523526
"#{code_dir}/non_literal.pp" =>
524-
{:error=> "The parameter '$bad_int' must be a literal type, not a Puppet::Pops::Model::AccessExpression (file: #{code_dir}/non_literal.pp, line: 1, column: 37)"},
527+
{:error=> "The parameter '\$bad_int' is invalid: The expression <1-3> is not a valid type specification."},
525528
"#{code_dir}/non_literal_2.pp" =>
526-
{:error=> "The parameter '$double_brackets' must be a literal type, not a Puppet::Pops::Model::AccessExpression (file: #{code_dir}/non_literal_2.pp, line: 1, column: 44)"}
529+
{:error=> "The parameter '\$double_brackets' is invalid: The expression <Optional[[String]]> is not a valid type specification."}
527530
} # end production env
528531
})
529532
end

spec/unit/pops/evaluator/literal_evaluator_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
'Integer[-1]' => [-1],
2222
'Integer[-5, -1]' => [-5, -1],
2323
'Integer[-5, 5]' => [-5, 5],
24-
# we can't actually represent MIN_INTEGER because it's glexed as
24+
# we can't actually represent MIN_INTEGER below, because it's lexed as
2525
# UnaryMinusExpression containing a positive LiteralInteger and the integer
26-
# must be <= MAX_INTEGER
26+
# must be <= MAX_INTEGER. Therefore, the effective minimum is one greater.
2727
"Integer[#{Puppet::Pops::MIN_INTEGER + 1}]" => [-0x7FFFFFFFFFFFFFFF],
2828
"Integer[0, #{Puppet::Pops::MAX_INTEGER}]" => [0, 0x7FFFFFFFFFFFFFFF],
2929
'Integer[0, default]' => [0, :default],

0 commit comments

Comments
 (0)