chef-config 15.6.10 → 15.7.30

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: 2d425ace521aa941649fe24dc24ced0b1de4b40cb75ecfeccd076d639979778c
4
- data.tar.gz: 64acf5dbac1da768ffd2d4ffc8f2ea52cc230ccc633b72333b94a4b332d29c6d
3
+ metadata.gz: ff54c88cbe72522384cabea838d06dcb9d9f9ea8771064be3af73cb1953fdb40
4
+ data.tar.gz: 581290c9db8e472452abafbd2f5a84251c3295f8bb716ee46cc939ebba418219
5
5
  SHA512:
6
- metadata.gz: 54f37fb7448045119182c9ff3b94e95deb909783ec00ffcfe29a2ecaae6352b9e3fb9597f92355ac09d37f3be80878708a15b980792f275cfa511c43f1024671
7
- data.tar.gz: e7082041aaf60be9444d5060ac521796a41c9b2942b5c3dc6288cb31834656d04962e3a32f92e823126a1634852e9782bf6324f362c2d27685ebeae71de1a7b6
6
+ metadata.gz: e777b096aecc3d2e9678e28352aafcaccbcd29d9563e8984dfd3742bf8b3f016cdf456c975266bf672015c8674997a5ae30ab5e4446d3914d699930076e20bc6
7
+ data.tar.gz: 869a2cfda9c3479ae9c5551ea1041d222c0902a85a996ace374c6ba64e66ee35ca7806ae784d62a0cd9fbbcd6a09b3b84889e1098d309fa2d0c5b01fb0cdd358
@@ -158,7 +158,7 @@ module ChefConfig
158
158
  if config_file
159
159
  PathHelper.dirname(PathHelper.canonical_path(config_file, false))
160
160
  else
161
- PathHelper.join(PathHelper.cleanpath(user_home), ".chef", "")
161
+ PathHelper.join(PathHelper.cleanpath(user_home), ChefConfig::Dist::USER_CONF_DIR, "")
162
162
  end
163
163
  end
164
164
 
@@ -237,7 +237,7 @@ module ChefConfig
237
237
  end
238
238
  path = new_path
239
239
  end
240
- ChefConfig.logger.info("Auto-discovered chef repository at #{path}")
240
+ ChefConfig.logger.info("Auto-discovered #{ChefConfig::Dist::SHORT} repository at #{path}")
241
241
  path
242
242
  end
243
243
 
@@ -339,7 +339,7 @@ module ChefConfig
339
339
  # Otherwise, we'll create .chef under the user's home directory and use that as
340
340
  # the cache path.
341
341
  unless path_accessible?(primary_cache_path) || path_accessible?(primary_cache_root)
342
- secondary_cache_path = PathHelper.join(user_home, ".chef")
342
+ secondary_cache_path = PathHelper.join(user_home, ChefConfig::Dist::USER_CONF_DIR)
343
343
  secondary_cache_path = target_mode? ? "#{secondary_cache_path}/#{target_mode.host}" : secondary_cache_path
344
344
  ChefConfig.logger.trace("Unable to access cache at #{primary_cache_path}. Switching cache to #{secondary_cache_path}")
345
345
  secondary_cache_path
@@ -370,7 +370,7 @@ module ChefConfig
370
370
  # If your `file_cache_path` resides on a NFS (or non-flock()-supporting
371
371
  # fs), it's recommended to set this to something like
372
372
  # '/tmp/chef-client-running.pid'
373
- default(:lockfile) { PathHelper.join(file_cache_path, "chef-client-running.pid") }
373
+ default(:lockfile) { PathHelper.join(file_cache_path, "#{ChefConfig::Dist::CLIENT}-running.pid") }
374
374
 
375
375
  ## Daemonization Settings ##
376
376
  # What user should Chef run as?
@@ -471,7 +471,7 @@ module ChefConfig
471
471
  # When set to a String, Chef Zero disables multitenant support. This is
472
472
  # what you want when using Chef Zero to serve a single Chef Repo. Setting
473
473
  # this to `false` enables multi-tenant.
474
- default :single_org, "chef"
474
+ default :single_org, ChefConfig::Dist::SHORT
475
475
 
476
476
  # Whether Chef Zero should operate in a mode analogous to OSS Chef Server
477
477
  # 11 (true) or Chef Server 12 (false). Chef Zero can still serve
@@ -764,7 +764,7 @@ module ChefConfig
764
764
  if chef_server_url.to_s =~ %r{/organizations/(.*)$}
765
765
  "#{$1}-validator"
766
766
  else
767
- "chef-validator"
767
+ "#{ChefConfig::Dist::SHORT}-validator"
768
768
  end
769
769
  end
770
770
 
