chef-config 16.5.64 → 16.5.77
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef-config/config.rb +8 -6
- data/lib/chef-config/mixin/train_transport.rb +1 -1
- data/lib/chef-config/version.rb +1 -1
- data/lib/chef-config/workstation_config_loader.rb +1 -1
- data/spec/unit/config_spec.rb +2 -2
- data/spec/unit/fips_spec.rb +1 -1
- data/spec/unit/workstation_config_loader_spec.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be09ac190045e0d04778b9d2121594585ab1e56bb6581ff0dfe5ff1591764141
|
4
|
+
data.tar.gz: 77fad1d3fb02f4de4e8442bfa0feea9c5afc659e289541e1984cc244f4cf6794
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e507e5b152b916aa72aac2ce937daab4af31c356cbb9f83a7eaf71f9a1a3df9ba7f473990617983b5277a8351729432d41121094d4b0da524933230c92d80f24
|
7
|
+
data.tar.gz: ec00b7ea3951fa346a0d97123e06edb3b724322558085bd263817412c0fa3f3556a97c593529c23964dc48843316392768a7e9c58554e3394e7913eb517e0ac2
|
data/lib/chef-config/config.rb
CHANGED
@@ -33,7 +33,9 @@ module Mixlib
|
|
33
33
|
autoload :ShellOut, "mixlib/shellout"
|
34
34
|
end
|
35
35
|
autoload :URI, "uri"
|
36
|
-
|
36
|
+
module Addressable
|
37
|
+
autoload :URI, "addressable/uri"
|
38
|
+
end
|
37
39
|
autoload :OpenSSL, "openssl"
|
38
40
|
autoload :YAML, "yaml"
|
39
41
|
require "chef-utils/dist" unless defined?(ChefUtils::Dist)
|
@@ -647,7 +649,7 @@ module ChefConfig
|
|
647
649
|
# credentials toml files which doesn't allow ruby symbol values
|
648
650
|
configurable(:ssl_verify_mode).writes_value do |value|
|
649
651
|
if value.is_a?(String) && value[0] == ":"
|
650
|
-
value[1
|
652
|
+
value[1..].to_sym
|
651
653
|
else
|
652
654
|
value.to_sym
|
653
655
|
end
|
@@ -1205,7 +1207,7 @@ module ChefConfig
|
|
1205
1207
|
# Transform into the form en_ZZ.UTF-8
|
1206
1208
|
guessed_locale.gsub(/UTF-?8$/i, "UTF-8")
|
1207
1209
|
else
|
1208
|
-
ChefConfig.logger.warn "Please install an English UTF-8 locale for
|
1210
|
+
ChefConfig.logger.warn "Please install an English UTF-8 locale for #{ChefUtils::Dist::Infra::PRODUCT} to use, falling back to C locale and disabling UTF-8 support."
|
1209
1211
|
"C"
|
1210
1212
|
end
|
1211
1213
|
end
|
@@ -1258,9 +1260,9 @@ module ChefConfig
|
|
1258
1260
|
# @api private
|
1259
1261
|
def self.enable_fips_mode
|
1260
1262
|
OpenSSL.fips_mode = true
|
1261
|
-
require "digest"
|
1262
|
-
require "digest/sha1"
|
1263
|
-
require "digest/md5"
|
1263
|
+
require "digest" unless defined?(Digest)
|
1264
|
+
require "digest/sha1" unless defined?(Digest::SHA1)
|
1265
|
+
require "digest/md5" unless defined?(Digest::MD5)
|
1264
1266
|
# Remove pre-existing constants if they do exist to reduce the
|
1265
1267
|
# amount of log spam and warnings.
|
1266
1268
|
Digest.send(:remove_const, "SHA1") if Digest.const_defined?("SHA1")
|
@@ -44,7 +44,7 @@ module ChefConfig
|
|
44
44
|
|
45
45
|
# host names must be specified in credentials file as ['foo.example.org'] with quotes
|
46
46
|
if !credentials.nil? && !credentials[profile].nil?
|
47
|
-
credentials[profile].
|
47
|
+
credentials[profile].transform_keys(&:to_sym) # return symbolized keys to match Train.options()
|
48
48
|
else
|
49
49
|
nil
|
50
50
|
end
|
data/lib/chef-config/version.rb
CHANGED
@@ -166,7 +166,7 @@ module ChefConfig
|
|
166
166
|
when "client_key"
|
167
167
|
extract_key(value, :client_key, :client_key_contents)
|
168
168
|
when "knife"
|
169
|
-
Config.knife.merge!(
|
169
|
+
Config.knife.merge!(value.transform_keys(&:to_sym))
|
170
170
|
else
|
171
171
|
Config[key.to_sym] = value
|
172
172
|
end
|
data/spec/unit/config_spec.rb
CHANGED
@@ -931,7 +931,7 @@ RSpec.describe ChefConfig::Config do
|
|
931
931
|
|
932
932
|
shared_examples_for "a suitable locale" do
|
933
933
|
it "returns an English UTF-8 locale" do
|
934
|
-
expect(ChefConfig.logger).to_not receive(:warn).with(/Please install an English UTF-8 locale for Chef to use/)
|
934
|
+
expect(ChefConfig.logger).to_not receive(:warn).with(/Please install an English UTF-8 locale for Chef Infra Client to use/)
|
935
935
|
expect(ChefConfig.logger).to_not receive(:trace).with(/Defaulting to locale en_US.UTF-8 on Windows/)
|
936
936
|
expect(ChefConfig.logger).to_not receive(:trace).with(/No usable locale -a command found/)
|
937
937
|
expect(ChefConfig::Config.guess_internal_locale).to eq expected_locale
|
@@ -984,7 +984,7 @@ RSpec.describe ChefConfig::Config do
|
|
984
984
|
let(:locale_array) { ["af_ZA", "af_ZA.ISO8859-1", "af_ZA.ISO8859-15", "af_ZA.UTF-8"] }
|
985
985
|
|
986
986
|
it "should fall back to C locale" do
|
987
|
-
expect(ChefConfig.logger).to receive(:warn).with("Please install an English UTF-8 locale for Chef to use, falling back to C locale and disabling UTF-8 support.")
|
987
|
+
expect(ChefConfig.logger).to receive(:warn).with("Please install an English UTF-8 locale for Chef Infra Client to use, falling back to C locale and disabling UTF-8 support.")
|
988
988
|
expect(ChefConfig::Config.guess_internal_locale).to eq "C"
|
989
989
|
end
|
990
990
|
end
|
data/spec/unit/fips_spec.rb
CHANGED
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: 16.5.
|
4
|
+
version: 16.5.77
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-28 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: 16.5.
|
19
|
+
version: 16.5.77
|
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: 16.5.
|
26
|
+
version: 16.5.77
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mixlib-shellout
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|