chef-utils 15.8.23 → 15.12.22
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.rb +1 -1
- data/lib/chef-utils/dsl/architecture.rb +42 -10
- data/lib/chef-utils/dsl/cloud.rb +32 -23
- data/lib/chef-utils/dsl/introspection.rb +12 -5
- data/lib/chef-utils/dsl/os.rb +7 -5
- data/lib/chef-utils/dsl/path_sanity.rb +2 -1
- data/lib/chef-utils/dsl/platform.rb +57 -29
- data/lib/chef-utils/dsl/platform_family.rb +61 -35
- data/lib/chef-utils/dsl/platform_version.rb +1 -1
- data/lib/chef-utils/dsl/service.rb +11 -1
- data/lib/chef-utils/dsl/train_helpers.rb +2 -2
- data/lib/chef-utils/dsl/virtualization.rb +2 -2
- data/lib/chef-utils/dsl/which.rb +5 -5
- data/lib/chef-utils/dsl/windows.rb +14 -9
- data/lib/chef-utils/internal.rb +2 -2
- data/lib/chef-utils/version.rb +2 -2
- data/spec/unit/dsl/architecture_spec.rb +16 -5
- data/spec/unit/dsl/cloud_spec.rb +7 -1
- data/spec/unit/dsl/dsl_spec.rb +1 -1
- data/spec/unit/dsl/introspection_spec.rb +2 -2
- 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 +1 -1
- 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
- metadata +2 -2
data/lib/chef-utils/internal.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright:: Copyright
|
2
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -27,7 +27,7 @@ module ChefUtils
|
|
27
27
|
#
|
28
28
|
# This gem may be used by gems like mixlib-shellout which can be consumed by external non-Chef utilities,
|
29
29
|
# so including brittle code here which depends on the existence of the chef-client will cause broken
|
30
|
-
# behavior downstream. You must practice defensive coding, and not make assumptions about
|
30
|
+
# behavior downstream. You must practice defensive coding, and not make assumptions about running within chef-client.
|
31
31
|
#
|
32
32
|
# Other consumers may mix in the helper classes and then override the methods here and provide their own custom
|
33
33
|
# wiring and override what is provided here. They are marked as private because no downstream user should ever touch
|
data/lib/chef-utils/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
2
2
|
# License:: Apache License, Version 2.0
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -15,5 +15,5 @@
|
|
15
15
|
|
16
16
|
module ChefUtils
|
17
17
|
CHEFUTILS_ROOT = File.expand_path("../..", __FILE__)
|
18
|
-
VERSION = "15.
|
18
|
+
VERSION = "15.12.22".freeze
|
19
19
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright:: Copyright
|
2
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -84,17 +84,17 @@ RSpec.describe ChefUtils::DSL::Architecture do
|
|
84
84
|
context "on aarch64" do
|
85
85
|
let(:arch) { "aarch64" }
|
86
86
|
|
87
|
-
arch_reports_true_for(:_64_bit?)
|
87
|
+
arch_reports_true_for(:_64_bit?, :arm?)
|
88
88
|
end
|
89
89
|
context "on arch64" do
|
90
90
|
let(:arch) { "arch64" }
|
91
91
|
|
92
|
-
arch_reports_true_for(:_64_bit?)
|
92
|
+
arch_reports_true_for(:_64_bit?, :arm?)
|
93
93
|
end
|
94
94
|
context "on arm64" do
|
95
95
|
let(:arch) { "arm64" }
|
96
96
|
|
97
|
-
arch_reports_true_for(:_64_bit?)
|
97
|
+
arch_reports_true_for(:_64_bit?, :arm?)
|
98
98
|
end
|
99
99
|
context "on sun4v" do
|
100
100
|
let(:arch) { "sun4v" }
|
@@ -129,8 +129,19 @@ RSpec.describe ChefUtils::DSL::Architecture do
|
|
129
129
|
context "on armhf" do
|
130
130
|
let(:arch) { "armhf" }
|
131
131
|
|
132
|
-
arch_reports_true_for(:armhf?, :_32_bit?)
|
132
|
+
arch_reports_true_for(:armhf?, :_32_bit?, :arm?)
|
133
|
+
end
|
134
|
+
context "on armv6l" do
|
135
|
+
let(:arch) { "armv6l" }
|
136
|
+
|
137
|
+
arch_reports_true_for(:armhf?, :_32_bit?, :arm?)
|
138
|
+
end
|
139
|
+
context "on armv7l" do
|
140
|
+
let(:arch) { "armv7l" }
|
141
|
+
|
142
|
+
arch_reports_true_for(:armhf?, :_32_bit?, :arm?)
|
133
143
|
end
|
144
|
+
|
134
145
|
context "on s390" do
|
135
146
|
let(:arch) { "s390" }
|
136
147
|
|
data/spec/unit/dsl/cloud_spec.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright:: Copyright
|
2
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -79,4 +79,10 @@ RSpec.describe ChefUtils::DSL::Cloud do
|
|
79
79
|
context "on softlayer" do
|
80
80
|
cloud_reports_true_for(:cloud?, :softlayer?, node: { "softlayer" => {}, "cloud" => {} })
|
81
81
|
end
|
82
|
+
|
83
|
+
context "on virtualbox" do
|
84
|
+
it "does not return true for cloud?" do
|
85
|
+
expect(described_class.cloud?({ "virtualbox" => {}, "cloud" => nil })).to be false
|
86
|
+
end
|
87
|
+
end
|
82
88
|
end
|
data/spec/unit/dsl/dsl_spec.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright:: Copyright
|
2
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -31,7 +31,7 @@ RSpec.describe ChefUtils::DSL::Introspection do
|
|
31
31
|
let(:test_instance) { IntrospectionTestClass.new(node) }
|
32
32
|
|
33
33
|
context "#docker?" do
|
34
|
-
# FIXME: use a real VividMash for these tests
|
34
|
+
# FIXME: use a real VividMash for these tests instead of stubbing
|
35
35
|
it "is false by default" do
|
36
36
|
expect(node).to receive(:read).with("virtualization", "systems", "docker").and_return(nil)
|
37
37
|
expect(ChefUtils.docker?(node)).to be false
|
data/spec/unit/dsl/os_spec.rb
CHANGED
data/spec/unit/dsl/which_spec.rb
CHANGED
data/spec/unit/mash_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Matthew Kent (<mkent@magoazul.com>)
|
3
|
-
# Copyright:: Copyright
|
3
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
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,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 15.
|
4
|
+
version: 15.12.22
|
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-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|