summaryrefslogtreecommitdiff
path: root/chef-config/lib
diff options
context:
space:
mode:
authorLamont Granquist <lamont@chef.io>2019-05-20 18:01:42 -0700
committerGitHub <noreply@github.com>2019-05-20 18:01:42 -0700
commit80927d28ed0570cec79586f7c1d007a375f30839 (patch)
tree6746ad5d263e663c8f6e05a403986d38ef9dba8b /chef-config/lib
parentdfe11864d3a347ba991f53b9fd74cde24a9b60b7 (diff)
parentc7600f987e8e5a8a33919526d7fa522fef9c7d4b (diff)
downloadchef-80927d28ed0570cec79586f7c1d007a375f30839.tar.gz
Merge pull request #8545 from chef/lcg/chef-config-requires
Fix chef-config requires lines
Diffstat (limited to 'chef-config/lib')
-rw-r--r--chef-config/lib/chef-config/config.rb26
-rw-r--r--chef-config/lib/chef-config/exceptions.rb4
-rw-r--r--chef-config/lib/chef-config/fips.rb2
-rw-r--r--chef-config/lib/chef-config/mixin/credentials.rb2
-rw-r--r--chef-config/lib/chef-config/mixin/dot_d.rb2
-rw-r--r--chef-config/lib/chef-config/path_helper.rb6
-rw-r--r--chef-config/lib/chef-config/workstation_config_loader.rb14
7 files changed, 28 insertions, 28 deletions
diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb
index 910f0e024d..72b456d848 100644
--- a/chef-config/lib/chef-config/config.rb
+++ b/chef-config/lib/chef-config/config.rb
@@ -19,19 +19,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-require "mixlib/config"
-require "pathname"
-
-require "chef-config/fips"
-require "chef-config/logger"
-require "chef-config/windows"
-require "chef-config/path_helper"
-require "chef-config/mixin/fuzzy_hostname_matcher"
-
-require "mixlib/shellout"
-require "uri"
-require "addressable/uri"
-require "openssl"
+require "mixlib/config" unless defined?(Mixlib::Config)
+require "pathname" unless defined?(Pathname)
+
+require_relative "fips"
+require_relative "logger"
+require_relative "windows"
+require_relative "path_helper"
+require_relative "mixin/fuzzy_hostname_matcher"
+
+require "mixlib/shellout" unless defined?(Mixlib::ShellOut)
+require "uri" unless defined?(URI)
+require "addressable/uri" unless defined?(Addressable::URI)
+require "openssl" unless defined?(OpenSSL)
require "yaml"
module ChefConfig
diff --git a/chef-config/lib/chef-config/exceptions.rb b/chef-config/lib/chef-config/exceptions.rb
index 23fd28f9c8..86d34374ab 100644
--- a/chef-config/lib/chef-config/exceptions.rb
+++ b/chef-config/lib/chef-config/exceptions.rb
@@ -15,8 +15,8 @@
# limitations under the License.
#
-require "chef-config/windows"
-require "chef-config/logger"
+require_relative "windows"
+require_relative "logger"
module ChefConfig
diff --git a/chef-config/lib/chef-config/fips.rb b/chef-config/lib/chef-config/fips.rb
index 623ce87686..4c365301d5 100644
--- a/chef-config/lib/chef-config/fips.rb
+++ b/chef-config/lib/chef-config/fips.rb
@@ -21,7 +21,7 @@ module ChefConfig
def self.fips?
if ChefConfig.windows?
begin
- require "win32/registry"
+ require "win32/registry" unless defined?(Win32::Registry)
rescue LoadError
return false
end
diff --git a/chef-config/lib/chef-config/mixin/credentials.rb b/chef-config/lib/chef-config/mixin/credentials.rb
index 0a7ca356c8..5b0078d1cc 100644
--- a/chef-config/lib/chef-config/mixin/credentials.rb
+++ b/chef-config/lib/chef-config/mixin/credentials.rb
@@ -16,7 +16,7 @@
#
require "tomlrb"
-require "chef-config/path_helper"
+require_relative "../path_helper"
module ChefConfig
module Mixin
diff --git a/chef-config/lib/chef-config/mixin/dot_d.rb b/chef-config/lib/chef-config/mixin/dot_d.rb
index 4c9c998908..3ccbfe19bb 100644
--- a/chef-config/lib/chef-config/mixin/dot_d.rb
+++ b/chef-config/lib/chef-config/mixin/dot_d.rb
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-require "chef-config/path_helper"
+require_relative "../path_helper"
module ChefConfig
module Mixin
diff --git a/chef-config/lib/chef-config/path_helper.rb b/chef-config/lib/chef-config/path_helper.rb
index de71d483d5..7e0f4361ce 100644
--- a/chef-config/lib/chef-config/path_helper.rb
+++ b/chef-config/lib/chef-config/path_helper.rb
@@ -16,9 +16,9 @@
# limitations under the License.
#
-require "chef-config/windows"
-require "chef-config/logger"
-require "chef-config/exceptions"
+require_relative "windows"
+require_relative "logger"
+require_relative "exceptions"
module ChefConfig
class PathHelper
diff --git a/chef-config/lib/chef-config/workstation_config_loader.rb b/chef-config/lib/chef-config/workstation_config_loader.rb
index af0c438ca1..a3aa40433a 100644
--- a/chef-config/lib/chef-config/workstation_config_loader.rb
+++ b/chef-config/lib/chef-config/workstation_config_loader.rb
@@ -16,13 +16,13 @@
# limitations under the License.
#
-require "chef-config/config"
-require "chef-config/exceptions"
-require "chef-config/logger"
-require "chef-config/path_helper"
-require "chef-config/windows"
-require "chef-config/mixin/dot_d"
-require "chef-config/mixin/credentials"
+require_relative "config"
+require_relative "exceptions"
+require_relative "logger"
+require_relative "path_helper"
+require_relative "windows"
+require_relative "mixin/dot_d"
+require_relative "mixin/credentials"
module ChefConfig
class WorkstationConfigLoader