chef 17.7.22 → 17.7.29

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 830ef86569d7fc3510b6428198eaf8f6befb9473f808af1f77ae7d1e95171fb7
4
- data.tar.gz: 58d92cc9852026920805cb37699360c2f13edf4f8404839c8ab0ba5de1e54f21
3
+ metadata.gz: c14c01fc55c7847b27979c41e01be0dd845b69840fc048e7abeb8787156bae23
4
+ data.tar.gz: 44676d2fe03cc4306efaa4c33f48a9eb3e2d6d736962bcd441ffc4bd0c371621
5
5
  SHA512:
6
- metadata.gz: f07a07a8726c05f0b967e65f391388b7206b6590d598360b2aac3d26e48c773573366153d58dcf1392cbffc4552ed1756096d243ed2d076820d10394999abdb3
7
- data.tar.gz: 8c6a775624f533de9112b3c77cae54ba033e94faca6a87fd0c44c7772a64e2f4f981c550813f2deb6c8bf1326adc33877fc15e4fb1d16a65ab98ec6f20297bde
6
+ metadata.gz: 768707842ce349798c256c91d2202c5c7b7f931d63ca53eb9454ed6b424f3a11b38b2c9b94c4c4177959ff179029831a9cca3d3233afa5d2ba7dcd90afba3c23
7
+ data.tar.gz: 9a3a715294581c43a663387a3462c745d6bab3a44736ab9bf87e607cfa5cfa7a920de90a918225e05b08a8962b52103c792d97b586d69ef32023afb1e45dc11c
@@ -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::HTTPServerException
111
+ rescue Net::HTTPClientException
112
112
  nil
113
113
  end
114
114
  end
@@ -75,6 +75,7 @@ class Chef
75
75
  file cert_path do
76
76
  content new_resource.certificate
77
77
  mode "0640"
78
+ sensitive new_resource.sensitive
78
79
  end
79
80
  end
80
81
 
@@ -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/master/components/hab/install.sh",
56
- description: "URL to the install script, default is from the [habitat repo](https://raw.githubusercontent.com/habitat-sh/habitat/master/components/hab/install.sh) ."
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
- action_class do
139
- require "corefoundation" if RUBY_PLATFORM.match?(/darwin/)
140
-
141
- # Return valid hostname based on the input from host property
142
- def to_cf_host(value)
143
- case value
144
- when :all
145
- CF::Preferences::ALL_HOSTS
146
- when :current
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
- # Return valid username based on the input from user property
154
- def to_cf_user(value)
155
- case value
156
- when :all
157
- CF::Preferences::ALL_USERS
158
- when :current
159
- CF::Preferences::CURRENT_USER
160
- else
161
- value
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
@@ -23,7 +23,7 @@ require_relative "version_string"
23
23
 
24
24
  class Chef
25
25
  CHEF_ROOT = File.expand_path("..", __dir__)
26
- VERSION = Chef::VersionString.new("17.7.22")
26
+ VERSION = Chef::VersionString.new("17.7.29")
27
27
  end
28
28
 
29
29
  #
@@ -16,7 +16,7 @@
16
16
  #
17
17
  require "spec_helper"
18
18
 
19
- describe Chef::Resource::MacosUserDefaults, :macos_only, requires_root: true do
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, requires_root: true do
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.22
4
+ version: 17.7.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-25 00:00:00.000000000 Z
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.22
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.22
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.22
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.22
40
+ version: 17.7.29
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: train-core
43
43
  requirement: !ruby/object:Gem::Requirement