chef-config 18.4.12 → 18.6.2
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 +10 -4
- data/lib/chef-config/path_helper.rb +6 -3
- data/lib/chef-config/version.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: 3700669248154287f8361161738a77aa86a1ad01939149e4fdc5cce1b73ee988
|
4
|
+
data.tar.gz: 7d8437c1d4fe057581cb8d4cfff0207b0595aea8e6ecf3185a21e0664a09609b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9711a60e4545925941fe8d6b65a2b8e7b0969bf8c95c11187099388a12f15025922cb06707de59dfc13ca9fcc8d622cbed53e249c88cb14e6b52453a23ac14a9
|
7
|
+
data.tar.gz: 021475fc4ba16f49b07331732b5c1be5ad632fa22621db3ed7655937d50aec117ce423e5ee6e384f2c969e58e7353cb79d5f8ba934f3ffaaa7ef7984d6878539
|
data/lib/chef-config/config.rb
CHANGED
@@ -97,8 +97,11 @@ module ChefConfig
|
|
97
97
|
# @return [String] the platform-specific path
|
98
98
|
#
|
99
99
|
def self.var_chef_dir(windows: ChefUtils.windows?)
|
100
|
-
|
101
|
-
|
100
|
+
@var_chef_dir ||= {}
|
101
|
+
@var_chef_dir[windows] ||= begin
|
102
|
+
path = windows ? c_chef_dir : PathHelper.join("/var", ChefUtils::Dist::Infra::DIR_SUFFIX, windows: windows)
|
103
|
+
PathHelper.cleanpath(path, windows: windows)
|
104
|
+
end
|
102
105
|
end
|
103
106
|
|
104
107
|
# On *nix, /var, on Windows C:\
|
@@ -107,8 +110,11 @@ module ChefConfig
|
|
107
110
|
# @return [String] the platform-specific path
|
108
111
|
#
|
109
112
|
def self.var_root_dir(windows: ChefUtils.windows?)
|
110
|
-
|
111
|
-
|
113
|
+
@var_root_dir ||= {}
|
114
|
+
@var_root_dir[windows] ||= begin
|
115
|
+
path = windows ? "C:\\" : "/var"
|
116
|
+
PathHelper.cleanpath(path, windows: windows)
|
117
|
+
end
|
112
118
|
end
|
113
119
|
|
114
120
|
# On windows, C:/chef/
|
@@ -59,11 +59,14 @@ module ChefConfig
|
|
59
59
|
path_separator_regex = Regexp.escape(windows ? "#{File::SEPARATOR}#{BACKSLASH}" : File::SEPARATOR)
|
60
60
|
trailing_slashes_regex = /[#{path_separator_regex}]+$/.freeze
|
61
61
|
leading_slashes_regex = /^[#{path_separator_regex}]+/.freeze
|
62
|
+
separator = path_separator(windows: windows)
|
62
63
|
|
63
|
-
args.flatten
|
64
|
+
args.flatten!
|
65
|
+
args.inject do |joined_path, component|
|
64
66
|
joined_path = joined_path.sub(trailing_slashes_regex, "")
|
65
67
|
component = component.sub(leading_slashes_regex, "")
|
66
|
-
joined_path
|
68
|
+
joined_path << "#{separator}#{component}"
|
69
|
+
joined_path
|
67
70
|
end
|
68
71
|
end
|
69
72
|
|
@@ -248,7 +251,7 @@ module ChefConfig
|
|
248
251
|
paths << ENV[@@per_tool_home_environment] if defined?(@@per_tool_home_environment) && @@per_tool_home_environment && ENV[@@per_tool_home_environment]
|
249
252
|
paths << ENV["CHEF_HOME"] if ENV["CHEF_HOME"]
|
250
253
|
if windows
|
251
|
-
# By default, Ruby uses the
|
254
|
+
# By default, Ruby uses the following environment variables to determine Dir.home:
|
252
255
|
# HOME
|
253
256
|
# HOMEDRIVE HOMEPATH
|
254
257
|
# USERPROFILE
|
data/lib/chef-config/version.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: 18.
|
4
|
+
version: 18.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-13 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: 18.
|
19
|
+
version: 18.6.2
|
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: 18.
|
26
|
+
version: 18.6.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mixlib-shellout
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|