chef-config 16.1.16 → 16.3.45
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 -2
- data/lib/chef-config/config.rb +27 -15
- data/lib/chef-config/dist.rb +3 -0
- data/lib/chef-config/path_helper.rb +8 -11
- data/lib/chef-config/version.rb +2 -2
- data/spec/unit/path_helper_spec.rb +2 -2
- 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: 1ade66dc16ffdf5ee8f8c5014fcf5d938aae6e556f7141b3e95e9c36514075b0
|
4
|
+
data.tar.gz: '03098cd93b7521fb516aa6f85e595b6ca188061e35212c2bfcabc9d4fa331a4f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6208efdfa2e4880a2a28dd2c67ebfd5275699f875742277f3780de21377074dd75650b206b2a23ba2bcc1ccb317a93281913186de013e2919e0c2888d415f2cf
|
7
|
+
data.tar.gz: 4f7d873f1940b88371832148c724a9c7e6e8688390e70169990915e6291364557d143089975fffade3502a8d8c0bf33690bdf8c1fa5423cc9023495e910c559a
|
data/chef-config.gemspec
CHANGED
data/lib/chef-config/config.rb
CHANGED
@@ -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
|
-
#
|
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
|
|
@@ -450,7 +453,7 @@ module ChefConfig
|
|
450
453
|
default :repo_mode do
|
451
454
|
if local_mode && !chef_zero.osc_compat
|
452
455
|
"hosted_everything"
|
453
|
-
elsif
|
456
|
+
elsif %r{/+organizations/.+}.match?(chef_server_url)
|
454
457
|
"hosted_everything"
|
455
458
|
else
|
456
459
|
"everything"
|
@@ -506,7 +509,7 @@ module ChefConfig
|
|
506
509
|
default(:chef_server_root) do
|
507
510
|
# if the chef_server_url is a path to an organization, aka
|
508
511
|
# 'some_url.../organizations/*' then remove the '/organization/*' by default
|
509
|
-
if
|
512
|
+
if %r{/organizations/\S*$}.match?(configuration[:chef_server_url])
|
510
513
|
configuration[:chef_server_url].split("/")[0..-3].join("/")
|
511
514
|
elsif configuration[:chef_server_url] # default to whatever chef_server_url is
|
512
515
|
configuration[:chef_server_url]
|
@@ -959,23 +962,32 @@ module ChefConfig
|
|
959
962
|
#
|
960
963
|
default :no_lazy_load, true
|
961
964
|
|
962
|
-
# A
|
963
|
-
# data is saved. The default setting is nil, which collects all data.
|
964
|
-
# to [] will not collect
|
965
|
-
|
966
|
-
default :
|
967
|
-
default :
|
968
|
-
default :
|
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
|
-
#
|
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.
|
974
|
-
# still collect all data
|
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
|
@@ -1118,7 +1130,7 @@ module ChefConfig
|
|
1118
1130
|
# proxy before parsing. The regex /^.*:\/\// matches, for example, http://. Reusing proxy
|
1119
1131
|
# here since we are really just trying to get the string built correctly.
|
1120
1132
|
proxy = unless proxy_env_var.empty?
|
1121
|
-
if
|
1133
|
+
if %r{^.*://}.match?(proxy_env_var)
|
1122
1134
|
URI.parse(proxy_env_var)
|
1123
1135
|
else
|
1124
1136
|
URI.parse("#{scheme}://#{proxy_env_var}")
|
data/lib/chef-config/dist.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
65
|
-
|
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(
|
69
|
-
component = component.sub(
|
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
|
@@ -91,7 +88,7 @@ module ChefConfig
|
|
91
88
|
def self.windows_max_length_exceeded?(path)
|
92
89
|
# Check to see if paths without the \\?\ prefix are over the maximum allowed length for the Windows API
|
93
90
|
# http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx
|
94
|
-
unless path
|
91
|
+
unless /^\\\\?\\/.match?(path)
|
95
92
|
if path.length > WIN_MAX_PATH
|
96
93
|
return true
|
97
94
|
end
|
@@ -103,7 +100,7 @@ module ChefConfig
|
|
103
100
|
def self.printable?(string)
|
104
101
|
# returns true if string is free of non-printable characters (escape sequences)
|
105
102
|
# this returns false for whitespace escape sequences as well, e.g. \n\t
|
106
|
-
if
|
103
|
+
if /[^[:print:]]/.match?(string)
|
107
104
|
false
|
108
105
|
else
|
109
106
|
true
|
data/lib/chef-config/version.rb
CHANGED
@@ -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.
|
4
|
+
version: 16.3.45
|
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-
|
11
|
+
date: 2020-07-29 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.
|
19
|
+
version: 16.3.45
|
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.
|
26
|
+
version: 16.3.45
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mixlib-shellout
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|