puppet 8.2.0-universal-darwin → 8.3.0-universal-darwin

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/Gemfile.lock +16 -16
  4. data/ext/project_data.yaml +2 -2
  5. data/lib/puppet/application/doc.rb +1 -1
  6. data/lib/puppet/application/ssl.rb +42 -7
  7. data/lib/puppet/application.rb +5 -1
  8. data/lib/puppet/defaults.rb +5 -5
  9. data/lib/puppet/face/config.rb +1 -1
  10. data/lib/puppet/face/epp.rb +2 -2
  11. data/lib/puppet/face/module/list.rb +2 -2
  12. data/lib/puppet/face/parser.rb +1 -1
  13. data/lib/puppet/functions/split.rb +28 -1
  14. data/lib/puppet/indirector/facts/facter.rb +1 -1
  15. data/lib/puppet/indirector/file_bucket_file/file.rb +1 -1
  16. data/lib/puppet/indirector/indirection.rb +1 -1
  17. data/lib/puppet/info_service/task_information_service.rb +1 -1
  18. data/lib/puppet/module_tool.rb +1 -1
  19. data/lib/puppet/network/formats.rb +3 -3
  20. data/lib/puppet/network/http/memory_response.rb +1 -1
  21. data/lib/puppet/parameter/value_collection.rb +1 -1
  22. data/lib/puppet/parser/files.rb +4 -3
  23. data/lib/puppet/parser/functions.rb +1 -1
  24. data/lib/puppet/pops/loader/loader_paths.rb +4 -4
  25. data/lib/puppet/pops/lookup/explainer.rb +1 -1
  26. data/lib/puppet/pops/lookup/hiera_config.rb +1 -1
  27. data/lib/puppet/pops/model/factory.rb +1 -1
  28. data/lib/puppet/pops/model/tree_dumper.rb +1 -1
  29. data/lib/puppet/pops/parser/epp_support.rb +1 -1
  30. data/lib/puppet/pops/parser/evaluating_parser.rb +1 -1
  31. data/lib/puppet/pops/parser/pn_parser.rb +1 -1
  32. data/lib/puppet/pops/pn.rb +1 -1
  33. data/lib/puppet/pops/serialization/json_path.rb +1 -1
  34. data/lib/puppet/pops/time/timespan.rb +4 -4
  35. data/lib/puppet/pops/types/ruby_generator.rb +2 -2
  36. data/lib/puppet/pops/types/string_converter.rb +6 -6
  37. data/lib/puppet/pops/types/type_formatter.rb +2 -2
  38. data/lib/puppet/pops/types/types.rb +1 -1
  39. data/lib/puppet/provider/nameservice/directoryservice.rb +2 -2
  40. data/lib/puppet/provider/package/apt.rb +1 -1
  41. data/lib/puppet/provider/package/dnf.rb +1 -1
  42. data/lib/puppet/provider/package/yum.rb +1 -1
  43. data/lib/puppet/provider/user/directoryservice.rb +1 -1
  44. data/lib/puppet/reference/configuration.rb +1 -1
  45. data/lib/puppet/reference/indirection.rb +1 -1
  46. data/lib/puppet/reports.rb +1 -1
  47. data/lib/puppet/transaction/report.rb +1 -1
  48. data/lib/puppet/type/filebucket.rb +1 -1
  49. data/lib/puppet/util/diff.rb +1 -1
  50. data/lib/puppet/util/execution.rb +9 -4
  51. data/lib/puppet/util/inifile.rb +2 -2
  52. data/lib/puppet/util/monkey_patches.rb +18 -0
  53. data/lib/puppet/util/package/version/rpm.rb +1 -1
  54. data/lib/puppet/util/provider_features.rb +1 -1
  55. data/lib/puppet/util/selinux.rb +1 -1
  56. data/lib/puppet/util/windows/access_control_entry.rb +1 -1
  57. data/lib/puppet/util/windows/access_control_list.rb +1 -1
  58. data/lib/puppet/util/windows/adsi.rb +9 -2
  59. data/lib/puppet/util/windows/error.rb +1 -1
  60. data/lib/puppet/util/windows/file.rb +2 -2
  61. data/lib/puppet/util/windows/process.rb +1 -1
  62. data/lib/puppet/util/windows/sid.rb +4 -2
  63. data/lib/puppet/util.rb +2 -3
  64. data/lib/puppet/version.rb +1 -1
  65. data/lib/puppet/x509/cert_provider.rb +6 -2
  66. data/locales/puppet.pot +40 -32
  67. data/man/man5/puppet.conf.5 +3 -3
  68. data/man/man8/puppet-agent.8 +1 -1
  69. data/man/man8/puppet-apply.8 +1 -1
  70. data/man/man8/puppet-catalog.8 +1 -1
  71. data/man/man8/puppet-config.8 +1 -1
  72. data/man/man8/puppet-describe.8 +1 -1
  73. data/man/man8/puppet-device.8 +1 -1
  74. data/man/man8/puppet-doc.8 +1 -1
  75. data/man/man8/puppet-epp.8 +1 -1
  76. data/man/man8/puppet-facts.8 +1 -1
  77. data/man/man8/puppet-filebucket.8 +1 -1
  78. data/man/man8/puppet-generate.8 +1 -1
  79. data/man/man8/puppet-help.8 +1 -1
  80. data/man/man8/puppet-lookup.8 +1 -1
  81. data/man/man8/puppet-module.8 +1 -1
  82. data/man/man8/puppet-node.8 +1 -1
  83. data/man/man8/puppet-parser.8 +1 -1
  84. data/man/man8/puppet-plugin.8 +1 -1
  85. data/man/man8/puppet-report.8 +1 -1
  86. data/man/man8/puppet-resource.8 +1 -1
  87. data/man/man8/puppet-script.8 +1 -1
  88. data/man/man8/puppet-ssl.8 +5 -1
  89. data/man/man8/puppet.8 +2 -2
  90. data/spec/integration/type/exec_spec.rb +13 -0
  91. data/spec/lib/puppet_spec/verbose.rb +10 -1
  92. data/spec/unit/agent_spec.rb +2 -9
  93. data/spec/unit/application/ssl_spec.rb +49 -0
  94. data/spec/unit/functions/split_spec.rb +6 -0
  95. data/spec/unit/info_service_spec.rb +1 -1
  96. data/spec/unit/ssl/certificate_signer_spec.rb +17 -0
  97. data/spec/unit/ssl/ssl_provider_spec.rb +1 -1
  98. data/spec/unit/util/execution_spec.rb +1 -0
  99. data/spec/unit/util/monkey_patches_spec.rb +42 -0
  100. data/spec/unit/util/windows/adsi_spec.rb +25 -0
  101. metadata +5 -3
