chef-config 17.10.68 → 18.0.169

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 66557f3b39cf90517075c686f936727006a39a8e5f847f21c9d9a501d87a5740
4
- data.tar.gz: d4f88b3d497db20f38dcaea8762ee5bc1e57c49dbfadf2df325112b5d12cfab7
3
+ metadata.gz: 27aab681164d3a6645b624ea332ae7423316b5355399b7138848cbe67d9544d0
4
+ data.tar.gz: 3499a3691092cca906ef6e27d2579864a9e12260ef886fc931a869db5f2686c8
5
5
  SHA512:
6
- metadata.gz: 99f280daf85877627d735f5f3fbe3c5b9bc0c3fd22e489e6eb25998d0d4cc60cae99e3fde077cbeb14b6c444f55727ae7e0c64562bca677690a15c140f8f1afd
7
- data.tar.gz: e63f929a3e62a11390aaa30b9e6caf7c23cbaa2e30591d71fb3f23adfbcf89cd40e6ee683582abaf37d31ef57d36b33645a5a06a5a34ff6980bf8fb7b243e529
6
+ metadata.gz: c5fbf76ba6b0b1fa37a4fde60d40e31df6c183da7cf71af7406cd5d5b5f8a934ea2d4d85f3f3da849d2d3c44f3b9d2e81cf1a8ef49a0f4451c3cff022c235a82
7
+ data.tar.gz: 363bd8668a8177ae2fea55a72c8f538abb28753589e46b0773c4731e0e2f252e4a9dae6f35b8b6bb52840aa6ec16b1e56fd5987726ed433eac364adfd1f4f89d
data/chef-config.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.homepage = "https://github.com/chef/chef"
13
13
  spec.license = "Apache-2.0"
14
14
 
15
- spec.required_ruby_version = ">= 2.7"
15
+ spec.required_ruby_version = ">= 2.6"
16
16
 
17
17
  spec.metadata = {
18
18
  "bug_tracker_uri" => "https://github.com/chef/chef/issues",
@@ -84,8 +84,11 @@ module ChefConfig
84
84
  # @return [String] the platform-specific path
85
85
  #
86
86
  def self.etc_chef_dir(windows: ChefUtils.windows?)
87
- path = windows ? c_chef_dir : PathHelper.join("/etc", ChefUtils::Dist::Infra::DIR_SUFFIX, windows: windows)
88
- PathHelper.cleanpath(path, windows: windows)
87
+ @etc_chef_dir ||= {}
88
+ @etc_chef_dir[windows] ||= begin
89
+ path = windows ? c_chef_dir : PathHelper.join("/etc", ChefUtils::Dist::Infra::DIR_SUFFIX, windows: windows)
90
+ PathHelper.cleanpath(path, windows: windows)
91
+ end
89
92
  end
90
93
 
91
94
  # On *nix, /var/chef, on Windows C:\chef
@@ -171,7 +174,7 @@ module ChefConfig
171
174
 
172
175
  # Call to_sym because Chef::Config expects only symbol keys. Also
173
176
  # runs a simple parse on the string for some common types.
174
- memo[key.to_sym] = YAML.safe_load(value)
177
+ memo[key.to_sym] = YAML.safe_load(value, permitted_classes: [Date])
175
178
  memo
176
179
  end
177
180
  set_extra_config_options(extra_parsed_options)
@@ -770,6 +773,11 @@ module ChefConfig
770
773
  # We'll use this preferentially.
771
774
  default :client_key_contents, nil
772
775
 
776
+ # We want to get all certificates OFF disk and into secure storage. This flag
777
+ # removes the client.pem from disk and a replacement is put into Keychain or the Certstore
778
+ # Then the public key from the new cert is pushed to Chef Server for authentication
779
+ default :migrate_key_to_keystore, false
780
+
773
781
  # When registering the client, should we allow the client key location to
774
782
  # be a symlink? eg: /etc/chef/client.pem -> /etc/chef/prod-client.pem
775
783
  # If the path of the key goes through a directory like /tmp this should
@@ -986,7 +994,7 @@ module ChefConfig
986
994
  # applying in "compile" mode, with no "converge" mode. False is backwards compatible
987
995
  # setting for Chef 11-15 behavior. This will break forward notifications.
988
996
  #
989
- default :resource_unified_mode_default, false
997
+ default :resource_unified_mode_default, true
990
998
 
991
999
  # At the beginning of the Chef Client run, the cookbook manifests are downloaded which
992
1000
  # contain URLs for every file in every relevant cookbook. Most of the files
@@ -15,5 +15,5 @@
15
15
 
16
16
  module ChefConfig
17
17
  CHEFCONFIG_ROOT = File.expand_path("..", __dir__)
18
- VERSION = "17.10.68".freeze
18
+ VERSION = "18.0.169".freeze
19
19
  end
@@ -17,6 +17,7 @@
17
17
  #
18
18
 
19
19
  require "chef-utils" unless defined?(ChefUtils::CANARY)
20
+ require "etc" unless defined?(Etc)
20
21
  require_relative "config"
21
22
  require_relative "exceptions"
22
23
  require_relative "logger"
@@ -19,6 +19,7 @@
19
19
 
20
20
  require "spec_helper"
21
21
  require "chef-config/config"
22
+ require "date" unless defined?(Date)
22
23
 
23
24
  RSpec.describe ChefConfig::Config do
24
25
  before(:each) do
@@ -282,6 +283,14 @@ RSpec.describe ChefConfig::Config do
282
283
  expect(ChefConfig::Config.etc_chef_dir(windows: true)).to eql("C:\\#{dirname}")
283
284
  end
284
285
  end
286
+
287
+ context "when calling etc_chef_dir multiple times" do
288
+ it "should not recalculate path for every call" do
289
+ expect(ChefConfig::Config.etc_chef_dir(windows: false)).to eql("/etc/#{dirname}")
290
+ expect(ChefConfig::PathHelper).not_to receive(:cleanpath)
291
+ expect(ChefConfig::Config.etc_chef_dir(windows: false)).to eql("/etc/#{dirname}")
292
+ end
293
+ end
285
294
  end
286
295
 
287
296
  [ false, true ].each do |is_windows|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 17.10.68
4
+ version: 18.0.169
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-17 00:00:00.000000000 Z
11
+ date: 2022-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-utils
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 17.10.68
19
+ version: 18.0.169
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 17.10.68
26
+ version: 18.0.169
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mixlib-shellout
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -151,7 +151,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
151
151
  requirements:
152
152
  - - ">="
153
153
  - !ruby/object:Gem::Version
154
- version: '2.7'
154
+ version: '2.6'
155
155
  required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - ">="