chef-config 16.4.35 → 16.4.38

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: 51f20c3e7f57cf6748f609f9bbf456889aeff48a3ce3457adecc63c2c4686085
4
- data.tar.gz: 449f8768c9f289352682f34cd242d11509a789804d70e291fd7034667a3fb9f3
3
+ metadata.gz: d3791b65eb984ebf3096dcc6e75f447de7c2c96cd26c240a892e1c82aec7ecc2
4
+ data.tar.gz: 751950446654a8faad3ed243d477716b26f490142445ec109aceaf6d7509fb99
5
5
  SHA512:
6
- metadata.gz: bb7293d322062c30c48ed4a4d62f5310e91ce2c60f7f71ae6c31d7bf51fa868142ad42f01019805a7b998963744e98127b554ed6d47a1de4be42d86972688296
7
- data.tar.gz: 9adbb97999cedcc8efb039ccbc413724baa64ddb2bd97b764f8f49cb65b01f39a19e59f71ea9fe3e3960120d52afb217898a12571535d5fe9574094c26f686de
6
+ metadata.gz: 88409a45e617d1500f549ca880a51da34dd5b862d36246c648c90267e2e44c0c5abf21040ab049e6a2257492670729c9196d6ff39a98f15515bd33682debcc6d
7
+ data.tar.gz: 828eb650bfd04d3c20ff1b1c1fb2a2785a237fff11e9e0db1c635e21de8edffe719087a65d99d52f4d6c345558a9e0ab1790f93848bb36557b5190560a7fb32b
@@ -15,5 +15,5 @@
15
15
 
16
16
  module ChefConfig
17
17
  CHEFCONFIG_ROOT = File.expand_path("..", __dir__)
18
- VERSION = "16.4.35".freeze
18
+ VERSION = "16.4.38".freeze
19
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.4.35
4
+ version: 16.4.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 16.4.35
19
+ version: 16.4.38
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.4.35
26
+ version: 16.4.38
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mixlib-shellout
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -178,7 +178,6 @@ files:
178
178
  - lib/chef-config/exceptions.rb
179
179
  - lib/chef-config/fips.rb
180
180
  - lib/chef-config/logger.rb
181
- - lib/chef-config/mixin/chef_cloud.rb
182
181
  - lib/chef-config/mixin/credentials.rb
183
182
  - lib/chef-config/mixin/dot_d.rb
184
183
  - lib/chef-config/mixin/fuzzy_hostname_matcher.rb
@@ -1,55 +0,0 @@
1
- #
2
- # Author:: Jon Morrow (jmorrow@chef.io)
3
- # Copyright:: Copyright (c) Chef Software Inc.
4
- # License:: Apache License, Version 2.0
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
-
18
- require_relative "../path_helper"
19
-
20
- module ChefConfig
21
- module Mixin
22
- module ChefCloud
23
- CHEF_CLOUD_CLIENT_CONFIG = "/Library/Managed Preferences/io.chef.chef_client.plist"
24
-
25
- def cloud_config?
26
- File.file?(CHEF_CLOUD_CLIENT_CONFIG)
27
- end
28
- module_function :cloud_config?
29
-
30
- def parse_cloud_config(path)
31
- return nil unless cloud_config?
32
-
33
- begin
34
- plist_cmd = Mixlib::ShellOut.new("plutil -convert json '" + CHEF_CLOUD_CLIENT_CONFIG + "' -o -")
35
- plist_cmd.run_command
36
- plist_cmd.error!
37
- JSON.parse(plist_cmd.stdout)
38
- rescue => e
39
- # TOML's error messages are mostly rubbish, so we'll just give a generic one
40
- message = "Unable to parse chef client cloud config.\n"
41
- message << e.message
42
- raise ChefConfig::ConfigurationError, message
43
- end
44
- end
45
-
46
- # Load chef client cloud config configuration.
47
- #
48
- # @api internal
49
- # @return [void]
50
- def load_cloud_config
51
- Config.merge!(Hash[parse_cloud_config.map { |k, v| [k.to_sym, v] }])
52
- end
53
- end
54
- end
55
- end