@@ -2,6 +2,48 @@ require 'spec_helper'
2
2
 
3
3
  require 'puppet/util/monkey_patches'
4
4
 
5
+ describe Dir do
6
+ describe '.exists?' do
7
+ it 'returns false if the directory does not exist' do
8
+ expect(Dir.exists?('/madeupdirectory')).to be false
9
+ end
10
+
11
+ it 'returns true if the directory exists' do
12
+ expect(Dir.exists?(__dir__)).to be true
13
+ end
14
+
15
+ if RUBY_VERSION >= '3.2'
16
+ it 'logs a warning message' do
17
+ expect(Dir).to receive(:warn).with("Dir.exists?('#{__dir__}') is deprecated, use Dir.exist? instead")
18
+ with_verbose_enabled do
19
+ Dir.exists?(__dir__)
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+
26
+ describe File do
27
+ describe '.exists?' do
28
+ it 'returns false if the directory does not exist' do
29
+ expect(File.exists?('spec/unit/util/made_up_file')).to be false
30
+ end
31
+
32
+ it 'returns true if the file exists' do
33
+ expect(File.exists?(__FILE__)).to be true
34
+ end
35
+
36
+ if RUBY_VERSION >= '3.2'
37
+ it 'logs a warning message' do
38
+ expect(File).to receive(:warn).with("File.exists?('#{__FILE__}') is deprecated, use File.exist? instead")
39
+ with_verbose_enabled do
40
+ File.exists?(__FILE__)
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+
5
47
  describe Symbol do
6
48
  after :all do
7
49
  $unique_warnings.delete('symbol_comparison') if $unique_warnings
@@ -95,6 +95,31 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet::Util::Platform.windows? do
95
95
  end
96
96
  end
97
97
 
