chef 17.7.22-universal-mingw32 → 17.7.29-universal-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef/provider/package/habitat.rb +1 -1
- data/lib/chef/resource/chef_client_trusted_certificate.rb +1 -0
- data/lib/chef/resource/habitat_install.rb +2 -2
- data/lib/chef/resource/macos_userdefaults.rb +20 -23
- data/lib/chef/version.rb +1 -1
- data/spec/functional/resource/macos_userdefaults_spec.rb +1 -1
- data/spec/unit/resource/chef_client_trusted_certificate_spec.rb +14 -0
- data/spec/unit/resource/macos_user_defaults_spec.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e74e8e30d2f450bdc6669c974de84230639fd5d15b62417373be2e2ea924524a
|
4
|
+
data.tar.gz: d820bfac3769b1cb3ccc8e3f098a3b40ef333cb13c419cf54d36f78d6640f2f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7da62f0de32d26cf3c86c3fa87fac6cbbe281cf07fab283a1082bda1d5465734719164f3c3ecdc0dc37d3405b8de29e7f6358f3ca18a9c7a91b10677233a74a5
|
7
|
+
data.tar.gz: e5f431699ae781e44b4f20cf78af0802953a2e5ab5a3b7d648e0524de001e6ed2accf6eb9776e403a886f4f6b8b83c9da073bbbe0e1f012b98291d8f2a730b09
|
@@ -108,7 +108,7 @@ class Chef
|
|
108
108
|
headers["Authorization"] = "Bearer #{new_resource.auth_token}" if new_resource.auth_token
|
109
109
|
|
110
110
|
Chef::JSONCompat.parse(http.get(url, headers))
|
111
|
-
rescue Net::
|
111
|
+
rescue Net::HTTPClientException
|
112
112
|
nil
|
113
113
|
end
|
114
114
|
end
|
@@ -52,8 +52,8 @@ class Chef
|
|
52
52
|
property :name, String, default: "install habitat",
|
53
53
|
description: "Name of the resource block. This has no impact other than logging."
|
54
54
|
|
55
|
-
property :install_url, String, default: "https://raw.githubusercontent.com/habitat-sh/habitat/
|
56
|
-
description: "URL to the install script, default is from the [habitat repo](https://raw.githubusercontent.com/habitat-sh/habitat/
|
55
|
+
property :install_url, String, default: "https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh",
|
56
|
+
description: "URL to the install script, default is from the [habitat repo](https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh) ."
|
57
57
|
|
58
58
|
property :bldr_url, String,
|
59
59
|
description: "Optional URL to an alternate Habitat Builder."
|
@@ -17,6 +17,7 @@
|
|
17
17
|
|
18
18
|
require_relative "../resource"
|
19
19
|
require "chef-utils/dist" unless defined?(ChefUtils::Dist)
|
20
|
+
require "corefoundation" if RUBY_PLATFORM.match?(/darwin/)
|
20
21
|
autoload :Plist, "plist"
|
21
22
|
|
22
23
|
class Chef
|
@@ -135,31 +136,27 @@ class Chef
|
|
135
136
|
CF::Preferences.get(new_resource.key, new_resource.domain, new_resource.user, new_resource.host)
|
136
137
|
end
|
137
138
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
CF::Preferences::CURRENT_HOST
|
148
|
-
else
|
149
|
-
value
|
150
|
-
end
|
139
|
+
# Return valid hostname based on the input from host property
|
140
|
+
def to_cf_host(value)
|
141
|
+
case value
|
142
|
+
when :all
|
143
|
+
CF::Preferences::ALL_HOSTS
|
144
|
+
when :current
|
145
|
+
CF::Preferences::CURRENT_HOST
|
146
|
+
else
|
147
|
+
value
|
151
148
|
end
|
149
|
+
end
|
152
150
|
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
end
|
151
|
+
# Return valid username based on the input from user property
|
152
|
+
def to_cf_user(value)
|
153
|
+
case value
|
154
|
+
when :all
|
155
|
+
CF::Preferences::ALL_USERS
|
156
|
+
when :current
|
157
|
+
CF::Preferences::CURRENT_USER
|
158
|
+
else
|
159
|
+
value
|
163
160
|
end
|
164
161
|
end
|
165
162
|
end
|
data/lib/chef/version.rb
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
#
|
17
17
|
require "spec_helper"
|
18
18
|
|
19
|
-
describe Chef::Resource::MacosUserDefaults, :macos_only
|
19
|
+
describe Chef::Resource::MacosUserDefaults, :macos_only do
|
20
20
|
def create_resource
|
21
21
|
node = Chef::Node.new
|
22
22
|
events = Chef::EventDispatch::Dispatcher.new
|
@@ -51,4 +51,18 @@ describe Chef::Resource::ChefClientTrustedCertificate do
|
|
51
51
|
expect(provider.cert_path).to match(%r{trusted_certs/something.pem$})
|
52
52
|
end
|
53
53
|
end
|
54
|
+
|
55
|
+
describe "sensitive attribute" do
|
56
|
+
context "should be insensitive by default" do
|
57
|
+
it { expect(resource.sensitive).to(be_falsey) }
|
58
|
+
end
|
59
|
+
|
60
|
+
context "when set" do
|
61
|
+
before { resource.sensitive(true) }
|
62
|
+
|
63
|
+
it "should be set on the resource" do
|
64
|
+
expect(resource.sensitive).to(be_truthy)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
54
68
|
end
|
@@ -17,7 +17,7 @@
|
|
17
17
|
|
18
18
|
require "spec_helper"
|
19
19
|
|
20
|
-
describe Chef::Resource::MacosUserDefaults, :macos_only
|
20
|
+
describe Chef::Resource::MacosUserDefaults, :macos_only do
|
21
21
|
let(:test_value) { "fakest_key_value" }
|
22
22
|
let(:test_key) { "fakest_key" }
|
23
23
|
let(:node) { Chef::Node.new }
|
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: 17.7.
|
4
|
+
version: 17.7.29
|
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-10-
|
11
|
+
date: 2021-10-29 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: 17.7.
|
19
|
+
version: 17.7.29
|
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: 17.7.
|
26
|
+
version: 17.7.29
|
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: 17.7.
|
33
|
+
version: 17.7.29
|
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: 17.7.
|
40
|
+
version: 17.7.29
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: train-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|