puppet 7.10.0-x86-mingw32 → 7.11.0-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 +4 -4
- data/Gemfile +2 -2
- data/Gemfile.lock +9 -9
- data/lib/puppet/application/agent.rb +4 -0
- data/lib/puppet/application/apply.rb +20 -2
- data/lib/puppet/application/resource.rb +15 -13
- data/lib/puppet/concurrent/thread_local_singleton.rb +1 -0
- data/lib/puppet/configurer.rb +14 -4
- data/lib/puppet/confine/variable.rb +1 -1
- data/lib/puppet/defaults.rb +9 -3
- data/lib/puppet/facter_impl.rb +96 -0
- data/lib/puppet/file_serving/mount/file.rb +4 -4
- data/lib/puppet/file_system/file_impl.rb +3 -1
- data/lib/puppet/forge.rb +1 -1
- data/lib/puppet/indirector/catalog/compiler.rb +3 -3
- data/lib/puppet/indirector/facts/facter.rb +6 -6
- data/lib/puppet/indirector/indirection.rb +1 -1
- data/lib/puppet/module_tool/applications/uninstaller.rb +1 -1
- data/lib/puppet/module_tool/applications/upgrader.rb +1 -1
- data/lib/puppet/pal/pal_impl.rb +1 -1
- data/lib/puppet/parser/scope.rb +8 -7
- data/lib/puppet/parser/templatewrapper.rb +1 -0
- data/lib/puppet/pops/lookup/lookup_adapter.rb +3 -2
- data/lib/puppet/pops/model/ast.rb +1 -0
- data/lib/puppet/pops/model/factory.rb +14 -13
- data/lib/puppet/pops/parser/egrammar.ra +2 -2
- data/lib/puppet/pops/parser/eparser.rb +752 -753
- data/lib/puppet/pops/parser/lexer2.rb +69 -68
- data/lib/puppet/pops/parser/slurp_support.rb +1 -0
- data/lib/puppet/pops/serialization/to_stringified_converter.rb +1 -1
- data/lib/puppet/pops/types/type_formatter.rb +7 -6
- data/lib/puppet/pops/types/types.rb +1 -1
- data/lib/puppet/provider/aix_object.rb +1 -1
- data/lib/puppet/provider/group/groupadd.rb +5 -2
- data/lib/puppet/provider/package/pkg.rb +1 -1
- data/lib/puppet/provider/package/puppet_gem.rb +1 -1
- data/lib/puppet/provider/package/puppetserver_gem.rb +1 -1
- data/lib/puppet/provider/package/yum.rb +1 -1
- data/lib/puppet/provider/service/base.rb +1 -1
- data/lib/puppet/provider/service/init.rb +5 -5
- data/lib/puppet/provider/service/launchd.rb +1 -1
- data/lib/puppet/provider/service/redhat.rb +1 -1
- data/lib/puppet/provider/service/smf.rb +3 -3
- data/lib/puppet/provider/service/systemd.rb +1 -1
- data/lib/puppet/provider/service/upstart.rb +5 -5
- data/lib/puppet/provider/user/aix.rb +44 -1
- data/lib/puppet/provider/user/directoryservice.rb +1 -1
- data/lib/puppet/provider/user/useradd.rb +10 -7
- data/lib/puppet/provider.rb +1 -1
- data/lib/puppet/reference/providers.rb +2 -2
- data/lib/puppet/resource/type_collection.rb +2 -1
- data/lib/puppet/runtime.rb +11 -1
- data/lib/puppet/settings/file_setting.rb +3 -8
- data/lib/puppet/settings.rb +2 -2
- data/lib/puppet/test/test_helper.rb +4 -1
- data/lib/puppet/type/exec.rb +9 -1
- data/lib/puppet/type/group.rb +0 -1
- data/lib/puppet/type/resources.rb +1 -1
- data/lib/puppet/type/user.rb +0 -1
- data/lib/puppet/util/command_line.rb +1 -1
- data/lib/puppet/util/filetype.rb +2 -2
- data/lib/puppet/util/log.rb +1 -2
- data/lib/puppet/util/logging.rb +1 -25
- data/lib/puppet/util/pidlock.rb +1 -1
- data/lib/puppet/util/rdoc/parser/puppet_parser_core.rb +1 -1
- data/lib/puppet/util/suidmanager.rb +1 -2
- data/lib/puppet/util/tagging.rb +1 -0
- data/lib/puppet/util/windows/user.rb +0 -1
- data/lib/puppet/util.rb +4 -3
- data/lib/puppet/version.rb +1 -1
- data/lib/puppet.rb +2 -6
- data/man/man5/puppet.conf.5 +10 -2
- data/man/man8/puppet-agent.8 +4 -1
- data/man/man8/puppet-apply.8 +1 -1
- data/man/man8/puppet-catalog.8 +1 -1
- data/man/man8/puppet-config.8 +1 -1
- data/man/man8/puppet-describe.8 +1 -1
- data/man/man8/puppet-device.8 +1 -1
- data/man/man8/puppet-doc.8 +1 -1
- data/man/man8/puppet-epp.8 +1 -1
- data/man/man8/puppet-facts.8 +1 -1
- data/man/man8/puppet-filebucket.8 +1 -1
- data/man/man8/puppet-generate.8 +1 -1
- data/man/man8/puppet-help.8 +1 -1
- data/man/man8/puppet-lookup.8 +1 -1
- data/man/man8/puppet-module.8 +1 -1
- data/man/man8/puppet-node.8 +1 -1
- data/man/man8/puppet-parser.8 +1 -1
- data/man/man8/puppet-plugin.8 +1 -1
- data/man/man8/puppet-report.8 +1 -1
- data/man/man8/puppet-resource.8 +1 -1
- data/man/man8/puppet-script.8 +1 -1
- data/man/man8/puppet-ssl.8 +1 -1
- data/man/man8/puppet.8 +2 -2
- data/spec/integration/application/agent_spec.rb +16 -0
- data/spec/integration/configurer_spec.rb +1 -1
- data/spec/integration/indirector/facts/facter_spec.rb +3 -3
- data/spec/integration/transaction/report_spec.rb +1 -1
- data/spec/integration/type/file_spec.rb +2 -2
- data/spec/integration/type/package_spec.rb +6 -6
- data/spec/integration/util/rdoc/parser_spec.rb +1 -1
- data/spec/integration/util/windows/process_spec.rb +1 -9
- data/spec/unit/application/apply_spec.rb +76 -56
- data/spec/unit/application/resource_spec.rb +29 -0
- data/spec/unit/configurer_spec.rb +13 -3
- data/spec/unit/facter_impl_spec.rb +31 -0
- data/spec/unit/file_bucket/dipper_spec.rb +2 -2
- data/spec/unit/file_system_spec.rb +7 -0
- data/spec/unit/functions/lookup_spec.rb +64 -0
- data/spec/unit/indirector/indirection_spec.rb +10 -3
- data/spec/unit/pops/serialization/to_stringified_spec.rb +5 -0
- data/spec/unit/pops/types/type_calculator_spec.rb +6 -0
- data/spec/unit/provider/package/gem_spec.rb +1 -1
- data/spec/unit/provider/package/pip2_spec.rb +1 -1
- data/spec/unit/provider/package/pip3_spec.rb +1 -1
- data/spec/unit/provider/package/pip_spec.rb +1 -1
- data/spec/unit/provider/package/puppet_gem_spec.rb +1 -1
- data/spec/unit/provider/package/puppetserver_gem_spec.rb +1 -1
- data/spec/unit/provider/user/aix_spec.rb +100 -0
- data/spec/unit/provider/user/directoryservice_spec.rb +1 -1
- data/spec/unit/provider_spec.rb +4 -4
- data/spec/unit/puppet_spec.rb +12 -4
- data/spec/unit/settings/file_setting_spec.rb +10 -7
- data/spec/unit/type_spec.rb +2 -2
- data/spec/unit/util/logging_spec.rb +2 -0
- data/tasks/parallel.rake +3 -3
- metadata +5 -2
@@ -1142,7 +1142,7 @@ end
|
|
1142
1142
|
provider.class.instance_variable_set(:@os_version, nil) if provider.class.instance_variable_defined? :@os_version
|
1143
1143
|
end
|
1144
1144
|
|
1145
|
-
it 'should call
|
1145
|
+
it 'should call Puppet.runtime[:facter].value(:macosx_productversion_major) ONLY ONCE no matter how ' +
|
1146
1146
|
'many times get_os_version() is called' do
|
1147
1147
|
expect(Facter).to receive(:value).with(:macosx_productversion_major).once.and_return('10.8')
|
1148
1148
|
expect(provider.class.get_os_version).to eq('10.8')
|
data/spec/unit/provider_spec.rb
CHANGED
@@ -222,18 +222,18 @@ describe Puppet::Provider do
|
|
222
222
|
{ :true => false } => false,
|
223
223
|
{ :false => false } => true,
|
224
224
|
{ :false => true } => false,
|
225
|
-
{ :operatingsystem =>
|
225
|
+
{ :operatingsystem => Puppet.runtime[:facter].value(:operatingsystem) } => true,
|
226
226
|
{ :operatingsystem => :yayness } => false,
|
227
227
|
{ :nothing => :yayness } => false,
|
228
228
|
{ :exists => Puppet::Util.which(existing_command) } => true,
|
229
229
|
{ :exists => "/this/file/does/not/exist" } => false,
|
230
230
|
{ :true => true, :exists => Puppet::Util.which(existing_command) } => true,
|
231
231
|
{ :true => true, :exists => "/this/file/does/not/exist" } => false,
|
232
|
-
{ :operatingsystem =>
|
232
|
+
{ :operatingsystem => Puppet.runtime[:facter].value(:operatingsystem),
|
233
233
|
:exists => Puppet::Util.which(existing_command) } => true,
|
234
234
|
{ :operatingsystem => :yayness,
|
235
235
|
:exists => Puppet::Util.which(existing_command) } => false,
|
236
|
-
{ :operatingsystem =>
|
236
|
+
{ :operatingsystem => Puppet.runtime[:facter].value(:operatingsystem),
|
237
237
|
:exists => "/this/file/does/not/exist" } => false,
|
238
238
|
{ :operatingsystem => :yayness,
|
239
239
|
:exists => "/this/file/does/not/exist" } => false,
|
@@ -269,7 +269,7 @@ describe Puppet::Provider do
|
|
269
269
|
end
|
270
270
|
|
271
271
|
context "default providers" do
|
272
|
-
let :os do
|
272
|
+
let :os do Puppet.runtime[:facter].value(:operatingsystem) end
|
273
273
|
|
274
274
|
it { is_expected.to respond_to :specificity }
|
275
275
|
|
data/spec/unit/puppet_spec.rb
CHANGED
@@ -91,12 +91,20 @@ describe Puppet do
|
|
91
91
|
expect(Puppet.runtime[:http]).to be_an_instance_of(Puppet::HTTP::Client)
|
92
92
|
end
|
93
93
|
|
94
|
-
it 'allows
|
95
|
-
|
96
|
-
Puppet.initialize_settings([], true, true, http:
|
94
|
+
it 'allows a http implementation to be registered' do
|
95
|
+
http_impl = double('http')
|
96
|
+
Puppet.initialize_settings([], true, true, http: http_impl)
|
97
97
|
|
98
98
|
|
99
|
-
expect(Puppet.runtime[:http]).to eq(
|
99
|
+
expect(Puppet.runtime[:http]).to eq(http_impl)
|
100
|
+
end
|
101
|
+
|
102
|
+
it 'allows a facter implementation to be registered' do
|
103
|
+
facter_impl = double('facter')
|
104
|
+
Puppet.initialize_settings([], true, true, facter: facter_impl)
|
105
|
+
|
106
|
+
|
107
|
+
expect(Puppet.runtime[:facter]).to eq(facter_impl)
|
100
108
|
end
|
101
109
|
end
|
102
110
|
|
@@ -125,9 +125,10 @@ describe Puppet::Settings::FileSetting do
|
|
125
125
|
describe "when being converted to a resource" do
|
126
126
|
before do
|
127
127
|
@basepath = make_absolute("/somepath")
|
128
|
+
allow(Puppet::FileSystem).to receive(:exist?).and_call_original
|
129
|
+
allow(Puppet::FileSystem).to receive(:exist?).with(@basepath).and_return(true)
|
128
130
|
@settings = double('settings')
|
129
131
|
@file = Puppet::Settings::FileSetting.new(:settings => @settings, :desc => "eh", :name => :myfile, :section => "mysect")
|
130
|
-
allow(@file).to receive(:create_files?).and_return(true)
|
131
132
|
allow(@settings).to receive(:value).with(:myfile, nil, false).and_return(@basepath)
|
132
133
|
end
|
133
134
|
|
@@ -135,18 +136,19 @@ describe Puppet::Settings::FileSetting do
|
|
135
136
|
expect(@file.type).to eq(:file)
|
136
137
|
end
|
137
138
|
|
138
|
-
it "
|
139
|
-
expect(@file).to receive(:create_files?).and_return(false)
|
139
|
+
it "skips non-existent files" do
|
140
140
|
expect(@file).to receive(:type).and_return(:file)
|
141
141
|
expect(Puppet::FileSystem).to receive(:exist?).with(@basepath).and_return(false)
|
142
142
|
expect(@file.to_resource).to be_nil
|
143
143
|
end
|
144
144
|
|
145
|
-
it "
|
146
|
-
expect(@file).to receive(:create_files?).and_return(false)
|
145
|
+
it "manages existing files" do
|
147
146
|
expect(@file).to receive(:type).and_return(:file)
|
148
|
-
|
149
|
-
|
147
|
+
expect(@file.to_resource).to be_instance_of(Puppet::Resource)
|
148
|
+
end
|
149
|
+
|
150
|
+
it "always manages directories" do
|
151
|
+
expect(@file).to receive(:type).and_return(:directory)
|
150
152
|
expect(@file.to_resource).to be_instance_of(Puppet::Resource)
|
151
153
|
end
|
152
154
|
|
@@ -177,6 +179,7 @@ describe Puppet::Settings::FileSetting do
|
|
177
179
|
it "should fully qualified returned files if necessary (#795)" do
|
178
180
|
allow(@settings).to receive(:value).with(:myfile, nil, false).and_return("myfile")
|
179
181
|
path = File.expand_path('myfile')
|
182
|
+
allow(Puppet::FileSystem).to receive(:exist?).with(path).and_return(true)
|
180
183
|
expect(@file.to_resource.title).to eq(path)
|
181
184
|
end
|
182
185
|
|
data/spec/unit/type_spec.rb
CHANGED
@@ -1142,7 +1142,7 @@ describe Puppet::Type, :unless => Puppet::Util::Platform.windows? do
|
|
1142
1142
|
|
1143
1143
|
before :each do
|
1144
1144
|
type.provide(:default) do
|
1145
|
-
defaultfor :operatingsystem =>
|
1145
|
+
defaultfor :operatingsystem => Puppet.runtime[:facter].value(:operatingsystem)
|
1146
1146
|
mk_resource_methods
|
1147
1147
|
class << self
|
1148
1148
|
attr_accessor :params
|
@@ -1172,7 +1172,7 @@ describe Puppet::Type, :unless => Puppet::Util::Platform.windows? do
|
|
1172
1172
|
context "with a default provider" do
|
1173
1173
|
before :each do
|
1174
1174
|
type.provide(:default) do
|
1175
|
-
defaultfor :operatingsystem =>
|
1175
|
+
defaultfor :operatingsystem => Puppet.runtime[:facter].value(:operatingsystem)
|
1176
1176
|
mk_resource_methods
|
1177
1177
|
class << self
|
1178
1178
|
attr_accessor :names
|
@@ -552,6 +552,7 @@ original
|
|
552
552
|
|
553
553
|
describe 'does support debugging' do
|
554
554
|
before :each do
|
555
|
+
allow(Facter).to receive(:respond_to?).with(:on_message).and_return(true)
|
555
556
|
allow(Facter).to receive(:respond_to?).with(:debugging, any_args).and_return(true)
|
556
557
|
end
|
557
558
|
|
@@ -568,6 +569,7 @@ original
|
|
568
569
|
|
569
570
|
describe 'does support trace' do
|
570
571
|
before :each do
|
572
|
+
allow(Facter).to receive(:respond_to?).with(:on_message)
|
571
573
|
allow(Facter).to receive(:respond_to?).with(:trace, any_args).and_return(true)
|
572
574
|
end
|
573
575
|
|
data/tasks/parallel.rake
CHANGED
@@ -5,9 +5,9 @@ require 'thread'
|
|
5
5
|
begin
|
6
6
|
require 'rspec'
|
7
7
|
require 'rspec/core/formatters/helpers'
|
8
|
-
require '
|
8
|
+
require 'etc'
|
9
9
|
rescue LoadError
|
10
|
-
# Don't define the task if we don't have rspec
|
10
|
+
# Don't define the task if we don't have rspec present
|
11
11
|
else
|
12
12
|
module Parallel
|
13
13
|
module RSpec
|
@@ -401,7 +401,7 @@ else
|
|
401
401
|
# Default group size in rspec examples
|
402
402
|
DEFAULT_GROUP_SIZE = 1000
|
403
403
|
|
404
|
-
process_count = [(args[:process_count] ||
|
404
|
+
process_count = [(args[:process_count] || Etc.nprocessors).to_i, 1].max
|
405
405
|
group_size = [(args[:group_size] || DEFAULT_GROUP_SIZE).to_i, 1].max
|
406
406
|
|
407
407
|
abort unless Parallel::RSpec::Parallelizer.new(process_count, group_size, color_output?, args.extras).run
|
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: 7.
|
4
|
+
version: 7.11.0
|
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: 2021-
|
11
|
+
date: 2021-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: facter
|
@@ -351,6 +351,7 @@ files:
|
|
351
351
|
- lib/puppet/face/plugin.rb
|
352
352
|
- lib/puppet/face/report.rb
|
353
353
|
- lib/puppet/face/resource.rb
|
354
|
+
- lib/puppet/facter_impl.rb
|
354
355
|
- lib/puppet/feature/base.rb
|
355
356
|
- lib/puppet/feature/bolt.rb
|
356
357
|
- lib/puppet/feature/cfpropertylist.rb
|
@@ -1904,6 +1905,7 @@ files:
|
|
1904
1905
|
- spec/unit/face/parser_spec.rb
|
1905
1906
|
- spec/unit/face/plugin_spec.rb
|
1906
1907
|
- spec/unit/face_spec.rb
|
1908
|
+
- spec/unit/facter_impl_spec.rb
|
1907
1909
|
- spec/unit/file_bucket/dipper_spec.rb
|
1908
1910
|
- spec/unit/file_bucket/file_spec.rb
|
1909
1911
|
- spec/unit/file_serving/base_spec.rb
|
@@ -3160,6 +3162,7 @@ test_files:
|
|
3160
3162
|
- spec/unit/face/parser_spec.rb
|
3161
3163
|
- spec/unit/face/plugin_spec.rb
|
3162
3164
|
- spec/unit/face_spec.rb
|
3165
|
+
- spec/unit/facter_impl_spec.rb
|
3163
3166
|
- spec/unit/file_bucket/dipper_spec.rb
|
3164
3167
|
- spec/unit/file_bucket/file_spec.rb
|
3165
3168
|
- spec/unit/file_serving/base_spec.rb
|