chef-config 16.2.73 → 16.3.38

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: 34623e012cced934ded201d9f807e6849d4143680bb6fdcae6bcb1c2e94455f4
4
- data.tar.gz: a8bc46c08bb15aaa9b924df7385c2e4d84b0adababb0d4ad72641f7d8ab025c1
3
+ metadata.gz: 3482b9ead58c2925bbfd764052e0fd08cccc21b1b5779df6165822285e54e776
4
+ data.tar.gz: 22742eaed3c541ba8252694d3c829e66943b13a3f544a1afd48759317cca0786
5
5
  SHA512:
6
- metadata.gz: 921156386ae8b49a43e875579b3eaabf5b1133987c443eb1859db10ec9a4df73644587159a8508b28a26c14d003d18f5f226951dc76c368bebc0b5a4543139b1
7
- data.tar.gz: 49b91ea9d7758068bff1708387a0160995b4fbb1113ed26363bec8441850e9d6164e483cf6dc9953519400f25dd054030dc57d1e7899dcba4a133b977367c391
6
+ metadata.gz: e605107108e2f6b6c738b4a94c0131b650b8ef9f774ef707eb25b3734d5a143ba2d8d610e34535e4a733055ddacce43d8664bea295485e82149e81a748d8d18c
7
+ data.tar.gz: ba863e9355cbe3336ee2d06cb588f7a8b0ecd40127ea486d998f4c836ada7ed315762bf72703e8659ea037b3a431278a3509c9150ea8c01c67c107d618c7f3ef
@@ -1,5 +1,4 @@
1
- # coding: utf-8
2
- lib = File.expand_path("../lib", __FILE__)
1
+ lib = File.expand_path("lib", __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require "chef-config/version"
5
4
 
@@ -313,9 +313,12 @@ module ChefConfig
313
313
  # Defaults to <chef_repo_path>/users.
314
314
  default(:user_path) { derive_path_from_chef_repo_path("users") }.writes_value { |path| expand_relative_paths(path) }
315
315
 
316
- # Turn on "path sanity" by default.
316
+ # DEPRECATED
317
317
  default :enforce_path_sanity, false
318
318
 
319
+ # Enforce default paths by default for all APIs, not just the default internal shell_out
320
+ default :enforce_default_paths, false
321
+
319
322
  # Formatted Chef Client output is a beta feature, disabled by default:
320
323
  default :formatter, "null"
321
324
 
@@ -959,23 +962,32 @@ module ChefConfig
959
962
  #
960
963
  default :no_lazy_load, true
961
964
 
962
- # A whitelisted array of attributes you want sent over the wire when node
963
- # data is saved. The default setting is nil, which collects all data. Setting
964
- # to [] will not collect any data for save.
965
- #
966
- default :automatic_attribute_whitelist, nil
967
- default :default_attribute_whitelist, nil
968
- default :normal_attribute_whitelist, nil
969
- default :override_attribute_whitelist, nil
965
+ # A array of attributes you want sent over the wire when node
966
+ # data is saved. The default setting is nil, which collects all data.
967
+ # NOTE: Setting to [] will not collect ANY data to save.
968
+ default :allowed_automatic_attributes, nil
969
+ default :allowed_default_attributes, nil
970
+ default :allowed_normal_attributes, nil
971
+ default :allowed_override_attributes, nil
970
972
 
971
- # A blacklisted array of attributes you do not want to send over the
973
+ # An array of attributes you do not want to send over the
972
974
  # wire when node data is saved
973
- # The default setting is nil, which collects all data. Setting to [] will
974
- # still collect all data for save
975
+ # The default setting is nil, which collects all data.
976
+ # NOTE: Setting to [] will still collect all data to save
977
+ default :blocked_automatic_attributes, nil
978
+ default :blocked_default_attributes, nil
979
+ default :blocked_normal_attributes, nil
980
+ default :blocked_override_attributes, nil
981
+
982
+ # deprecated config options that will be removed in Chef Infra Client 17
975
983
  default :automatic_attribute_blacklist, nil
976
984
  default :default_attribute_blacklist, nil
977
985
  default :normal_attribute_blacklist, nil
978
986
  default :override_attribute_blacklist, nil
987
+ default :automatic_attribute_whitelist, nil
988
+ default :default_attribute_whitelist, nil
989
+ default :normal_attribute_whitelist, nil
990
+ default :override_attribute_whitelist, nil
979
991
 
980
992
  # Pull down all the rubygems versions from rubygems and cache them the first time we do a gem_package or
981
993
  # chef_gem install. This is memory-expensive and will grow without bounds, but will reduce network
@@ -19,5 +19,8 @@ module ChefConfig
19
19
  # The legacy conf folder: C:/opscode/chef. Specifically the "opscode" part
20
20
  # DIR_SUFFIX is appended to it in code where relevant
21
21
  LEGACY_CONF_DIR = "opscode".freeze
22
+
23
+ # Enable forcing Chef EULA
24
+ ENFORCE_LICENSE = true
22
25
  end
23
26
  end
@@ -55,18 +55,15 @@ module ChefConfig
55
55
  end
56
56
  end
57
57
 
58
- def self.join(*args)
59
- path_separator_regex = Regexp.escape(File::SEPARATOR)
60
- unless path_separator == File::SEPARATOR
61
- path_separator_regex << Regexp.escape(path_separator)
62
- end
58
+ path_separator_regex = [Regexp.escape(File::SEPARATOR), Regexp.escape(path_separator)].uniq.join
63
59
 
64
- trailing_slashes = /[#{path_separator_regex}]+$/
65
- leading_slashes = /^[#{path_separator_regex}]+/
60
+ TRAILING_SLASHES_REGEX = /[#{path_separator_regex}]+$/.freeze
61
+ LEADING_SLASHES_REGEX = /^[#{path_separator_regex}]+/.freeze
66
62
 
63
+ def self.join(*args)
67
64
  args.flatten.inject do |joined_path, component|
68
- joined_path = joined_path.sub(trailing_slashes, "")
69
- component = component.sub(leading_slashes, "")
65
+ joined_path = joined_path.sub(TRAILING_SLASHES_REGEX, "")
66
+ component = component.sub(LEADING_SLASHES_REGEX, "")
70
67
  joined_path + "#{path_separator}#{component}"
71
68
  end
72
69
  end
@@ -14,6 +14,6 @@
14
14
  # limitations under the License.
15
15
 
16
16
  module ChefConfig
17
- CHEFCONFIG_ROOT = File.expand_path("../..", __FILE__)
18
- VERSION = "16.2.73".freeze
17
+ CHEFCONFIG_ROOT = File.expand_path("..", __dir__)
18
+ VERSION = "16.3.38".freeze
19
19
  end
@@ -55,7 +55,7 @@ RSpec.describe ChefConfig::PathHelper do
55
55
  end
56
56
  end
57
57
 
58
- context "on windows" do
58
+ context "on windows", :windows_only do
59
59
 
60
60
  before(:each) do
61
61
  allow(ChefUtils).to receive(:windows?).and_return(true)
@@ -103,7 +103,7 @@ RSpec.describe ChefConfig::PathHelper do
103
103
 
104
104
  end
105
105
 
106
- context "on unix" do
106
+ context "on unix", :unix_only do
107
107
 
108
108
  before(:each) do
109
109
  allow(ChefUtils).to receive(:windows?).and_return(false)
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.2.73
4
+ version: 16.3.38
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-07-01 00:00:00.000000000 Z
11
+ date: 2020-07-25 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.2.73
19
+ version: 16.3.38
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.2.73
26
+ version: 16.3.38
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mixlib-shellout
29
29
  requirement: !ruby/object:Gem::Requirement