chef-utils 18.3.0 → 19.3.15
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 +4 -4
- data/lib/chef-utils/dist.rb +1 -1
- data/lib/chef-utils/dsl/architecture.rb +1 -1
- data/lib/chef-utils/dsl/backend.rb +27 -0
- data/lib/chef-utils/dsl/cloud.rb +12 -1
- data/lib/chef-utils/dsl/default_paths.rb +2 -2
- data/lib/chef-utils/dsl/introspection.rb +1 -1
- data/lib/chef-utils/dsl/os.rb +1 -1
- data/lib/chef-utils/dsl/path_sanity.rb +1 -1
- data/lib/chef-utils/dsl/platform.rb +1 -1
- data/lib/chef-utils/dsl/platform_family.rb +1 -1
- data/lib/chef-utils/dsl/platform_version.rb +1 -1
- data/lib/chef-utils/dsl/service.rb +1 -1
- data/lib/chef-utils/dsl/train_helpers.rb +1 -1
- data/lib/chef-utils/dsl/virtualization.rb +12 -1
- data/lib/chef-utils/dsl/which.rb +7 -5
- data/lib/chef-utils/dsl/windows.rb +1 -1
- data/lib/chef-utils/internal.rb +2 -2
- data/lib/chef-utils/parallel_map.rb +1 -1
- data/lib/chef-utils/version.rb +2 -2
- data/lib/chef-utils.rb +2 -1
- data/spec/unit/dsl/architecture_spec.rb +1 -1
- data/spec/unit/dsl/cloud_spec.rb +5 -2
- data/spec/unit/dsl/dsl_spec.rb +1 -1
- data/spec/unit/dsl/introspection_spec.rb +1 -1
- data/spec/unit/dsl/os_spec.rb +1 -1
- data/spec/unit/dsl/path_sanity_spec.rb +1 -1
- data/spec/unit/dsl/platform_family_spec.rb +1 -1
- data/spec/unit/dsl/platform_spec.rb +1 -1
- data/spec/unit/dsl/service_spec.rb +1 -1
- data/spec/unit/dsl/virtualization_spec.rb +4 -2
- data/spec/unit/dsl/which_spec.rb +1 -1
- data/spec/unit/dsl/windows_spec.rb +1 -1
- data/spec/unit/mash_spec.rb +1 -1
- data/spec/unit/parallel_map_spec.rb +1 -1
- metadata +4 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7aff6821bcd46b7f59bf738a59af9d2166b3af867786ea474a059e62b6508d21
|
|
4
|
+
data.tar.gz: cbba59b495a1b9850b95617dc747f8bc93f823e33ce91bc8e1918c3d9780c2e8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 06b654492b85895cf1ccb4188f486d5bafeb96b832f1867a72785ffaad9c72df9dd2a9186fa689a91c5fdb69aa90367d7b468dc897e6aee66ebb9cc72f66940b
|
|
7
|
+
data.tar.gz: 2c92e9614af786104870db19d87f6b051147b14b53772db30c0f9ba35540c6270b9c5b2ca258c465db5030e1c1b37a175587493c466dbfe6f8d252cb4d92dac0
|
data/lib/chef-utils/dist.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
module ChefUtils
|
|
2
|
+
module DSL
|
|
3
|
+
module Backend
|
|
4
|
+
include Internal
|
|
5
|
+
|
|
6
|
+
# Determine if the backend is local
|
|
7
|
+
#
|
|
8
|
+
# @param [Chef::Node] node the node to check
|
|
9
|
+
#
|
|
10
|
+
# @return [Boolean]
|
|
11
|
+
#
|
|
12
|
+
def local_mode?
|
|
13
|
+
node["platform_backend"] == "local"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Determine if the backend is remote
|
|
17
|
+
#
|
|
18
|
+
# @param [Chef::Node] node the node to check
|
|
19
|
+
#
|
|
20
|
+
# @return [Boolean]
|
|
21
|
+
#
|
|
22
|
+
def target_mode?
|
|
23
|
+
node["platform_backend"] != "local"
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
data/lib/chef-utils/dsl/cloud.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -149,6 +149,17 @@ module ChefUtils
|
|
|
149
149
|
node.key?("softlayer")
|
|
150
150
|
end
|
|
151
151
|
|
|
152
|
+
# Determine if the current node is running in Oracle Cloud Infrastructure (OCI).
|
|
153
|
+
#
|
|
154
|
+
# @param [Chef::Node] node the node to check
|
|
155
|
+
# @since 19.1
|
|
156
|
+
#
|
|
157
|
+
# @return [Boolean]
|
|
158
|
+
#
|
|
159
|
+
def oci?(node = __getnode)
|
|
160
|
+
node.key?("oci")
|
|
161
|
+
end
|
|
162
|
+
|
|
152
163
|
extend self
|
|
153
164
|
end
|
|
154
165
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -29,7 +29,7 @@ module ChefUtils
|
|
|
29
29
|
env_path = env ? env["PATH"] : __env_path
|
|
30
30
|
env_path = "" if env_path.nil?
|
|
31
31
|
path_separator = ChefUtils.windows? ? ";" : ":"
|
|
32
|
-
# ensure the Ruby and Gem bindirs are included for
|
|
32
|
+
# ensure the Ruby and Gem bindirs are included for packaged chef installs (e.g., habitat)
|
|
33
33
|
new_paths = env_path.split(path_separator)
|
|
34
34
|
[ __ruby_bindir, __gem_bindir ].compact.each do |path|
|
|
35
35
|
new_paths = [ path ] + new_paths unless new_paths.include?(path)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
data/lib/chef-utils/dsl/os.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -184,6 +184,17 @@ module ChefUtils
|
|
|
184
184
|
node.dig("virtualization", "system") == "openvz" && node.dig("virtualization", "role") == "host"
|
|
185
185
|
end
|
|
186
186
|
|
|
187
|
+
# Determine if the current node is running under Microsoft Hyper-v.
|
|
188
|
+
#
|
|
189
|
+
# @param [Chef::Node] node
|
|
190
|
+
# @since 18.5
|
|
191
|
+
#
|
|
192
|
+
# @return [Boolean]
|
|
193
|
+
#
|
|
194
|
+
def hyperv?(node = __getnode)
|
|
195
|
+
node.dig("virtualization", "system") == "hyperv" && node.dig("virtualization", "role") == "guest"
|
|
196
|
+
end
|
|
197
|
+
|
|
187
198
|
# Determine if the current node is running under any virtualization environment
|
|
188
199
|
#
|
|
189
200
|
# @param [Chef::Node] node
|
data/lib/chef-utils/dsl/which.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -46,11 +46,12 @@ module ChefUtils
|
|
|
46
46
|
# end
|
|
47
47
|
#
|
|
48
48
|
# @param [Array<String>] list of commands to search for
|
|
49
|
+
# @param [String,Array<String>] array of paths to look in first
|
|
49
50
|
# @param [String,Array<String>] array of extra paths to search through
|
|
50
51
|
# @return [String] the first match
|
|
51
52
|
#
|
|
52
|
-
def which(*cmds, extra_path: nil, &block)
|
|
53
|
-
where(*cmds, extra_path: extra_path, &block).first || false
|
|
53
|
+
def which(*cmds, prepend_path: nil, extra_path: nil, &block)
|
|
54
|
+
where(*cmds, prepend_path: prepend_path, extra_path: extra_path, &block).first || false
|
|
54
55
|
end
|
|
55
56
|
|
|
56
57
|
# Lookup all the instances of an an executable that can be found through the systems search PATH.
|
|
@@ -73,12 +74,13 @@ module ChefUtils
|
|
|
73
74
|
# end
|
|
74
75
|
#
|
|
75
76
|
# @param [Array<String>] list of commands to search for
|
|
77
|
+
# @param [String,Array<String>] array of paths to look in first
|
|
76
78
|
# @param [String,Array<String>] array of extra paths to search through
|
|
77
79
|
# @return [String] the first match
|
|
78
80
|
#
|
|
79
|
-
def where(*cmds, extra_path: nil, &block)
|
|
81
|
+
def where(*cmds, prepend_path: nil, extra_path: nil, &block)
|
|
80
82
|
extra_path ||= __extra_path
|
|
81
|
-
paths = __env_path.split(File::PATH_SEPARATOR) + Array(extra_path)
|
|
83
|
+
paths = Array(prepend_path) + __env_path.split(File::PATH_SEPARATOR) + Array(extra_path)
|
|
82
84
|
paths.uniq!
|
|
83
85
|
exts = ENV["PATHEXT"] ? ENV["PATHEXT"].split(";") : []
|
|
84
86
|
exts.unshift("")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
data/lib/chef-utils/internal.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -84,7 +84,7 @@ module ChefUtils
|
|
|
84
84
|
#
|
|
85
85
|
def __transport_connection
|
|
86
86
|
# Software consumers MUST override this method with their own implementation. The default behavior here is subject to change.
|
|
87
|
-
return Chef.run_context.transport_connection if defined?(Chef) && Chef.respond_to?(:run_context) && Chef
|
|
87
|
+
return Chef.run_context.transport_connection if defined?(Chef) && Chef.respond_to?(:run_context) && Chef.run_context&.transport_connection
|
|
88
88
|
|
|
89
89
|
nil
|
|
90
90
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
data/lib/chef-utils/version.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
# Copyright:: Copyright (c)
|
|
2
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
3
3
|
# License:: Apache License, Version 2.0
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
|
|
17
17
|
module ChefUtils
|
|
18
18
|
CHEFUTILS_ROOT = File.expand_path("..", __dir__)
|
|
19
|
-
VERSION = "
|
|
19
|
+
VERSION = "19.3.15"
|
|
20
20
|
end
|
data/lib/chef-utils.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
#
|
|
18
18
|
|
|
19
19
|
require_relative "chef-utils/dsl/architecture"
|
|
20
|
+
require_relative "chef-utils/dsl/backend"
|
|
20
21
|
require_relative "chef-utils/dsl/cloud"
|
|
21
22
|
require_relative "chef-utils/dsl/introspection"
|
|
22
23
|
require_relative "chef-utils/dsl/os"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
data/spec/unit/dsl/cloud_spec.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
#
|
|
18
18
|
|
|
19
19
|
require "spec_helper"
|
|
20
|
-
require "fauxhai"
|
|
21
20
|
|
|
22
21
|
def cloud_reports_true_for(*args, node:)
|
|
23
22
|
args.each do |method|
|
|
@@ -85,6 +84,10 @@ RSpec.describe ChefUtils::DSL::Cloud do
|
|
|
85
84
|
cloud_reports_true_for(:cloud?, :softlayer?, node: { "softlayer" => {}, "cloud" => {} })
|
|
86
85
|
end
|
|
87
86
|
|
|
87
|
+
context "on oci" do
|
|
88
|
+
cloud_reports_true_for(:cloud?, :oci?, node: { "oci" => {}, "cloud" => {} })
|
|
89
|
+
end
|
|
90
|
+
|
|
88
91
|
context "on virtualbox" do
|
|
89
92
|
it "does not return true for cloud?" do
|
|
90
93
|
expect(described_class.cloud?({ "virtualbox" => {}, "cloud" => nil })).to be false
|
data/spec/unit/dsl/dsl_spec.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
data/spec/unit/dsl/os_spec.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
#
|
|
18
18
|
|
|
19
19
|
require "spec_helper"
|
|
20
|
-
require "fauxhai"
|
|
21
20
|
|
|
22
21
|
def virtualization_reports_true_for(*args, node:)
|
|
23
22
|
args.each do |method|
|
|
@@ -45,6 +44,9 @@ RSpec.describe ChefUtils::DSL::Virtualization do
|
|
|
45
44
|
end
|
|
46
45
|
end
|
|
47
46
|
|
|
47
|
+
context "on hyperv" do
|
|
48
|
+
virtualization_reports_true_for(:guest?, :virtual?, :hyperv?, node: { "virtualization" => { "system" => "hyperv", "role" => "guest" } })
|
|
49
|
+
end
|
|
48
50
|
context "on kvm" do
|
|
49
51
|
virtualization_reports_true_for(:guest?, :virtual?, :kvm?, node: { "virtualization" => { "system" => "kvm", "role" => "guest" } })
|
|
50
52
|
virtualization_reports_true_for(:hypervisor?, :physical?, :kvm_host?, node: { "virtualization" => { "system" => "kvm", "role" => "host" } })
|
data/spec/unit/dsl/which_spec.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
data/spec/unit/mash_spec.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
3
|
# Author:: Matthew Kent (<mkent@magoazul.com>)
|
|
4
|
-
# Copyright:: Copyright (c)
|
|
4
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
5
5
|
# License:: Apache License, Version 2.0
|
|
6
6
|
#
|
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: chef-utils
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 19.3.15
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chef Software, Inc
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: concurrent-ruby
|
|
@@ -24,7 +23,6 @@ dependencies:
|
|
|
24
23
|
- - ">="
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
25
|
version: '0'
|
|
27
|
-
description:
|
|
28
26
|
email:
|
|
29
27
|
- oss@chef.io
|
|
30
28
|
executables: []
|
|
@@ -37,6 +35,7 @@ files:
|
|
|
37
35
|
- lib/chef-utils.rb
|
|
38
36
|
- lib/chef-utils/dist.rb
|
|
39
37
|
- lib/chef-utils/dsl/architecture.rb
|
|
38
|
+
- lib/chef-utils/dsl/backend.rb
|
|
40
39
|
- lib/chef-utils/dsl/cloud.rb
|
|
41
40
|
- lib/chef-utils/dsl/default_paths.rb
|
|
42
41
|
- lib/chef-utils/dsl/introspection.rb
|
|
@@ -79,7 +78,6 @@ metadata:
|
|
|
79
78
|
documentation_uri: https://github.com/chef/chef/tree/main/chef-utils/README.md
|
|
80
79
|
homepage_uri: https://github.com/chef/chef/tree/main/chef-utils
|
|
81
80
|
source_code_uri: https://github.com/chef/chef/tree/main/chef-utils
|
|
82
|
-
post_install_message:
|
|
83
81
|
rdoc_options: []
|
|
84
82
|
require_paths:
|
|
85
83
|
- lib
|
|
@@ -94,8 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
94
92
|
- !ruby/object:Gem::Version
|
|
95
93
|
version: '0'
|
|
96
94
|
requirements: []
|
|
97
|
-
rubygems_version: 3.
|
|
98
|
-
signing_key:
|
|
95
|
+
rubygems_version: 3.6.9
|
|
99
96
|
specification_version: 4
|
|
100
97
|
summary: Basic utility functions for Core Chef Infra development
|
|
101
98
|
test_files: []
|