summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-05-10 18:40:01 -0700
committerGitHub <noreply@github.com>2019-05-10 18:40:01 -0700
commitbf09c464a074939d4b5e9bcbdb4699317d517d3c (patch)
treefbb2953cf03d556b05cf1b4e830fa87d5393a3c1
parent91ef348e8039ea181f785a714fa317d421ac439e (diff)
parent6800edf1709df2a2de4aaa134e6b65879fdd61af (diff)
downloadchef-bf09c464a074939d4b5e9bcbdb4699317d517d3c.tar.gz
Merge pull request #8519 from chef/lcg/use-require-relative2
Change some more require to require_relative
-rw-r--r--lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb2
-rw-r--r--lib/chef/chef_fs/file_system/repository/nodes_dir.rb2
-rw-r--r--lib/chef/dsl/declare_resource.rb2
-rw-r--r--lib/chef/local_mode.rb2
-rw-r--r--lib/chef/log.rb2
-rw-r--r--lib/chef/mixin/user_context.rb2
-rw-r--r--lib/chef/mixin/windows_architecture_helper.rb4
-rw-r--r--lib/chef/mixin/windows_env_helper.rb6
-rw-r--r--lib/chef/provider/package/windows/msi.rb2
-rw-r--r--lib/chef/provider/script.rb2
-rw-r--r--lib/chef/provider/user/windows.rb2
-rw-r--r--lib/chef/provider/windows_path.rb2
-rw-r--r--lib/chef/resource/cron.rb2
-rw-r--r--lib/chef/resource/lwrp_base.rb2
-rw-r--r--lib/chef/resource/windows_package.rb2
-rw-r--r--lib/chef/resource/windows_task.rb2
-rw-r--r--lib/chef/util/powershell/ps_credential.rb2
-rw-r--r--lib/chef/util/windows/logon_session.rb2
18 files changed, 21 insertions, 21 deletions
diff --git a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb
index a180cd1e2e..30ccf8c736 100644
--- a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb
+++ b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb
@@ -44,7 +44,7 @@ require_relative "../../data_handler/role_data_handler"
require_relative "../../data_handler/user_data_handler"
require_relative "../../data_handler/group_data_handler"
require_relative "../../data_handler/container_data_handler"
-require "chef/win32/security" if Chef::Platform.windows?
+require_relative "../../../win32/security" if Chef::Platform.windows?
class Chef
module ChefFS
diff --git a/lib/chef/chef_fs/file_system/repository/nodes_dir.rb b/lib/chef/chef_fs/file_system/repository/nodes_dir.rb
index 267c255cf0..3edd442121 100644
--- a/lib/chef/chef_fs/file_system/repository/nodes_dir.rb
+++ b/lib/chef/chef_fs/file_system/repository/nodes_dir.rb
@@ -20,7 +20,7 @@
require_relative "node"
require_relative "directory"
require_relative "../exceptions"
-require "chef/win32/security" if Chef::Platform.windows?
+require_relative "../../../win32/security" if Chef::Platform.windows?
class Chef
module ChefFS
diff --git a/lib/chef/dsl/declare_resource.rb b/lib/chef/dsl/declare_resource.rb
index bf1a6bcbcc..f23ef466fb 100644
--- a/lib/chef/dsl/declare_resource.rb
+++ b/lib/chef/dsl/declare_resource.rb
@@ -300,7 +300,7 @@ class Chef
# this needs to be lazy in order to avoid circular dependencies since ResourceBuilder
# will requires the entire provider+resolver universe
- require "chef/resource_builder" unless defined?(Chef::ResourceBuilder)
+ require_relative "../resource_builder" unless defined?(Chef::ResourceBuilder)
Chef::ResourceBuilder.new(
type: type,
diff --git a/lib/chef/local_mode.rb b/lib/chef/local_mode.rb
index 36a771e00d..b78c84581b 100644
--- a/lib/chef/local_mode.rb
+++ b/lib/chef/local_mode.rb
@@ -16,7 +16,7 @@
# limitations under the License.
require_relative "config"
-require "chef/monkey_patches/webrick-utils" if Chef::Platform.windows?
+require_relative "monkey_patches/webrick-utils" if Chef::Platform.windows?
class Chef
module LocalMode
diff --git a/lib/chef/log.rb b/lib/chef/log.rb
index 908a6b2b9c..99915120a0 100644
--- a/lib/chef/log.rb
+++ b/lib/chef/log.rb
@@ -21,7 +21,7 @@ require "logger"
require_relative "monologger"
require_relative "exceptions"
require "mixlib/log"
-require "chef/log/syslog" unless RUBY_PLATFORM =~ /mswin|mingw|windows/
+require_relative "log/syslog" unless RUBY_PLATFORM =~ /mswin|mingw|windows/
require_relative "log/winevt"
class Chef
diff --git a/lib/chef/mixin/user_context.rb b/lib/chef/mixin/user_context.rb
index f5c2da1389..c49bdc7880 100644
--- a/lib/chef/mixin/user_context.rb
+++ b/lib/chef/mixin/user_context.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require "chef/util/windows/logon_session" if Chef::Platform.windows?
+require_relative "../util/windows/logon_session" if Chef::Platform.windows?
class Chef
module Mixin
diff --git a/lib/chef/mixin/windows_architecture_helper.rb b/lib/chef/mixin/windows_architecture_helper.rb
index 18dfa2010a..44056900a4 100644
--- a/lib/chef/mixin/windows_architecture_helper.rb
+++ b/lib/chef/mixin/windows_architecture_helper.rb
@@ -18,8 +18,8 @@
require_relative "../exceptions"
require_relative "../platform/query_helpers"
-require "chef/win32/process" if Chef::Platform.windows?
-require "chef/win32/system" if Chef::Platform.windows?
+require_relative "../win32/process" if Chef::Platform.windows?
+require_relative "../win32/system" if Chef::Platform.windows?
class Chef
module Mixin
diff --git a/lib/chef/mixin/windows_env_helper.rb b/lib/chef/mixin/windows_env_helper.rb
index b8c11803fa..6a5240c005 100644
--- a/lib/chef/mixin/windows_env_helper.rb
+++ b/lib/chef/mixin/windows_env_helper.rb
@@ -19,9 +19,9 @@
require_relative "../exceptions"
require_relative "wide_string"
require_relative "../platform/query_helpers"
-require "chef/win32/error" if Chef::Platform.windows?
-require "chef/win32/api/system" if Chef::Platform.windows?
-require "chef/win32/api/unicode" if Chef::Platform.windows?
+require_relative "../win32/error" if Chef::Platform.windows?
+require_relative "../win32/api/system" if Chef::Platform.windows?
+require_relative "../win32/api/unicode" if Chef::Platform.windows?
class Chef
module Mixin
diff --git a/lib/chef/provider/package/windows/msi.rb b/lib/chef/provider/package/windows/msi.rb
index 464e15ada8..870aff6865 100644
--- a/lib/chef/provider/package/windows/msi.rb
+++ b/lib/chef/provider/package/windows/msi.rb
@@ -18,7 +18,7 @@
# TODO: Allow new_resource.source to be a Product Code as a GUID for uninstall / network install
-require "chef/win32/api/installer" if (RUBY_PLATFORM =~ /mswin|mingw32|windows/) && Chef::Platform.supports_msi?
+require_relative "../../../win32/api/installer" if (RUBY_PLATFORM =~ /mswin|mingw32|windows/) && Chef::Platform.supports_msi?
require_relative "../../../mixin/shell_out"
class Chef
diff --git a/lib/chef/provider/script.rb b/lib/chef/provider/script.rb
index 7c55cff167..8d33c56da2 100644
--- a/lib/chef/provider/script.rb
+++ b/lib/chef/provider/script.rb
@@ -18,7 +18,7 @@
require "tempfile"
require_relative "execute"
-require "chef/win32/security" if Chef::Platform.windows?
+require_relative "../win32/security" if Chef::Platform.windows?
require "forwardable"
class Chef
diff --git a/lib/chef/provider/user/windows.rb b/lib/chef/provider/user/windows.rb
index 9141e98391..8a070f0d47 100644
--- a/lib/chef/provider/user/windows.rb
+++ b/lib/chef/provider/user/windows.rb
@@ -18,7 +18,7 @@
require_relative "../user"
require_relative "../../exceptions"
-require "chef/util/windows/net_user" if Chef::Platform.windows?
+require_relative "../../util/windows/net_user" if Chef::Platform.windows?
class Chef
class Provider
diff --git a/lib/chef/provider/windows_path.rb b/lib/chef/provider/windows_path.rb
index e0c686d025..859efdde38 100644
--- a/lib/chef/provider/windows_path.rb
+++ b/lib/chef/provider/windows_path.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require "chef/mixin/windows_env_helper" if Chef::Platform.windows?
+require_relative "../mixin/windows_env_helper" if Chef::Platform.windows?
require_relative "../mixin/wide_string"
require_relative "../exceptions"
diff --git a/lib/chef/resource/cron.rb b/lib/chef/resource/cron.rb
index 87feee8967..d942b10183 100644
--- a/lib/chef/resource/cron.rb
+++ b/lib/chef/resource/cron.rb
@@ -18,7 +18,7 @@
#
require_relative "../resource"
-require "chef/provider/cron" # do not remove. we actually need this below
+require_relative "../provider/cron" # do not remove. we actually need this below
class Chef
class Resource
diff --git a/lib/chef/resource/lwrp_base.rb b/lib/chef/resource/lwrp_base.rb
index cfbc3d8632..54936725b1 100644
--- a/lib/chef/resource/lwrp_base.rb
+++ b/lib/chef/resource/lwrp_base.rb
@@ -25,7 +25,7 @@ require_relative "../log"
require_relative "../exceptions"
require_relative "../mixin/convert_to_class_name"
require_relative "../mixin/from_file"
-require "chef/mixin/params_validate" # for DelayedEvaluator
+require_relative "../mixin/params_validate" # for DelayedEvaluator
class Chef
class Resource
diff --git a/lib/chef/resource/windows_package.rb b/lib/chef/resource/windows_package.rb
index 46409265b3..b1ee7096b6 100644
--- a/lib/chef/resource/windows_package.rb
+++ b/lib/chef/resource/windows_package.rb
@@ -19,7 +19,7 @@
require_relative "../mixin/uris"
require_relative "package"
require_relative "../provider/package/windows"
-require "chef/win32/error" if RUBY_PLATFORM =~ /mswin|mingw|windows/
+require_relative "../win32/error" if RUBY_PLATFORM =~ /mswin|mingw|windows/
class Chef
class Resource
diff --git a/lib/chef/resource/windows_task.rb b/lib/chef/resource/windows_task.rb
index 9ec6e04abd..56504e1f17 100644
--- a/lib/chef/resource/windows_task.rb
+++ b/lib/chef/resource/windows_task.rb
@@ -17,7 +17,7 @@
#
require_relative "../resource"
-require "chef/win32/security" if Chef::Platform.windows?
+require_relative "../win32/security" if Chef::Platform.windows?
class Chef
class Resource
diff --git a/lib/chef/util/powershell/ps_credential.rb b/lib/chef/util/powershell/ps_credential.rb
index 32810b98a6..25159e3486 100644
--- a/lib/chef/util/powershell/ps_credential.rb
+++ b/lib/chef/util/powershell/ps_credential.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require "chef/win32/crypto" if Chef::Platform.windows?
+require_relative "../../win32/crypto" if Chef::Platform.windows?
class Chef::Util::Powershell
class PSCredential
diff --git a/lib/chef/util/windows/logon_session.rb b/lib/chef/util/windows/logon_session.rb
index 4a589c3b2a..2e1f19b001 100644
--- a/lib/chef/util/windows/logon_session.rb
+++ b/lib/chef/util/windows/logon_session.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require "chef/win32/api/security" if Chef::Platform.windows?
+require_relative "../../win32/api/security" if Chef::Platform.windows?
require_relative "../../mixin/wide_string"
class Chef