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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98200061cdf7f6987f89d2810c4f4cf06e73e946703207b1e03270bed58c2a72
4
- data.tar.gz: 4c97416eaa59a81959b65596d40efe4f24e10e6e8dc1e5f9f26d5467c0f13385
3
+ metadata.gz: be09ac190045e0d04778b9d2121594585ab1e56bb6581ff0dfe5ff1591764141
4
+ data.tar.gz: 77fad1d3fb02f4de4e8442bfa0feea9c5afc659e289541e1984cc244f4cf6794
5
5
  SHA512:
6
- metadata.gz: 7a3923de2e675cd239dde70ac73595d043da585f5350f083c093fbefe6bd86a5fdd29165e7229fc2ba082018ac645420eb6991db993ea626735cd882ff0ac047
7
- data.tar.gz: b0270e4feee69bde6219ec09e07529a40e0b1849ba42ea1066638b74754c7e45c6fdb6d73ec2fb0c78c727f77c131a86d4a0399d5f4fe1b46243a8765e1e6def
6
+ metadata.gz: e507e5b152b916aa72aac2ce937daab4af31c356cbb9f83a7eaf71f9a1a3df9ba7f473990617983b5277a8351729432d41121094d4b0da524933230c92d80f24
7
+ data.tar.gz: ec00b7ea3951fa346a0d97123e06edb3b724322558085bd263817412c0fa3f3556a97c593529c23964dc48843316392768a7e9c58554e3394e7913eb517e0ac2
@@ -33,7 +33,9 @@ module Mixlib
33
33
  autoload :ShellOut, "mixlib/shellout"
34
34
  end
35
35
  autoload :URI, "uri"
36
- autoload :Addressable, "addressable/uri"
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..-1].to_sym
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 Chef to use, falling back to C locale and disabling UTF-8 support."
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].map { |k, v| [k.to_sym, v] }.to_h # return symbolized keys to match Train.options()
47
+ credentials[profile].transform_keys(&:to_sym) # return symbolized keys to match Train.options()
48
48
  else
49
49
  nil
50
50
  end
@@ -15,5 +15,5 @@
15
15
 
16
16
  module ChefConfig
17
17
  CHEFCONFIG_ROOT = File.expand_path("..", __dir__)
18
- VERSION = "16.5.64".freeze
18
+ VERSION = "16.5.77".freeze
19
19
  end
@@ -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!(Hash[value.map { |k, v| [k.to_sym, v] }])
169
+ Config.knife.merge!(value.transform_keys(&:to_sym))
170
170
  else
171
171
  Config[key.to_sym] = value
172
172
  end
@@ -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
@@ -20,7 +20,7 @@ require "chef-config/fips"
20
20
  require "spec_helper"
21
21
 
22
22
  begin
23
- require "win32/registry"
23
+ require "win32/registry" unless defined?(Win32::Registry)
24
24
  rescue LoadError
25
25
  # not on unix
26
26
  end
@@ -17,7 +17,7 @@
17
17
  #
18
18
 
19
19
  require "spec_helper"
20
- require "tempfile"
20
+ require "tempfile" unless defined?(Tempfile)
21
21
 
22
22
  require "chef-config/exceptions"
23
23
  require "chef-utils"
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.64
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-17 00:00:00.000000000 Z
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.64
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.64
26
+ version: 16.5.77
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mixlib-shellout
29
29
  requirement: !ruby/object:Gem::Requirement