98
+ describe '.get_sids' do
99
+ it 'returns an array of SIDs given two an array of ADSI children' do
100
+ child1 = double('child1', name: 'Administrator', sid: 'S-1-5-21-3882680660-671291151-3888264257-500')
101
+ child2 = double('child2', name: 'Guest', sid: 'S-1-5-21-3882680660-671291151-3888264257-501')
102
+ allow(Puppet::Util::Windows::SID).to receive(:ads_to_principal).with(child1).and_return('Administrator')
103
+ allow(Puppet::Util::Windows::SID).to receive(:ads_to_principal).with(child2).and_return('Guest')
104
+ sids = Puppet::Util::Windows::ADSI::ADSIObject.get_sids([child1, child2])
105
+ expect(sids).to eq(['Administrator', 'Guest'])
106
+ end
107
+
108
+ it 'returns an array of SIDs given an ADSI child and ads_to_principal returning domain failure' do
109
+ child = double('child1', name: 'Administrator', sid: 'S-1-5-21-3882680660-671291151-3888264257-500')
110
+ allow(Puppet::Util::Windows::SID).to receive(:ads_to_principal).with(child).and_raise(Puppet::Util::Windows::Error.new('', Puppet::Util::Windows::SID::ERROR_TRUSTED_DOMAIN_FAILURE))
111
+ sids = Puppet::Util::Windows::ADSI::ADSIObject.get_sids([child])
112
+ expect(sids[0]).to eq(Puppet::Util::Windows::SID::Principal.new(child.name, child.sid, child.name, nil, :SidTypeUnknown))
113
+ end
114
+
115
+ it 'returns an array of SIDs given an ADSI child and ads_to_principal returning relationship failure' do
116
+ child = double('child1', name: 'Administrator', sid: 'S-1-5-21-3882680660-671291151-3888264257-500')
117
+ allow(Puppet::Util::Windows::SID).to receive(:ads_to_principal).with(child).and_raise(Puppet::Util::Windows::Error.new('', Puppet::Util::Windows::SID::ERROR_TRUSTED_RELATIONSHIP_FAILURE))
118
+ sids = Puppet::Util::Windows::ADSI::ADSIObject.get_sids([child])
119
+ expect(sids[0]).to eq(Puppet::Util::Windows::SID::Principal.new(child.name, child.sid, child.name, nil, :SidTypeUnknown))
120
+ end
121
+ end
122
+
98
123
  describe Puppet::Util::Windows::ADSI::User do
99
124
  let(:username) { 'testuser' }
100
125
  let(:domain) { 'DOMAIN' }
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: 8.2.0
4
+ version: 8.3.0
5
5
  platform: universal-darwin
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-22 00:00:00.000000000 Z
11
+ date: 2023-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facter
@@ -2370,6 +2370,7 @@ files:
2370
2370
  - spec/unit/ssl/base_spec.rb
2371
2371
  - spec/unit/ssl/certificate_request_attributes_spec.rb
2372
2372
  - spec/unit/ssl/certificate_request_spec.rb
2373
+ - spec/unit/ssl/certificate_signer_spec.rb
2373
2374
  - spec/unit/ssl/certificate_spec.rb
2374
2375
  - spec/unit/ssl/digest_spec.rb
2375
2376
  - spec/unit/ssl/oids_spec.rb
@@ -2532,7 +2533,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2532
2533
  - !ruby/object:Gem::Version
2533
2534
  version: 1.3.1
2534
2535
  requirements: []
2535
- rubygems_version: 3.4.12
2536
+ rubygems_version: 3.4.20
2536
2537
  signing_key:
2537
2538
  specification_version: 4
2538
2539
  summary: Puppet, an automated configuration management tool
@@ -3634,6 +3635,7 @@ test_files:
3634
3635
  - spec/unit/ssl/base_spec.rb
3635
3636
  - spec/unit/ssl/certificate_request_attributes_spec.rb
3636
3637
  - spec/unit/ssl/certificate_request_spec.rb
3638
+ - spec/unit/ssl/certificate_signer_spec.rb
3637
3639
  - spec/unit/ssl/certificate_spec.rb
3638
3640
  - spec/unit/ssl/digest_spec.rb
3639
3641
  - spec/unit/ssl/oids_spec.rb