chef 16.9.17-universal-mingw32 → 16.9.20-universal-mingw32
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e49964142ed39fe2e90e47037534dc91d8275d187ad5060cda25adb12db2d36
|
4
|
+
data.tar.gz: fb7706304ec584e1d18eba6737cb32103d67c3fe3ef134c5db2b0cef85f81a37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50b3f89e0fa321467fa078dd3b7c51fa7fe764473d70d2dd3e92ff85f33e6bad72c84ad47139492a8f986f7c15e128256431768ec9426dab299f822147d054bd
|
7
|
+
data.tar.gz: c3dbc6b9d27d0abaa1164d97108e741b41c87e60fa96cebeb97f2c5d97915c42608ed3db4dc2dc63af6c339197143d0e3c30113cdcf4c705910cc46aa82b2d72
|
@@ -11,12 +11,12 @@ class Chef
|
|
11
11
|
class Runner < EventDispatch::Base
|
12
12
|
extend Forwardable
|
13
13
|
|
14
|
-
attr_accessor :run_id
|
14
|
+
attr_accessor :run_id
|
15
15
|
attr_reader :node
|
16
16
|
def_delegators :node, :logger
|
17
17
|
|
18
18
|
def enabled?
|
19
|
-
audit_cookbook_present = recipes.include?("audit::default")
|
19
|
+
audit_cookbook_present = node["recipes"].include?("audit::default")
|
20
20
|
|
21
21
|
logger.info("#{self.class}##{__method__}: #{Inspec::Dist::PRODUCT_NAME} profiles? #{inspec_profiles.any?}")
|
22
22
|
logger.info("#{self.class}##{__method__}: audit cookbook? #{audit_cookbook_present}")
|
@@ -37,10 +37,6 @@ class Chef
|
|
37
37
|
self.run_id = run_status.run_id
|
38
38
|
end
|
39
39
|
|
40
|
-
def run_list_expanded(run_list_expansion)
|
41
|
-
self.recipes = run_list_expansion.recipes
|
42
|
-
end
|
43
|
-
|
44
40
|
def run_completed(_node, _run_status)
|
45
41
|
return unless enabled?
|
46
42
|
|
@@ -42,7 +42,9 @@ class Chef
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def current_installed_version
|
45
|
-
|
45
|
+
# pkgng up to version 1.15.99.7 returns 70 for pkg not found,
|
46
|
+
# later versions return 1
|
47
|
+
pkg_info = shell_out!("pkg", "info", new_resource.package_name, env: nil, returns: [0, 1, 70])
|
46
48
|
pkg_info.stdout[/^Version +: (.+)$/, 1]
|
47
49
|
end
|
48
50
|
|
data/lib/chef/version.rb
CHANGED
@@ -8,41 +8,40 @@ describe Chef::Compliance::Runner do
|
|
8
8
|
described_class.new.tap do |r|
|
9
9
|
r.node = node
|
10
10
|
r.run_id = "my_run_id"
|
11
|
-
r.recipes = []
|
12
11
|
end
|
13
12
|
end
|
14
13
|
|
15
14
|
describe "#enabled?" do
|
16
15
|
it "is true if the node attributes have audit profiles and the audit cookbook is not present" do
|
17
16
|
node.normal["audit"]["profiles"]["ssh"] = { 'compliance': "base/ssh" }
|
18
|
-
|
17
|
+
node.automatic["recipes"] = %w{ fancy_cookbook::fanciness tacobell::nachos }
|
19
18
|
|
20
19
|
expect(runner).to be_enabled
|
21
20
|
end
|
22
21
|
|
23
22
|
it "is false if the node attributes have audit profiles and the audit cookbook is present" do
|
24
23
|
node.normal["audit"]["profiles"]["ssh"] = { 'compliance': "base/ssh" }
|
25
|
-
|
24
|
+
node.automatic["recipes"] = %w{ audit::default fancy_cookbook::fanciness tacobell::nachos }
|
26
25
|
|
27
26
|
expect(runner).not_to be_enabled
|
28
27
|
end
|
29
28
|
|
30
29
|
it "is false if the node attributes do not have audit profiles and the audit cookbook is not present" do
|
31
30
|
node.normal["audit"]["profiles"] = {}
|
32
|
-
|
31
|
+
node.automatic["recipes"] = %w{ fancy_cookbook::fanciness tacobell::nachos }
|
33
32
|
|
34
33
|
expect(runner).not_to be_enabled
|
35
34
|
end
|
36
35
|
|
37
36
|
it "is false if the node attributes do not have audit profiles and the audit cookbook is present" do
|
38
37
|
node.normal["audit"]["profiles"] = {}
|
39
|
-
|
38
|
+
node.automatic["recipes"] = %w{ audit::default fancy_cookbook::fanciness tacobell::nachos }
|
40
39
|
|
41
40
|
expect(runner).not_to be_enabled
|
42
41
|
end
|
43
42
|
|
44
43
|
it "is false if the node attributes do not have audit attributes and the audit cookbook is not present" do
|
45
|
-
|
44
|
+
node.automatic["recipes"] = %w{ fancy_cookbook::fanciness tacobell::nachos }
|
46
45
|
expect(runner).not_to be_enabled
|
47
46
|
end
|
48
47
|
end
|
@@ -66,7 +66,7 @@ describe Chef::Provider::Package::Freebsd::Port do
|
|
66
66
|
end
|
67
67
|
|
68
68
|
it "should query pkg database" do
|
69
|
-
expect(@provider).to receive(:shell_out_compacted!).with("pkg", "info", "zsh", env: nil, returns: [0, 70], timeout: 900).and_return(@pkg_info)
|
69
|
+
expect(@provider).to receive(:shell_out_compacted!).with("pkg", "info", "zsh", env: nil, returns: [0, 1, 70], timeout: 900).and_return(@pkg_info)
|
70
70
|
expect(@provider.current_installed_version).to eq("3.1.7")
|
71
71
|
end
|
72
72
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 16.9.
|
4
|
+
version: 16.9.20
|
5
5
|
platform: universal-mingw32
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-config
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 16.9.
|
19
|
+
version: 16.9.20
|
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.9.
|
26
|
+
version: 16.9.20
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: chef-utils
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 16.9.
|
33
|
+
version: 16.9.20
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 16.9.
|
40
|
+
version: 16.9.20
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: train-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|