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 +4 -4
- data/chef-config.gemspec +1 -1
- data/lib/chef-config/config.rb +12 -4
- data/lib/chef-config/version.rb +1 -1
- data/lib/chef-config/workstation_config_loader.rb +1 -0
- data/spec/unit/config_spec.rb +9 -0
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27aab681164d3a6645b624ea332ae7423316b5355399b7138848cbe67d9544d0
|
4
|
+
data.tar.gz: 3499a3691092cca906ef6e27d2579864a9e12260ef886fc931a869db5f2686c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
15
|
+
spec.required_ruby_version = ">= 2.6"
|
16
16
|
|
17
17
|
spec.metadata = {
|
18
18
|
"bug_tracker_uri" => "https://github.com/chef/chef/issues",
|
data/lib/chef-config/config.rb
CHANGED
@@ -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
|
-
|
88
|
-
|
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,
|
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
|
data/lib/chef-config/version.rb
CHANGED
data/spec/unit/config_spec.rb
CHANGED
@@ -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:
|
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:
|
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:
|
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:
|
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.
|
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.
|
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: []
|