chef-utils 16.6.14 → 16.7.61
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/Rakefile +1 -0
- data/chef-utils.gemspec +5 -5
- data/lib/chef-utils.rb +1 -0
- data/lib/chef-utils/dist.rb +25 -24
- data/lib/chef-utils/dsl/architecture.rb +1 -0
- data/lib/chef-utils/dsl/cloud.rb +1 -0
- data/lib/chef-utils/dsl/default_paths.rb +1 -0
- data/lib/chef-utils/dsl/introspection.rb +1 -0
- data/lib/chef-utils/dsl/os.rb +1 -0
- data/lib/chef-utils/dsl/path_sanity.rb +1 -0
- data/lib/chef-utils/dsl/platform.rb +1 -13
- data/lib/chef-utils/dsl/platform_family.rb +2 -1
- data/lib/chef-utils/dsl/platform_version.rb +1 -0
- data/lib/chef-utils/dsl/service.rb +1 -0
- data/lib/chef-utils/dsl/train_helpers.rb +1 -0
- data/lib/chef-utils/dsl/virtualization.rb +1 -0
- data/lib/chef-utils/dsl/which.rb +1 -0
- data/lib/chef-utils/dsl/windows.rb +1 -0
- data/lib/chef-utils/internal.rb +1 -0
- data/lib/chef-utils/mash.rb +1 -0
- data/lib/chef-utils/version.rb +2 -1
- data/lib/chef-utils/version_string.rb +2 -1
- data/spec/spec_helper.rb +1 -0
- data/spec/unit/dsl/architecture_spec.rb +1 -0
- data/spec/unit/dsl/cloud_spec.rb +1 -0
- data/spec/unit/dsl/dsl_spec.rb +1 -0
- data/spec/unit/dsl/introspection_spec.rb +1 -0
- data/spec/unit/dsl/os_spec.rb +1 -0
- data/spec/unit/dsl/path_sanity_spec.rb +1 -0
- data/spec/unit/dsl/platform_family_spec.rb +1 -0
- data/spec/unit/dsl/platform_spec.rb +1 -0
- data/spec/unit/dsl/service_spec.rb +1 -0
- data/spec/unit/dsl/virtualization_spec.rb +1 -0
- data/spec/unit/dsl/which_spec.rb +2 -1
- data/spec/unit/dsl/windows_spec.rb +1 -0
- data/spec/unit/mash_spec.rb +1 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 628f521279c53d12d2a6e8b52256ce94499655d86dc80c741449c3c2b69fcabd
|
4
|
+
data.tar.gz: bc5e81a353feb5a8ef6cbdaac0c74a4000556479c629b396a710730d6210e739
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 052cbb2f2a90b60090361dfc12c2daf63fdf3edc3322ae578106bd3c0680f886ede999e09236709398666404cb7d5c35a7f5474125292544e8cafdc4fc74f853
|
7
|
+
data.tar.gz: 42da8f6993f7fc8ea594e200ceac86916515e613b807a8003cc8ab692b4639f3c220cac72122dc167c2a56d9bf5ea0b644881e55f6449e8e485e36c2801142d7
|
data/Rakefile
CHANGED
data/chef-utils.gemspec
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
lib = File.expand_path("lib", __dir__)
|
2
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
4
|
require "chef-utils/version"
|
@@ -8,13 +9,15 @@ Gem::Specification.new do |spec|
|
|
8
9
|
spec.authors = ["Chef Software, Inc"]
|
9
10
|
spec.email = ["oss@chef.io"]
|
10
11
|
|
11
|
-
spec.summary = %q{Basic utility functions for Core Chef development}
|
12
|
+
spec.summary = %q{Basic utility functions for Core Chef Infra development}
|
12
13
|
spec.homepage = "https://github.com/chef/chef/tree/master/chef-utils"
|
13
14
|
spec.license = "Apache-2.0"
|
14
15
|
|
16
|
+
spec.required_ruby_version = ">= 2.6.0"
|
17
|
+
|
15
18
|
spec.metadata = {
|
16
19
|
"bug_tracker_uri" => "https://github.com/chef/chef/issues",
|
17
|
-
"changelog_uri" => "https://github.com/chef/chef/CHANGELOG.md",
|
20
|
+
"changelog_uri" => "https://github.com/chef/chef/blob/master/CHANGELOG.md",
|
18
21
|
"documentation_uri" => "https://github.com/chef/chef/tree/master/chef-utils/README.md",
|
19
22
|
"homepage_uri" => "https://github.com/chef/chef/tree/master/chef-utils",
|
20
23
|
"source_code_uri" => "https://github.com/chef/chef/tree/master/chef-utils",
|
@@ -40,7 +43,4 @@ Gem::Specification.new do |spec|
|
|
40
43
|
|
41
44
|
spec.files = %w{Rakefile LICENSE} + Dir.glob("*.gemspec") +
|
42
45
|
Dir.glob("{lib,spec}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) }
|
43
|
-
|
44
|
-
spec.bindir = "bin"
|
45
|
-
spec.executables = []
|
46
46
|
end
|
data/lib/chef-utils.rb
CHANGED
data/lib/chef-utils/dist.rb
CHANGED
@@ -1,97 +1,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module ChefUtils
|
2
3
|
# This class is not fully implemented, depending on it is not recommended!
|
3
4
|
module Dist
|
4
5
|
class Apply
|
5
6
|
# The chef-apply product name
|
6
|
-
PRODUCT = "Chef Infra Apply"
|
7
|
+
PRODUCT = "Chef Infra Apply"
|
7
8
|
|
8
9
|
# The chef-apply binary
|
9
|
-
EXEC = "chef-apply"
|
10
|
+
EXEC = "chef-apply"
|
10
11
|
end
|
11
12
|
|
12
13
|
class Automate
|
13
14
|
# name of the automate product
|
14
|
-
PRODUCT = "Chef Automate"
|
15
|
+
PRODUCT = "Chef Automate"
|
15
16
|
end
|
16
17
|
|
17
18
|
class Infra
|
18
19
|
# When referencing a product directly, like Chef (Now Chef Infra)
|
19
|
-
PRODUCT = "Chef Infra Client"
|
20
|
+
PRODUCT = "Chef Infra Client"
|
20
21
|
|
21
22
|
# A short designation for the product, used in Windows event logs
|
22
23
|
# and some nomenclature.
|
23
|
-
SHORT = "chef"
|
24
|
+
SHORT = "chef"
|
24
25
|
|
25
26
|
# The client's alias (chef-client)
|
26
|
-
CLIENT = "chef-client"
|
27
|
+
CLIENT = "chef-client"
|
27
28
|
|
28
29
|
# The chef executable, as in `chef gem install` or `chef generate cookbook`
|
29
|
-
EXEC = "chef"
|
30
|
+
EXEC = "chef"
|
30
31
|
|
31
32
|
# The chef-shell executable
|
32
|
-
SHELL = "chef-shell"
|
33
|
+
SHELL = "chef-shell"
|
33
34
|
|
34
35
|
# Configuration related constants
|
35
36
|
# The chef-shell configuration file
|
36
|
-
SHELL_CONF = "chef_shell.rb"
|
37
|
+
SHELL_CONF = "chef_shell.rb"
|
37
38
|
|
38
39
|
# The user's configuration directory
|
39
|
-
USER_CONF_DIR = ".chef"
|
40
|
+
USER_CONF_DIR = ".chef"
|
40
41
|
|
41
42
|
# The suffix for Chef's /etc/chef, /var/chef and C:\\Chef directories
|
42
43
|
# "chef" => /etc/cinc, /var/cinc, C:\\cinc
|
43
|
-
DIR_SUFFIX = "chef"
|
44
|
+
DIR_SUFFIX = "chef"
|
44
45
|
end
|
45
46
|
|
46
47
|
class Org
|
47
48
|
# product Website address
|
48
|
-
WEBSITE = "https://chef.io"
|
49
|
+
WEBSITE = "https://chef.io"
|
49
50
|
|
50
51
|
# The downloads site
|
51
|
-
DOWNLOADS_URL = "downloads.chef.io"
|
52
|
+
DOWNLOADS_URL = "downloads.chef.io"
|
52
53
|
|
53
54
|
# The legacy conf folder: C:/opscode/chef. Specifically the "opscode" part
|
54
55
|
# DIR_SUFFIX is appended to it in code where relevant
|
55
|
-
LEGACY_CONF_DIR = "opscode"
|
56
|
+
LEGACY_CONF_DIR = "opscode"
|
56
57
|
|
57
58
|
# Enable forcing Chef EULA
|
58
59
|
ENFORCE_LICENSE = true
|
59
60
|
|
60
61
|
# product patents page
|
61
|
-
PATENTS = "https://www.chef.io/patents"
|
62
|
+
PATENTS = "https://www.chef.io/patents"
|
62
63
|
|
63
64
|
# knife documentation page
|
64
|
-
KNIFE_DOCS = "https://docs.chef.io/workstation/knife/"
|
65
|
+
KNIFE_DOCS = "https://docs.chef.io/workstation/knife/"
|
65
66
|
end
|
66
67
|
|
67
68
|
class Server
|
68
69
|
# The name of the server product
|
69
|
-
PRODUCT = "Chef Infra Server"
|
70
|
+
PRODUCT = "Chef Infra Server"
|
70
71
|
|
71
72
|
# The server's configuration directory
|
72
|
-
CONF_DIR = "/etc/chef-server"
|
73
|
+
CONF_DIR = "/etc/chef-server"
|
73
74
|
|
74
75
|
# The servers's alias (chef-server)
|
75
|
-
SERVER = "chef-server"
|
76
|
+
SERVER = "chef-server"
|
76
77
|
|
77
78
|
# The server's configuration utility
|
78
|
-
SERVER_CTL = "chef-server-ctl"
|
79
|
+
SERVER_CTL = "chef-server-ctl"
|
79
80
|
end
|
80
81
|
|
81
82
|
class Solo
|
82
83
|
# Chef-Solo's product name
|
83
|
-
PRODUCT = "Chef Infra Solo"
|
84
|
+
PRODUCT = "Chef Infra Solo"
|
84
85
|
|
85
86
|
# The chef-solo executable (legacy local mode)
|
86
|
-
EXEC = "chef-solo"
|
87
|
+
EXEC = "chef-solo"
|
87
88
|
end
|
88
89
|
|
89
90
|
class Zero
|
90
91
|
# chef-zero executable
|
91
|
-
PRODUCT = "Chef Infra Zero"
|
92
|
+
PRODUCT = "Chef Infra Zero"
|
92
93
|
|
93
94
|
# The chef-zero executable (local mode)
|
94
|
-
EXEC = "chef-zero"
|
95
|
+
EXEC = "chef-zero"
|
95
96
|
end
|
96
97
|
end
|
97
98
|
end
|
data/lib/chef-utils/dsl/cloud.rb
CHANGED
data/lib/chef-utils/dsl/os.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# Copyright:: Copyright (c) Chef Software Inc.
|
3
4
|
# License:: Apache License, Version 2.0
|
@@ -235,19 +236,6 @@ module ChefUtils
|
|
235
236
|
# chef-sugar backcompat method
|
236
237
|
alias_method :openindiana?, :openindiana_platform?
|
237
238
|
|
238
|
-
# Determine if the current node is Nexenta Core Platform aka Nexenta OS.
|
239
|
-
#
|
240
|
-
# @param [Chef::Node] node the node to check
|
241
|
-
# @since 15.5
|
242
|
-
#
|
243
|
-
# @return [Boolean]
|
244
|
-
#
|
245
|
-
def nexentacore_platform?(node = __getnode)
|
246
|
-
node["platform"] == "nexentacore"
|
247
|
-
end
|
248
|
-
# chef-sugar backcompat method
|
249
|
-
alias_method :nexentacore?, :nexentacore_platform?
|
250
|
-
|
251
239
|
# Determine if the current node is AIX.
|
252
240
|
#
|
253
241
|
# @param [Chef::Node] node the node to check
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# Copyright:: Copyright (c) Chef Software Inc.
|
3
4
|
# License:: Apache License, Version 2.0
|
@@ -320,7 +321,7 @@ module ChefUtils
|
|
320
321
|
# @return [Boolean]
|
321
322
|
#
|
322
323
|
def solaris_based?(node = __getnode)
|
323
|
-
%w{solaris2 smartos omnios openindiana
|
324
|
+
%w{solaris2 smartos omnios openindiana}.include?(node["platform"])
|
324
325
|
end
|
325
326
|
|
326
327
|
# All of the BSD-lineage.
|
data/lib/chef-utils/dsl/which.rb
CHANGED
data/lib/chef-utils/internal.rb
CHANGED
data/lib/chef-utils/mash.rb
CHANGED
data/lib/chef-utils/version.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Copyright:: Copyright (c) Chef Software Inc.
|
2
3
|
# License:: Apache License, Version 2.0
|
3
4
|
#
|
@@ -15,5 +16,5 @@
|
|
15
16
|
|
16
17
|
module ChefUtils
|
17
18
|
CHEFUTILS_ROOT = File.expand_path("..", __dir__)
|
18
|
-
VERSION = "16.
|
19
|
+
VERSION = "16.7.61"
|
19
20
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Copyright:: Copyright 2017, Noah Kantrowitz
|
2
3
|
# License:: Apache License, Version 2.0
|
3
4
|
#
|
@@ -27,7 +28,7 @@ module ChefUtils
|
|
27
28
|
#
|
28
29
|
# @param val [String] Version string to parse.
|
29
30
|
def initialize(val)
|
30
|
-
val
|
31
|
+
val ||= ""
|
31
32
|
super(val)
|
32
33
|
begin
|
33
34
|
@parsed_version = ::Gem::Version.create(self)
|
data/spec/spec_helper.rb
CHANGED
data/spec/unit/dsl/cloud_spec.rb
CHANGED
data/spec/unit/dsl/dsl_spec.rb
CHANGED
data/spec/unit/dsl/os_spec.rb
CHANGED
data/spec/unit/dsl/which_spec.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# Copyright:: Copyright (c) Chef Software Inc.
|
3
4
|
# License:: Apache License, Version 2.0
|
@@ -94,7 +95,7 @@ RSpec.describe ChefUtils::DSL::Which do
|
|
94
95
|
end
|
95
96
|
|
96
97
|
test_which("arrays with blocks", "foo1", "foo2", finds: "/dir2/foo1", others: [ "/dir1/foo2" ]) do |f|
|
97
|
-
raise "bad arg to block" unless
|
98
|
+
raise "bad arg to block" unless ["/dir2/foo1", "/dir1/foo2"].include?(f)
|
98
99
|
|
99
100
|
true
|
100
101
|
end
|
data/spec/unit/mash_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 16.
|
4
|
+
version: 16.7.61
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef Software, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -59,7 +59,7 @@ licenses:
|
|
59
59
|
- Apache-2.0
|
60
60
|
metadata:
|
61
61
|
bug_tracker_uri: https://github.com/chef/chef/issues
|
62
|
-
changelog_uri: https://github.com/chef/chef/CHANGELOG.md
|
62
|
+
changelog_uri: https://github.com/chef/chef/blob/master/CHANGELOG.md
|
63
63
|
documentation_uri: https://github.com/chef/chef/tree/master/chef-utils/README.md
|
64
64
|
homepage_uri: https://github.com/chef/chef/tree/master/chef-utils
|
65
65
|
source_code_uri: https://github.com/chef/chef/tree/master/chef-utils
|
@@ -71,7 +71,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
71
71
|
requirements:
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
74
|
+
version: 2.6.0
|
75
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
77
|
- - ">="
|
@@ -81,5 +81,5 @@ requirements: []
|
|
81
81
|
rubygems_version: 3.1.4
|
82
82
|
signing_key:
|
83
83
|
specification_version: 4
|
84
|
-
summary: Basic utility functions for Core Chef development
|
84
|
+
summary: Basic utility functions for Core Chef Infra development
|
85
85
|
test_files: []
|