summaryrefslogtreecommitdiff
path: root/lib/chef/util
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-05-08 17:03:26 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2019-05-08 17:03:26 -0700
commitbc7687e56763cedbd010cfd566aa2fc0c53bb194 (patch)
tree3d3e3eec51c847f23dc2955f9d058777bdea9a91 /lib/chef/util
parente793c825c857af87e745a8af479af71522ff20db (diff)
downloadchef-bc7687e56763cedbd010cfd566aa2fc0c53bb194.tar.gz
Convert require to require_relative
This gives a speed boost since rubygems does not have to scan through every gem in the gemset in order to find the file. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/util')
-rw-r--r--lib/chef/util/backup.rb2
-rw-r--r--lib/chef/util/dsc/configuration_generator.rb2
-rw-r--r--lib/chef/util/dsc/lcm_output_parser.rb6
-rw-r--r--lib/chef/util/dsc/local_configuration_manager.rb4
-rw-r--r--lib/chef/util/dsc/resource_store.rb6
-rw-r--r--lib/chef/util/file_edit.rb2
-rw-r--r--lib/chef/util/powershell/cmdlet.rb4
-rw-r--r--lib/chef/util/powershell/cmdlet_result.rb2
-rw-r--r--lib/chef/util/selinux.rb4
-rw-r--r--lib/chef/util/windows/logon_session.rb2
-rw-r--r--lib/chef/util/windows/net_group.rb4
-rw-r--r--lib/chef/util/windows/net_use.rb4
-rw-r--r--lib/chef/util/windows/net_user.rb8
-rw-r--r--lib/chef/util/windows/volume.rb4
14 files changed, 27 insertions, 27 deletions
diff --git a/lib/chef/util/backup.rb b/lib/chef/util/backup.rb
index 5b6bf0b9b8..08da52e3b2 100644
--- a/lib/chef/util/backup.rb
+++ b/lib/chef/util/backup.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require "chef/util/path_helper"
+require_relative "path_helper"
class Chef
class Util
diff --git a/lib/chef/util/dsc/configuration_generator.rb b/lib/chef/util/dsc/configuration_generator.rb
index 409730ce20..d7fe17f979 100644
--- a/lib/chef/util/dsc/configuration_generator.rb
+++ b/lib/chef/util/dsc/configuration_generator.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require "chef/util/powershell/cmdlet"
+require_relative "../powershell/cmdlet"
class Chef::Util::DSC
class ConfigurationGenerator
diff --git a/lib/chef/util/dsc/lcm_output_parser.rb b/lib/chef/util/dsc/lcm_output_parser.rb
index b164db6b19..63cc16fa39 100644
--- a/lib/chef/util/dsc/lcm_output_parser.rb
+++ b/lib/chef/util/dsc/lcm_output_parser.rb
@@ -16,9 +16,9 @@
# limitations under the License.
#
-require "chef/log"
-require "chef/util/dsc/resource_info"
-require "chef/exceptions"
+require_relative "../../log"
+require_relative "resource_info"
+require_relative "../../exceptions"
class Chef
class Util
diff --git a/lib/chef/util/dsc/local_configuration_manager.rb b/lib/chef/util/dsc/local_configuration_manager.rb
index 81aaa098c0..79c57c50c2 100644
--- a/lib/chef/util/dsc/local_configuration_manager.rb
+++ b/lib/chef/util/dsc/local_configuration_manager.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require "chef/util/powershell/cmdlet"
-require "chef/util/dsc/lcm_output_parser"
+require_relative "../powershell/cmdlet"
+require_relative "lcm_output_parser"
class Chef::Util::DSC
class LocalConfigurationManager
diff --git a/lib/chef/util/dsc/resource_store.rb b/lib/chef/util/dsc/resource_store.rb
index 43b7d1bdf9..8aab2783ed 100644
--- a/lib/chef/util/dsc/resource_store.rb
+++ b/lib/chef/util/dsc/resource_store.rb
@@ -16,9 +16,9 @@
# limitations under the License.
#
-require "chef/util/powershell/cmdlet"
-require "chef/util/powershell/cmdlet_result"
-require "chef/exceptions"
+require_relative "../powershell/cmdlet"
+require_relative "../powershell/cmdlet_result"
+require_relative "../../exceptions"
class Chef
class Util
diff --git a/lib/chef/util/file_edit.rb b/lib/chef/util/file_edit.rb
index 5a01e72e70..87496d56db 100644
--- a/lib/chef/util/file_edit.rb
+++ b/lib/chef/util/file_edit.rb
@@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-require "chef/util/editor"
+require_relative "editor"
require "fileutils"
class Chef
diff --git a/lib/chef/util/powershell/cmdlet.rb b/lib/chef/util/powershell/cmdlet.rb
index 480cc61572..d128b1cdc1 100644
--- a/lib/chef/util/powershell/cmdlet.rb
+++ b/lib/chef/util/powershell/cmdlet.rb
@@ -17,8 +17,8 @@
#
require "mixlib/shellout"
-require "chef/mixin/windows_architecture_helper"
-require "chef/util/powershell/cmdlet_result"
+require_relative "../../mixin/windows_architecture_helper"
+require_relative "cmdlet_result"
class Chef
class Util
diff --git a/lib/chef/util/powershell/cmdlet_result.rb b/lib/chef/util/powershell/cmdlet_result.rb
index 82aef4da40..c07d8fe178 100644
--- a/lib/chef/util/powershell/cmdlet_result.rb
+++ b/lib/chef/util/powershell/cmdlet_result.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require "chef/json_compat"
+require_relative "../../json_compat"
class Chef
class Util
diff --git a/lib/chef/util/selinux.rb b/lib/chef/util/selinux.rb
index a46e486f96..70fa9298b8 100644
--- a/lib/chef/util/selinux.rb
+++ b/lib/chef/util/selinux.rb
@@ -20,8 +20,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-require "chef/mixin/shell_out"
-require "chef/mixin/which"
+require_relative "../mixin/shell_out"
+require_relative "../mixin/which"
class Chef
class Util
diff --git a/lib/chef/util/windows/logon_session.rb b/lib/chef/util/windows/logon_session.rb
index afe58ae4f9..4a589c3b2a 100644
--- a/lib/chef/util/windows/logon_session.rb
+++ b/lib/chef/util/windows/logon_session.rb
@@ -17,7 +17,7 @@
#
require "chef/win32/api/security" if Chef::Platform.windows?
-require "chef/mixin/wide_string"
+require_relative "../../mixin/wide_string"
class Chef
class Util
diff --git a/lib/chef/util/windows/net_group.rb b/lib/chef/util/windows/net_group.rb
index 0d2a366c4f..a7aee67074 100644
--- a/lib/chef/util/windows/net_group.rb
+++ b/lib/chef/util/windows/net_group.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require "chef/util/windows"
-require "chef/win32/net"
+require_relative ""
+require_relative "../../win32/net"
# wrapper around a subset of the NetGroup* APIs.
class Chef::Util::Windows::NetGroup
diff --git a/lib/chef/util/windows/net_use.rb b/lib/chef/util/windows/net_use.rb
index 99626371a0..89b9a6f434 100644
--- a/lib/chef/util/windows/net_use.rb
+++ b/lib/chef/util/windows/net_use.rb
@@ -20,8 +20,8 @@
# see also: WNetAddConnection2 and WNetAddConnection3
# see also cmd.exe: net use /?
-require "chef/util/windows"
-require "chef/win32/net"
+require_relative ""
+require_relative "../../win32/net"
class Chef::Util::Windows::NetUse < Chef::Util::Windows
def initialize(localname)
diff --git a/lib/chef/util/windows/net_user.rb b/lib/chef/util/windows/net_user.rb
index 5d0dbf7a53..2af0521d1f 100644
--- a/lib/chef/util/windows/net_user.rb
+++ b/lib/chef/util/windows/net_user.rb
@@ -16,10 +16,10 @@
# limitations under the License.
#
-require "chef/util/windows"
-require "chef/exceptions"
-require "chef/win32/net"
-require "chef/win32/security"
+require_relative ""
+require_relative "../../exceptions"
+require_relative "../../win32/net"
+require_relative "../../win32/security"
# wrapper around a subset of the NetUser* APIs.
# nothing Chef specific, but not complete enough to be its own gem, so util for now.
diff --git a/lib/chef/util/windows/volume.rb b/lib/chef/util/windows/volume.rb
index ff5f46163f..a6467f4015 100644
--- a/lib/chef/util/windows/volume.rb
+++ b/lib/chef/util/windows/volume.rb
@@ -18,8 +18,8 @@
# simple wrapper around Volume APIs. might be possible with WMI, but possibly more complex.
-require "chef/win32/api/file"
-require "chef/util/windows"
+require_relative "../../win32/api/file"
+require_relative ""
class Chef::Util::Windows::Volume < Chef::Util::Windows
attr_reader :mount_point