chef-config 17.10.95 → 18.0.169

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d313474c8e2afe4cb5a96f7c28b127b31577bef9833aaabb132b17ac774f9e32
4
- data.tar.gz: 3132ba5024b784a783e27c3b36507daee392b2180908ef7108223d47a21dfc70
3
+ metadata.gz: 27aab681164d3a6645b624ea332ae7423316b5355399b7138848cbe67d9544d0
4
+ data.tar.gz: 3499a3691092cca906ef6e27d2579864a9e12260ef886fc931a869db5f2686c8
5
5
  SHA512:
6
- metadata.gz: 97bc3fbc1220d16be5fcc21514307cc9068b443fb8e84ba0fb11ff573e1d3ec48a6163c9fef1bff52d643861bd1b23521fd9c19ddb456c04e8657d0eb7b70a90
7
- data.tar.gz: 4722d8b98e9580c0ab562fcb2a65695605f07eacf8e553d9b968045f5f578c83eb9c0e4a4f5209536acaf06a179daf9685ecb45fff4dd32e1faa2130a5140f32
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.95".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.95
4
+ version: 18.0.169
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-25 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.95
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.95
26
+ version: 18.0.169
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mixlib-shellout
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -106,7 +106,7 @@ dependencies:
106
106
  - - "~>"
107
107
  - !ruby/object:Gem::Version
108
108
  version: '1.2'
109
- description:
109
+ description:
110
110
  email:
111
111
  - adam@chef.io
112
112
  executables: []
@@ -143,7 +143,7 @@ metadata:
143
143
  documentation_uri: https://github.com/chef/chef/tree/main/chef-config/README.md
144
144
  homepage_uri: https://github.com/chef/chef/tree/main/chef-config
145
145
  source_code_uri: https://github.com/chef/chef/tree/main/chef-config
146
- post_install_message:
146
+ post_install_message:
147
147
  rdoc_options: []
148
148
  require_paths:
149
149
  - lib
@@ -151,15 +151,15 @@ 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
  - - ">="
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  requirements: []
161
- rubygems_version: 3.3.7
162
- signing_key:
161
+ rubygems_version: 3.2.32
162
+ signing_key:
163
163
  specification_version: 4
164
164
  summary: Chef Infra's default configuration and config loading library
165
165
  test_files: []