@@ -838,7 +838,7 @@ module ChefConfig
838
838
  default :profile, nil
839
839
 
840
840
  default :chef_guid_path do
841
- PathHelper.join(config_dir, "chef_guid")
841
+ PathHelper.join(config_dir, "#{ChefConfig::Dist::SHORT}_guid")
842
842
  end
843
843
 
844
844
  default :chef_guid, nil
@@ -1065,7 +1065,7 @@ module ChefConfig
1065
1065
  # generated by the DataCollector when Chef is run in Solo mode. This
1066
1066
  # allows users to associate their Solo nodes with faux organizations
1067
1067
  # without the nodes being connected to an actual Chef Server.
1068
- default :organization, "chef_solo"
1068
+ default :organization, "#{ChefConfig::Dist::SHORT}_solo"
1069
1069
  end
1070
1070
 
1071
1071
  configurable(:http_proxy)
@@ -1,10 +1,19 @@
1
1
  module ChefConfig
2
2
  class Dist
3
- # The chef executable name. Also used in directory names.
3
+ # The chef executable name.
4
4
  EXEC = "chef".freeze
5
5
 
6
+ # The client's alias (chef-client)
7
+ CLIENT = "chef-client".freeze
8
+
9
+ # A short name for the product
10
+ SHORT = "chef".freeze
11
+
6
12
  # The suffix for Chef's /etc/chef, /var/chef and C:\\Chef directories
7
13
  # "cinc" => /etc/cinc, /var/cinc, C:\\cinc
8
14
  DIR_SUFFIX = "chef".freeze
15
+
16
+ # The user's configuration directory
17
+ USER_CONF_DIR = ".chef".freeze
9
18
  end
10
19
  end
@@ -36,7 +36,7 @@ module ChefConfig
36
36
  # normally set via a command-line option.
37
37
  # @return [String]
38
38
  def credentials_profile(profile = nil)
39
- context_file = PathHelper.home(".chef", "context").freeze
39
+ context_file = PathHelper.home(ChefConfig::Dist::USER_CONF_DIR, "context").freeze
40
40
  if !profile.nil?
41
41
  profile
42
42
  elsif ENV.include?("CHEF_PROFILE")
@@ -53,7 +53,7 @@ module ChefConfig
53
53
  # @since 14.4
54
54
  # @return [String]
55
55
  def credentials_file_path
56
- PathHelper.home(".chef", "credentials").freeze
56
+ PathHelper.home(ChefConfig::Dist::USER_CONF_DIR, "credentials").freeze
57
57
  end
58
58
 
59
59
  # Load and parse the credentials file.
@@ -15,5 +15,5 @@
15
15
 
16
16
  module ChefConfig
17
17
  CHEFCONFIG_ROOT = File.expand_path("../..", __FILE__)
18
- VERSION = "15.6.10".freeze
18
+ VERSION = "15.7.30".freeze
19
19
  end
@@ -59,7 +59,7 @@ module ChefConfig
59
59
  @chef_config_dir = false
60
60
  full_path = working_directory.split(File::SEPARATOR)
61
61
  (full_path.length - 1).downto(0) do |i|
62
- candidate_directory = File.join(full_path[0..i] + [".chef"])
62
+ candidate_directory = File.join(full_path[0..i] + [ChefConfig::Dist::USER_CONF_DIR])
63
63
  if File.exist?(candidate_directory) && File.directory?(candidate_directory)
64
64
  @chef_config_dir = candidate_directory
65
65
  break
@@ -129,7 +129,7 @@ module ChefConfig
129
129
  candidate_configs << File.join(chef_config_dir, "knife.rb")
130
130
  end
131
131
  # Look for $HOME/.chef/knife.rb
132
- PathHelper.home(".chef") do |dot_chef_dir|
132
+ PathHelper.home(ChefConfig::Dist::USER_CONF_DIR) do |dot_chef_dir|
133
133
  candidate_configs << File.join(dot_chef_dir, "config.rb")
134
134
  candidate_configs << File.join(dot_chef_dir, "knife.rb")
135
135
  end
@@ -186,7 +186,7 @@ module ChefConfig
186
186
  end
187
187
 
188
188
  def home_chef_dir
189
- @home_chef_dir ||= PathHelper.home(".chef")
189
+ @home_chef_dir ||= PathHelper.home(ChefConfig::Dist::USER_CONF_DIR)
190
190
  end
191
191
 
192
192
  def apply_config(config_content, config_file_path)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 15.6.10
4
+ version: 15.7.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-10 00:00:00.000000000 Z
11
+ date: 2020-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-utils
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 15.6.10
19
+ version: 15.7.30
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: 15.6.10
26
+ version: 15.7.30
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mixlib-shellout
29
29
  requirement: !ruby/object:Gem::Requirement