diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-05-08 17:03:26 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-05-08 17:03:26 -0700 |
commit | bc7687e56763cedbd010cfd566aa2fc0c53bb194 (patch) | |
tree | 3d3e3eec51c847f23dc2955f9d058777bdea9a91 /lib | |
parent | e793c825c857af87e745a8af479af71522ff20db (diff) | |
download | chef-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')
732 files changed, 2308 insertions, 2308 deletions
diff --git a/lib/chef.rb b/lib/chef.rb index 8869a5a890..945e9a6fe8 100644 --- a/lib/chef.rb +++ b/lib/chef.rb @@ -16,20 +16,20 @@ # limitations under the License. # -require "chef/version" +require_relative "chef/version" -require "chef/nil_argument" -require "chef/mash" -require "chef/exceptions" -require "chef/log" -require "chef/config" -require "chef/providers" -require "chef/resources" +require_relative "chef/nil_argument" +require_relative "chef/mash" +require_relative "chef/exceptions" +require_relative "chef/log" +require_relative "chef/config" +require_relative "chef/providers" +require_relative "chef/resources" -require "chef/daemon" +require_relative "chef/daemon" -require "chef/run_status" -require "chef/handler" -require "chef/handler/json_file" -require "chef/event_dispatch/dsl" -require "chef/chef_class" +require_relative "chef/run_status" +require_relative "chef/handler" +require_relative "chef/handler/json_file" +require_relative "chef/event_dispatch/dsl" +require_relative "chef/chef_class" diff --git a/lib/chef/action_collection.rb b/lib/chef/action_collection.rb index a74ae5c449..af28bf8542 100644 --- a/lib/chef/action_collection.rb +++ b/lib/chef/action_collection.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/event_dispatch/base" +require_relative "event_dispatch/base" class Chef class ActionCollection < EventDispatch::Base diff --git a/lib/chef/api_client.rb b/lib/chef/api_client.rb index 1bd06652c5..5c78da41ec 100644 --- a/lib/chef/api_client.rb +++ b/lib/chef/api_client.rb @@ -17,13 +17,13 @@ # limitations under the License. # -require "chef/config" -require "chef/mixin/params_validate" -require "chef/mixin/from_file" -require "chef/mash" -require "chef/json_compat" -require "chef/search/query" -require "chef/server_api" +require_relative "config" +require_relative "mixin/params_validate" +require_relative "mixin/from_file" +require_relative "mash" +require_relative "json_compat" +require_relative "search/query" +require_relative "server_api" # DEPRECATION NOTE # diff --git a/lib/chef/api_client/registration.rb b/lib/chef/api_client/registration.rb index dd214d7812..21ce6f9179 100644 --- a/lib/chef/api_client/registration.rb +++ b/lib/chef/api_client/registration.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/config" -require "chef/server_api" -require "chef/exceptions" +require_relative "../config" +require_relative "../server_api" +require_relative "../exceptions" require "fileutils" class Chef diff --git a/lib/chef/api_client_v1.rb b/lib/chef/api_client_v1.rb index 3a2dafa3a8..513d546e64 100644 --- a/lib/chef/api_client_v1.rb +++ b/lib/chef/api_client_v1.rb @@ -17,16 +17,16 @@ # limitations under the License. # -require "chef/config" -require "chef/mixin/params_validate" -require "chef/mixin/from_file" -require "chef/mash" -require "chef/json_compat" -require "chef/search/query" -require "chef/exceptions" -require "chef/mixin/api_version_request_handling" -require "chef/server_api" -require "chef/api_client" +require_relative "config" +require_relative "mixin/params_validate" +require_relative "mixin/from_file" +require_relative "mash" +require_relative "json_compat" +require_relative "search/query" +require_relative "exceptions" +require_relative "mixin/api_version_request_handling" +require_relative "server_api" +require_relative "api_client" # COMPATIBILITY NOTE # diff --git a/lib/chef/application.rb b/lib/chef/application.rb index 7388e3d22d..7a69d549c4 100644 --- a/lib/chef/application.rb +++ b/lib/chef/application.rb @@ -18,17 +18,17 @@ require "pp" require "socket" -require "chef/config" -require "chef/config_fetcher" -require "chef/exceptions" -require "chef/local_mode" -require "chef/log" -require "chef/platform" +require_relative "config" +require_relative "config_fetcher" +require_relative "exceptions" +require_relative "local_mode" +require_relative "log" +require_relative "platform" require "mixlib/cli" require "tmpdir" require "rbconfig" -require "chef/application/exit_code" -require "chef/dist" +require_relative "application/exit_code" +require_relative "dist" require "license_acceptance/acceptor" class Chef diff --git a/lib/chef/application/apply.rb b/lib/chef/application/apply.rb index 715e0152d2..31713b32e7 100644 --- a/lib/chef/application/apply.rb +++ b/lib/chef/application/apply.rb @@ -17,16 +17,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef" -require "chef/application" -require "chef/client" -require "chef/config" -require "chef/log" +require_relative ".." +require_relative "" +require_relative "../client" +require_relative "../config" +require_relative "../log" require "fileutils" require "tempfile" -require "chef/providers" -require "chef/resources" -require "chef/dist" +require_relative "../providers" +require_relative "../resources" +require_relative "../dist" class Chef::Application::Apply < Chef::Application diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb index 2c63a54f33..94f681b709 100644 --- a/lib/chef/application/client.rb +++ b/lib/chef/application/client.rb @@ -17,19 +17,19 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/application" -require "chef/client" -require "chef/config" -require "chef/daemon" -require "chef/log" -require "chef/config_fetcher" -require "chef/handler/error_report" -require "chef/workstation_config_loader" -require "chef/mixin/shell_out" +require_relative "" +require_relative "../client" +require_relative "../config" +require_relative "../daemon" +require_relative "../log" +require_relative "../config_fetcher" +require_relative "../handler/error_report" +require_relative "../workstation_config_loader" +require_relative "../mixin/shell_out" require "chef-config/mixin/dot_d" require "mixlib/archive" require "uri" -require "chef/dist" +require_relative "../dist" require "license_acceptance/cli_flags/mixlib_cli" class Chef::Application::Client < Chef::Application diff --git a/lib/chef/application/exit_code.rb b/lib/chef/application/exit_code.rb index 5330db2456..7001cb1837 100644 --- a/lib/chef/application/exit_code.rb +++ b/lib/chef/application/exit_code.rb @@ -22,7 +22,7 @@ class Chef # These are the exit codes defined in Chef RFC 062 # https://github.com/chef/chef-rfc/blob/master/rfc062-exit-status.md class ExitCode - require "chef/dist" + require_relative "../dist" # -1 is defined as DEPRECATED_FAILURE in RFC 062, so it is # not enumerated in an active constant. diff --git a/lib/chef/application/knife.rb b/lib/chef/application/knife.rb index 52d447891f..eb6581c2d8 100644 --- a/lib/chef/application/knife.rb +++ b/lib/chef/application/knife.rb @@ -15,12 +15,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/knife" -require "chef/application" +require_relative "../knife" +require_relative "" require "mixlib/log" require "ohai/config" require "chef/monkey_patches/net_http.rb" -require "chef/dist" +require_relative "../dist" class Chef::Application::Knife < Chef::Application diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb index b1957fbf7c..67acee8de8 100644 --- a/lib/chef/application/solo.rb +++ b/lib/chef/application/solo.rb @@ -16,20 +16,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef" -require "chef/application" -require "chef/application/client" -require "chef/client" -require "chef/config" -require "chef/daemon" -require "chef/log" -require "chef/config_fetcher" +require_relative ".." +require_relative "" +require_relative "client" +require_relative "../client" +require_relative "../config" +require_relative "../daemon" +require_relative "../log" +require_relative "../config_fetcher" require "fileutils" -require "chef/mixin/shell_out" +require_relative "../mixin/shell_out" require "pathname" require "chef-config/mixin/dot_d" require "mixlib/archive" -require "chef/dist" +require_relative "../dist" class Chef::Application::Solo < Chef::Application include Chef::Mixin::ShellOut diff --git a/lib/chef/application/windows_service.rb b/lib/chef/application/windows_service.rb index cba0dc9781..6bbc7c6d0b 100644 --- a/lib/chef/application/windows_service.rb +++ b/lib/chef/application/windows_service.rb @@ -16,20 +16,20 @@ # limitations under the License. # -require "chef" -require "chef/monologger" -require "chef/application" -require "chef/client" -require "chef/config" -require "chef/handler/error_report" -require "chef/log" -require "chef/http" +require_relative ".." +require_relative "../monologger" +require_relative "" +require_relative "../client" +require_relative "../config" +require_relative "../handler/error_report" +require_relative "../log" +require_relative "../http" require "mixlib/cli" require "socket" require "uri" require "win32/daemon" -require "chef/mixin/shell_out" -require "chef/dist" +require_relative "../mixin/shell_out" +require_relative "../dist" class Chef class Application diff --git a/lib/chef/application/windows_service_manager.rb b/lib/chef/application/windows_service_manager.rb index 2646d98624..4a2bfa258e 100644 --- a/lib/chef/application/windows_service_manager.rb +++ b/lib/chef/application/windows_service_manager.rb @@ -19,9 +19,9 @@ if RUBY_PLATFORM =~ /mswin|mingw32|windows/ require "win32/service" end -require "chef/config" +require_relative "../config" require "mixlib/cli" -require "chef/dist" +require_relative "../dist" class Chef class Application diff --git a/lib/chef/applications.rb b/lib/chef/applications.rb index 97c896e12e..a30b765c77 100644 --- a/lib/chef/applications.rb +++ b/lib/chef/applications.rb @@ -1,4 +1,4 @@ -require "chef/application/client" -require "chef/application/knife" -require "chef/application/solo" -require "chef/application/apply" +require_relative "application/client" +require_relative "application/knife" +require_relative "application/solo" +require_relative "application/apply" diff --git a/lib/chef/blacklist.rb b/lib/chef/blacklist.rb index a49c318295..b304934a98 100644 --- a/lib/chef/blacklist.rb +++ b/lib/chef/blacklist.rb @@ -1,5 +1,5 @@ -require "chef/exceptions" +require_relative "exceptions" class Chef class Blacklist diff --git a/lib/chef/chef_class.rb b/lib/chef/chef_class.rb index 95b03f1c5c..dccab726ed 100644 --- a/lib/chef/chef_class.rb +++ b/lib/chef/chef_class.rb @@ -26,13 +26,13 @@ # injected" into this class by other objects and do not reference the class symbols in those files # directly and we do not need to require those files here. -require "chef/platform/provider_priority_map" -require "chef/platform/resource_priority_map" -require "chef/platform/provider_handler_map" -require "chef/platform/resource_handler_map" -require "chef/deprecated" -require "chef/event_dispatch/dsl" -require "chef/deprecated" +require_relative "platform/provider_priority_map" +require_relative "platform/resource_priority_map" +require_relative "platform/provider_handler_map" +require_relative "platform/resource_handler_map" +require_relative "deprecated" +require_relative "event_dispatch/dsl" +require_relative "deprecated" class Chef class << self diff --git a/lib/chef/chef_fs.rb b/lib/chef/chef_fs.rb index 43a9efd5e2..dbf02bd103 100644 --- a/lib/chef/chef_fs.rb +++ b/lib/chef/chef_fs.rb @@ -1,4 +1,4 @@ -require "chef/platform" +require_relative "platform" # # ChefFS was designed to be a near-1:1 translation between Chef server endpoints diff --git a/lib/chef/chef_fs/chef_fs_data_store.rb b/lib/chef/chef_fs/chef_fs_data_store.rb index 3f8a047c6d..b00c28e252 100644 --- a/lib/chef/chef_fs/chef_fs_data_store.rb +++ b/lib/chef/chef_fs/chef_fs_data_store.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/cookbook_manifest" +require_relative "../cookbook_manifest" require "chef_zero/data_store/memory_store" require "chef_zero/data_store/data_already_exists_error" require "chef_zero/data_store/data_not_found_error" -require "chef/chef_fs/file_pattern" -require "chef/chef_fs/file_system" -require "chef/chef_fs/file_system/exceptions" -require "chef/chef_fs/file_system/memory/memory_root" +require_relative "file_pattern" +require_relative "file_system" +require_relative "file_system/exceptions" +require_relative "file_system/memory/memory_root" require "fileutils" class Chef diff --git a/lib/chef/chef_fs/command_line.rb b/lib/chef/chef_fs/command_line.rb index a61c68ceda..56c0c574e8 100644 --- a/lib/chef/chef_fs/command_line.rb +++ b/lib/chef/chef_fs/command_line.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system" -require "chef/chef_fs/file_system/exceptions" -require "chef/util/diff" +require_relative "file_system" +require_relative "file_system/exceptions" +require_relative "../util/diff" class Chef module ChefFS diff --git a/lib/chef/chef_fs/config.rb b/lib/chef/chef_fs/config.rb index 83efdad063..c6f6878c00 100644 --- a/lib/chef/chef_fs/config.rb +++ b/lib/chef/chef_fs/config.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/log" -require "chef/chef_fs/path_utils" +require_relative "../log" +require_relative "path_utils" class Chef module ChefFS @@ -172,7 +172,7 @@ class Chef end def create_chef_fs - require "chef/chef_fs/file_system/chef_server/chef_server_root_dir" + require_relative "file_system/chef_server/chef_server_root_dir" Chef::ChefFS::FileSystem::ChefServer::ChefServerRootDir.new("remote", @chef_config, cookbook_version: @cookbook_version) end @@ -181,7 +181,7 @@ class Chef end def create_local_fs - require "chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir" + require_relative "file_system/repository/chef_repository_file_system_root_dir" Chef::ChefFS::FileSystem::Repository::ChefRepositoryFileSystemRootDir.new(object_paths, Array(chef_config[:chef_repo_path]).flatten, @chef_config) end diff --git a/lib/chef/chef_fs/data_handler/acl_data_handler.rb b/lib/chef/chef_fs/data_handler/acl_data_handler.rb index 834fc5ca0b..e64f3d245c 100644 --- a/lib/chef/chef_fs/data_handler/acl_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/acl_data_handler.rb @@ -1,4 +1,4 @@ -require "chef/chef_fs/data_handler/data_handler_base" +require_relative "data_handler_base" class Chef module ChefFS diff --git a/lib/chef/chef_fs/data_handler/client_data_handler.rb b/lib/chef/chef_fs/data_handler/client_data_handler.rb index 6c01d8d54c..3e5c4f1b84 100644 --- a/lib/chef/chef_fs/data_handler/client_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/client_data_handler.rb @@ -1,5 +1,5 @@ -require "chef/chef_fs/data_handler/data_handler_base" -require "chef/api_client" +require_relative "data_handler_base" +require_relative "../../api_client" class Chef module ChefFS diff --git a/lib/chef/chef_fs/data_handler/client_key_data_handler.rb b/lib/chef/chef_fs/data_handler/client_key_data_handler.rb index 6276413bcf..fc81a658cf 100644 --- a/lib/chef/chef_fs/data_handler/client_key_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/client_key_data_handler.rb @@ -1,5 +1,5 @@ -require "chef/chef_fs/data_handler/data_handler_base" -require "chef/api_client" +require_relative "data_handler_base" +require_relative "../../api_client" class Chef module ChefFS diff --git a/lib/chef/chef_fs/data_handler/container_data_handler.rb b/lib/chef/chef_fs/data_handler/container_data_handler.rb index a8bd5f084c..63663ea4ae 100644 --- a/lib/chef/chef_fs/data_handler/container_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/container_data_handler.rb @@ -1,4 +1,4 @@ -require "chef/chef_fs/data_handler/data_handler_base" +require_relative "data_handler_base" class Chef module ChefFS diff --git a/lib/chef/chef_fs/data_handler/cookbook_data_handler.rb b/lib/chef/chef_fs/data_handler/cookbook_data_handler.rb index 2861c5d3eb..222e6069f3 100644 --- a/lib/chef/chef_fs/data_handler/cookbook_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/cookbook_data_handler.rb @@ -1,5 +1,5 @@ -require "chef/chef_fs/data_handler/data_handler_base" -require "chef/cookbook/metadata" +require_relative "data_handler_base" +require_relative "../../cookbook/metadata" class Chef module ChefFS diff --git a/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb b/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb index 1254d8543c..855bb06dd7 100644 --- a/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb @@ -1,5 +1,5 @@ -require "chef/chef_fs/data_handler/data_handler_base" -require "chef/data_bag_item" +require_relative "data_handler_base" +require_relative "../../data_bag_item" class Chef module ChefFS diff --git a/lib/chef/chef_fs/data_handler/environment_data_handler.rb b/lib/chef/chef_fs/data_handler/environment_data_handler.rb index ab8104b483..e3aa242fc9 100644 --- a/lib/chef/chef_fs/data_handler/environment_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/environment_data_handler.rb @@ -1,5 +1,5 @@ -require "chef/chef_fs/data_handler/data_handler_base" -require "chef/environment" +require_relative "data_handler_base" +require_relative "../../environment" class Chef module ChefFS diff --git a/lib/chef/chef_fs/data_handler/group_data_handler.rb b/lib/chef/chef_fs/data_handler/group_data_handler.rb index 8daced2e2e..3fffec5d11 100644 --- a/lib/chef/chef_fs/data_handler/group_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/group_data_handler.rb @@ -1,5 +1,5 @@ -require "chef/chef_fs/data_handler/data_handler_base" -require "chef/api_client" +require_relative "data_handler_base" +require_relative "../../api_client" class Chef module ChefFS diff --git a/lib/chef/chef_fs/data_handler/node_data_handler.rb b/lib/chef/chef_fs/data_handler/node_data_handler.rb index a0087ec5d6..c4698afd2b 100644 --- a/lib/chef/chef_fs/data_handler/node_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/node_data_handler.rb @@ -1,5 +1,5 @@ -require "chef/chef_fs/data_handler/data_handler_base" -require "chef/node" +require_relative "data_handler_base" +require_relative "../../node" class Chef module ChefFS diff --git a/lib/chef/chef_fs/data_handler/organization_data_handler.rb b/lib/chef/chef_fs/data_handler/organization_data_handler.rb index 0a697ab69a..ebac7051f7 100644 --- a/lib/chef/chef_fs/data_handler/organization_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/organization_data_handler.rb @@ -1,4 +1,4 @@ -require "chef/chef_fs/data_handler/data_handler_base" +require_relative "data_handler_base" class Chef module ChefFS diff --git a/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb b/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb index 7ae08823b8..b3be2a962f 100644 --- a/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb @@ -1,4 +1,4 @@ -require "chef/chef_fs/data_handler/data_handler_base" +require_relative "data_handler_base" class Chef module ChefFS diff --git a/lib/chef/chef_fs/data_handler/organization_members_data_handler.rb b/lib/chef/chef_fs/data_handler/organization_members_data_handler.rb index 8e452a413c..944d3fa0a5 100644 --- a/lib/chef/chef_fs/data_handler/organization_members_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/organization_members_data_handler.rb @@ -1,4 +1,4 @@ -require "chef/chef_fs/data_handler/data_handler_base" +require_relative "data_handler_base" class Chef module ChefFS diff --git a/lib/chef/chef_fs/data_handler/policy_data_handler.rb b/lib/chef/chef_fs/data_handler/policy_data_handler.rb index 91c59f2a0b..082dc9ec09 100644 --- a/lib/chef/chef_fs/data_handler/policy_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/policy_data_handler.rb @@ -1,4 +1,4 @@ -require "chef/chef_fs/data_handler/data_handler_base" +require_relative "data_handler_base" class Chef module ChefFS diff --git a/lib/chef/chef_fs/data_handler/policy_group_data_handler.rb b/lib/chef/chef_fs/data_handler/policy_group_data_handler.rb index 397abdcc3e..bb0d4efb1c 100644 --- a/lib/chef/chef_fs/data_handler/policy_group_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/policy_group_data_handler.rb @@ -1,4 +1,4 @@ -require "chef/chef_fs/data_handler/data_handler_base" +require_relative "data_handler_base" class Chef module ChefFS diff --git a/lib/chef/chef_fs/data_handler/role_data_handler.rb b/lib/chef/chef_fs/data_handler/role_data_handler.rb index b26271f3e8..1007a29c8a 100644 --- a/lib/chef/chef_fs/data_handler/role_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/role_data_handler.rb @@ -1,5 +1,5 @@ -require "chef/chef_fs/data_handler/data_handler_base" -require "chef/role" +require_relative "data_handler_base" +require_relative "../../role" class Chef module ChefFS diff --git a/lib/chef/chef_fs/data_handler/user_data_handler.rb b/lib/chef/chef_fs/data_handler/user_data_handler.rb index 4da2f8225d..50a0c0682d 100644 --- a/lib/chef/chef_fs/data_handler/user_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/user_data_handler.rb @@ -1,4 +1,4 @@ -require "chef/chef_fs/data_handler/data_handler_base" +require_relative "data_handler_base" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_pattern.rb b/lib/chef/chef_fs/file_pattern.rb index 835e06eab7..36001de877 100644 --- a/lib/chef/chef_fs/file_pattern.rb +++ b/lib/chef/chef_fs/file_pattern.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs" -require "chef/chef_fs/path_utils" +require_relative "" +require_relative "path_utils" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system.rb b/lib/chef/chef_fs/file_system.rb index cbd8aa71d9..ff85a4a1b1 100644 --- a/lib/chef/chef_fs/file_system.rb +++ b/lib/chef/chef_fs/file_system.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/chef_fs/path_utils" -require "chef/chef_fs/file_system/exceptions" -require "chef/chef_fs/parallelizer" +require_relative "path_utils" +require_relative "file_system/exceptions" +require_relative "parallelizer" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/base_fs_dir.rb b/lib/chef/chef_fs/file_system/base_fs_dir.rb index 2827e5b384..2212d0b23f 100644 --- a/lib/chef/chef_fs/file_system/base_fs_dir.rb +++ b/lib/chef/chef_fs/file_system/base_fs_dir.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/file_system/base_fs_object" -require "chef/chef_fs/file_system/nonexistent_fs_object" +require_relative "base_fs_object" +require_relative "nonexistent_fs_object" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/base_fs_object.rb b/lib/chef/chef_fs/file_system/base_fs_object.rb index 9767b5b1ba..f7516232ac 100644 --- a/lib/chef/chef_fs/file_system/base_fs_object.rb +++ b/lib/chef/chef_fs/file_system/base_fs_object.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/path_utils" -require "chef/chef_fs/file_system/exceptions" +require_relative "../path_utils" +require_relative "exceptions" class Chef module ChefFS @@ -184,4 +184,4 @@ class Chef end end -require "chef/chef_fs/file_system/nonexistent_fs_object" +require_relative "nonexistent_fs_object" diff --git a/lib/chef/chef_fs/file_system/chef_server/acl_dir.rb b/lib/chef/chef_fs/file_system/chef_server/acl_dir.rb index 006098a0c9..8794d0dbb1 100644 --- a/lib/chef/chef_fs/file_system/chef_server/acl_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/acl_dir.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system/base_fs_dir" -require "chef/chef_fs/file_system/chef_server/acl_entry" -require "chef/chef_fs/file_system/exceptions" +require_relative "../base_fs_dir" +require_relative "acl_entry" +require_relative "../exceptions" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/acl_entry.rb b/lib/chef/chef_fs/file_system/chef_server/acl_entry.rb index 98091eaf9a..e08ac8f6fc 100644 --- a/lib/chef/chef_fs/file_system/chef_server/acl_entry.rb +++ b/lib/chef/chef_fs/file_system/chef_server/acl_entry.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/file_system/chef_server/rest_list_entry" -require "chef/chef_fs/file_system/exceptions" +require_relative "rest_list_entry" +require_relative "../exceptions" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/acls_dir.rb b/lib/chef/chef_fs/file_system/chef_server/acls_dir.rb index dbc895f85e..03b003586b 100644 --- a/lib/chef/chef_fs/file_system/chef_server/acls_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/acls_dir.rb @@ -16,12 +16,12 @@ # limitations under the License. # -require "chef/chef_fs/file_system/base_fs_dir" -require "chef/chef_fs/file_system/chef_server/acl_dir" -require "chef/chef_fs/file_system/chef_server/cookbooks_acl_dir" -require "chef/chef_fs/file_system/chef_server/policies_acl_dir" -require "chef/chef_fs/file_system/chef_server/acl_entry" -require "chef/chef_fs/data_handler/acl_data_handler" +require_relative "../base_fs_dir" +require_relative "acl_dir" +require_relative "cookbooks_acl_dir" +require_relative "policies_acl_dir" +require_relative "acl_entry" +require_relative "../../data_handler/acl_data_handler" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/chef_server_root_dir.rb b/lib/chef/chef_fs/file_system/chef_server/chef_server_root_dir.rb index 3447e3500a..d1d92f508e 100644 --- a/lib/chef/chef_fs/file_system/chef_server/chef_server_root_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/chef_server_root_dir.rb @@ -16,30 +16,30 @@ # limitations under the License. # -require "chef/server_api" -require "chef/chef_fs/file_system/chef_server/acls_dir" -require "chef/chef_fs/file_system/base_fs_dir" -require "chef/chef_fs/file_system/chef_server/rest_list_dir" -require "chef/chef_fs/file_system/chef_server/cookbooks_dir" -require "chef/chef_fs/file_system/chef_server/cookbook_artifacts_dir" -require "chef/chef_fs/file_system/chef_server/versioned_cookbooks_dir" -require "chef/chef_fs/file_system/chef_server/data_bags_dir" -require "chef/chef_fs/file_system/chef_server/nodes_dir" -require "chef/chef_fs/file_system/chef_server/org_entry" -require "chef/chef_fs/file_system/chef_server/organization_invites_entry" -require "chef/chef_fs/file_system/chef_server/organization_members_entry" -require "chef/chef_fs/file_system/chef_server/policies_dir" -require "chef/chef_fs/file_system/chef_server/policy_groups_dir" -require "chef/chef_fs/file_system/chef_server/environments_dir" -require "chef/chef_fs/data_handler/acl_data_handler" -require "chef/chef_fs/data_handler/client_data_handler" -require "chef/chef_fs/data_handler/environment_data_handler" -require "chef/chef_fs/data_handler/node_data_handler" -require "chef/chef_fs/data_handler/role_data_handler" -require "chef/chef_fs/data_handler/user_data_handler" -require "chef/chef_fs/data_handler/group_data_handler" -require "chef/chef_fs/data_handler/container_data_handler" -require "chef/chef_fs/data_handler/policy_group_data_handler" +require_relative "../../../server_api" +require_relative "acls_dir" +require_relative "../base_fs_dir" +require_relative "rest_list_dir" +require_relative "cookbooks_dir" +require_relative "cookbook_artifacts_dir" +require_relative "versioned_cookbooks_dir" +require_relative "data_bags_dir" +require_relative "nodes_dir" +require_relative "org_entry" +require_relative "organization_invites_entry" +require_relative "organization_members_entry" +require_relative "policies_dir" +require_relative "policy_groups_dir" +require_relative "environments_dir" +require_relative "../../data_handler/acl_data_handler" +require_relative "../../data_handler/client_data_handler" +require_relative "../../data_handler/environment_data_handler" +require_relative "../../data_handler/node_data_handler" +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_relative "../../data_handler/policy_group_data_handler" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/cookbook_artifact_dir.rb b/lib/chef/chef_fs/file_system/chef_server/cookbook_artifact_dir.rb index faea96e944..68468f62a0 100644 --- a/lib/chef/chef_fs/file_system/chef_server/cookbook_artifact_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/cookbook_artifact_dir.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/chef_fs/file_system/chef_server/cookbook_dir" +require_relative "cookbook_dir" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/cookbook_artifacts_dir.rb b/lib/chef/chef_fs/file_system/chef_server/cookbook_artifacts_dir.rb index e4df7858a7..6c1610876c 100644 --- a/lib/chef/chef_fs/file_system/chef_server/cookbook_artifacts_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/cookbook_artifacts_dir.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/file_system/chef_server/cookbooks_dir" -require "chef/chef_fs/file_system/chef_server/cookbook_artifact_dir" +require_relative "cookbooks_dir" +require_relative "cookbook_artifact_dir" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb b/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb index a619dc75bf..b8e1b7b43c 100644 --- a/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb @@ -16,13 +16,13 @@ # limitations under the License. # -require "chef/chef_fs/command_line" -require "chef/chef_fs/file_system/chef_server/rest_list_dir" -require "chef/chef_fs/file_system/chef_server/cookbook_subdir" -require "chef/chef_fs/file_system/chef_server/cookbook_file" -require "chef/chef_fs/file_system/exceptions" -require "chef/cookbook_version" -require "chef/cookbook_uploader" +require_relative "../../command_line" +require_relative "rest_list_dir" +require_relative "cookbook_subdir" +require_relative "cookbook_file" +require_relative "../exceptions" +require_relative "../../../cookbook_version" +require_relative "../../../cookbook_uploader" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/cookbook_file.rb b/lib/chef/chef_fs/file_system/chef_server/cookbook_file.rb index a680daacc0..0ee277abea 100644 --- a/lib/chef/chef_fs/file_system/chef_server/cookbook_file.rb +++ b/lib/chef/chef_fs/file_system/chef_server/cookbook_file.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/file_system/base_fs_object" -require "chef/http/simple" +require_relative "../base_fs_object" +require_relative "../../../http/simple" require "openssl" class Chef diff --git a/lib/chef/chef_fs/file_system/chef_server/cookbook_subdir.rb b/lib/chef/chef_fs/file_system/chef_server/cookbook_subdir.rb index 01297a39ba..d1b415baf1 100644 --- a/lib/chef/chef_fs/file_system/chef_server/cookbook_subdir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/cookbook_subdir.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/chef_fs/file_system/base_fs_dir" +require_relative "../base_fs_dir" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/cookbooks_acl_dir.rb b/lib/chef/chef_fs/file_system/chef_server/cookbooks_acl_dir.rb index e020d0fb34..548eb0200a 100644 --- a/lib/chef/chef_fs/file_system/chef_server/cookbooks_acl_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/cookbooks_acl_dir.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/chef_fs/file_system/chef_server/acl_dir" +require_relative "acl_dir" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb b/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb index 04d48d4e8e..c1bd3e5812 100644 --- a/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/chef_fs/file_system/chef_server/rest_list_dir" -require "chef/chef_fs/file_system/chef_server/cookbook_dir" -require "chef/chef_fs/file_system/exceptions" -require "chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir" -require "chef/mixin/file_class" +require_relative "rest_list_dir" +require_relative "cookbook_dir" +require_relative "../exceptions" +require_relative "../repository/chef_repository_file_system_cookbook_dir" +require_relative "../../../mixin/file_class" require "tmpdir" diff --git a/lib/chef/chef_fs/file_system/chef_server/data_bag_dir.rb b/lib/chef/chef_fs/file_system/chef_server/data_bag_dir.rb index 0102ea2844..fb8a537596 100644 --- a/lib/chef/chef_fs/file_system/chef_server/data_bag_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/data_bag_dir.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/chef_fs/file_system/chef_server/rest_list_dir" -require "chef/chef_fs/file_system/chef_server/data_bag_entry" -require "chef/chef_fs/file_system/exceptions" -require "chef/chef_fs/data_handler/data_bag_item_data_handler" +require_relative "rest_list_dir" +require_relative "data_bag_entry" +require_relative "../exceptions" +require_relative "../../data_handler/data_bag_item_data_handler" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/data_bag_entry.rb b/lib/chef/chef_fs/file_system/chef_server/data_bag_entry.rb index c0093058b7..19e0fb409e 100644 --- a/lib/chef/chef_fs/file_system/chef_server/data_bag_entry.rb +++ b/lib/chef/chef_fs/file_system/chef_server/data_bag_entry.rb @@ -1,5 +1,5 @@ -require "chef/chef_fs/file_system/chef_server/rest_list_entry" -require "chef/chef_fs/data_handler/data_bag_item_data_handler" +require_relative "rest_list_entry" +require_relative "../../data_handler/data_bag_item_data_handler" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/data_bags_dir.rb b/lib/chef/chef_fs/file_system/chef_server/data_bags_dir.rb index 6c7dd7b477..08793257dc 100644 --- a/lib/chef/chef_fs/file_system/chef_server/data_bags_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/data_bags_dir.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/file_system/chef_server/rest_list_dir" -require "chef/chef_fs/file_system/chef_server/data_bag_dir" +require_relative "rest_list_dir" +require_relative "data_bag_dir" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/environments_dir.rb b/lib/chef/chef_fs/file_system/chef_server/environments_dir.rb index e4714cf089..09ab30c799 100644 --- a/lib/chef/chef_fs/file_system/chef_server/environments_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/environments_dir.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system/base_fs_dir" -require "chef/chef_fs/file_system/chef_server/rest_list_entry" -require "chef/chef_fs/file_system/exceptions" +require_relative "../base_fs_dir" +require_relative "rest_list_entry" +require_relative "../exceptions" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/nodes_dir.rb b/lib/chef/chef_fs/file_system/chef_server/nodes_dir.rb index e56c68ffae..76897df093 100644 --- a/lib/chef/chef_fs/file_system/chef_server/nodes_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/nodes_dir.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/chef_fs/file_system/base_fs_dir" -require "chef/chef_fs/file_system/chef_server/rest_list_entry" -require "chef/chef_fs/file_system/exceptions" -require "chef/chef_fs/data_handler/node_data_handler" +require_relative "../base_fs_dir" +require_relative "rest_list_entry" +require_relative "../exceptions" +require_relative "../../data_handler/node_data_handler" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/org_entry.rb b/lib/chef/chef_fs/file_system/chef_server/org_entry.rb index 7253de3449..f2dfc944cd 100644 --- a/lib/chef/chef_fs/file_system/chef_server/org_entry.rb +++ b/lib/chef/chef_fs/file_system/chef_server/org_entry.rb @@ -1,5 +1,5 @@ -require "chef/chef_fs/file_system/chef_server/rest_list_entry" -require "chef/chef_fs/data_handler/organization_data_handler" +require_relative "rest_list_entry" +require_relative "../../data_handler/organization_data_handler" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/organization_invites_entry.rb b/lib/chef/chef_fs/file_system/chef_server/organization_invites_entry.rb index 02cde95880..bcb6b94edf 100644 --- a/lib/chef/chef_fs/file_system/chef_server/organization_invites_entry.rb +++ b/lib/chef/chef_fs/file_system/chef_server/organization_invites_entry.rb @@ -1,6 +1,6 @@ -require "chef/chef_fs/file_system/chef_server/rest_list_entry" -require "chef/chef_fs/data_handler/organization_invites_data_handler" -require "chef/json_compat" +require_relative "rest_list_entry" +require_relative "../../data_handler/organization_invites_data_handler" +require_relative "../../../json_compat" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/organization_members_entry.rb b/lib/chef/chef_fs/file_system/chef_server/organization_members_entry.rb index a31922d7c8..31c5f880f8 100644 --- a/lib/chef/chef_fs/file_system/chef_server/organization_members_entry.rb +++ b/lib/chef/chef_fs/file_system/chef_server/organization_members_entry.rb @@ -1,6 +1,6 @@ -require "chef/chef_fs/file_system/chef_server/rest_list_entry" -require "chef/chef_fs/data_handler/organization_members_data_handler" -require "chef/json_compat" +require_relative "rest_list_entry" +require_relative "../../data_handler/organization_members_data_handler" +require_relative "../../../json_compat" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/policies_acl_dir.rb b/lib/chef/chef_fs/file_system/chef_server/policies_acl_dir.rb index fa1d184b7d..ef9014505d 100644 --- a/lib/chef/chef_fs/file_system/chef_server/policies_acl_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/policies_acl_dir.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/chef_fs/file_system/chef_server/acl_dir" +require_relative "acl_dir" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb b/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb index df589a6cc0..d0674075c6 100644 --- a/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/file_system/chef_server/rest_list_dir" -require "chef/chef_fs/file_system/chef_server/policy_revision_entry" +require_relative "rest_list_dir" +require_relative "policy_revision_entry" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/policy_group_entry.rb b/lib/chef/chef_fs/file_system/chef_server/policy_group_entry.rb index f0d51a692f..3ecb7695cb 100644 --- a/lib/chef/chef_fs/file_system/chef_server/policy_group_entry.rb +++ b/lib/chef/chef_fs/file_system/chef_server/policy_group_entry.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/chef_fs/file_system/exceptions" +require_relative "../exceptions" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/policy_groups_dir.rb b/lib/chef/chef_fs/file_system/chef_server/policy_groups_dir.rb index 0452fa4573..23f7572a0b 100644 --- a/lib/chef/chef_fs/file_system/chef_server/policy_groups_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/policy_groups_dir.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/chef_fs/file_system/base_fs_dir" -require "chef/chef_fs/file_system/chef_server/rest_list_entry" -require "chef/chef_fs/file_system/exceptions" -require "chef/chef_fs/file_system/chef_server/policy_group_entry" +require_relative "../base_fs_dir" +require_relative "rest_list_entry" +require_relative "../exceptions" +require_relative "policy_group_entry" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/policy_revision_entry.rb b/lib/chef/chef_fs/file_system/chef_server/policy_revision_entry.rb index 325b18e429..9b99fea730 100644 --- a/lib/chef/chef_fs/file_system/chef_server/policy_revision_entry.rb +++ b/lib/chef/chef_fs/file_system/chef_server/policy_revision_entry.rb @@ -1,5 +1,5 @@ -require "chef/chef_fs/file_system/chef_server/rest_list_entry" -require "chef/chef_fs/data_handler/policy_data_handler" +require_relative "rest_list_entry" +require_relative "../../data_handler/policy_data_handler" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb b/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb index a58a01ae8c..7c5e01bf7e 100644 --- a/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system/base_fs_dir" -require "chef/chef_fs/file_system/chef_server/rest_list_entry" -require "chef/chef_fs/file_system/exceptions" +require_relative "../base_fs_dir" +require_relative "rest_list_entry" +require_relative "../exceptions" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb b/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb index 9eaae9c73f..94c6ee0656 100644 --- a/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb +++ b/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/chef_fs/file_system/base_fs_object" -require "chef/chef_fs/file_system/exceptions" -require "chef/role" -require "chef/node" -require "chef/json_compat" +require_relative "../base_fs_object" +require_relative "../exceptions" +require_relative "../../../role" +require_relative "../../../node" +require_relative "../../../json_compat" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/versioned_cookbook_dir.rb b/lib/chef/chef_fs/file_system/chef_server/versioned_cookbook_dir.rb index ae4422b82e..a091ddaf12 100644 --- a/lib/chef/chef_fs/file_system/chef_server/versioned_cookbook_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/versioned_cookbook_dir.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/chef_fs/file_system/chef_server/cookbook_dir" +require_relative "cookbook_dir" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/chef_server/versioned_cookbooks_dir.rb b/lib/chef/chef_fs/file_system/chef_server/versioned_cookbooks_dir.rb index 94c1a5b695..5973e01e41 100644 --- a/lib/chef/chef_fs/file_system/chef_server/versioned_cookbooks_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/versioned_cookbooks_dir.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/file_system/chef_server/cookbooks_dir" -require "chef/chef_fs/file_system/chef_server/versioned_cookbook_dir" +require_relative "cookbooks_dir" +require_relative "versioned_cookbook_dir" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/memory/memory_dir.rb b/lib/chef/chef_fs/file_system/memory/memory_dir.rb index 6049f404b1..fdef10ff56 100644 --- a/lib/chef/chef_fs/file_system/memory/memory_dir.rb +++ b/lib/chef/chef_fs/file_system/memory/memory_dir.rb @@ -1,5 +1,5 @@ -require "chef/chef_fs/file_system/base_fs_dir" -require "chef/chef_fs/file_system/memory/memory_file" +require_relative "../base_fs_dir" +require_relative "memory_file" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/memory/memory_file.rb b/lib/chef/chef_fs/file_system/memory/memory_file.rb index 6dcefc72eb..9201893dda 100644 --- a/lib/chef/chef_fs/file_system/memory/memory_file.rb +++ b/lib/chef/chef_fs/file_system/memory/memory_file.rb @@ -1,4 +1,4 @@ -require "chef/chef_fs/file_system/base_fs_object" +require_relative "../base_fs_object" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/memory/memory_root.rb b/lib/chef/chef_fs/file_system/memory/memory_root.rb index 4881b3d951..4a8b281389 100644 --- a/lib/chef/chef_fs/file_system/memory/memory_root.rb +++ b/lib/chef/chef_fs/file_system/memory/memory_root.rb @@ -1,4 +1,4 @@ -require "chef/chef_fs/file_system/memory/memory_dir" +require_relative "memory_dir" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/multiplexed_dir.rb b/lib/chef/chef_fs/file_system/multiplexed_dir.rb index 969a579532..2930dd5d8c 100644 --- a/lib/chef/chef_fs/file_system/multiplexed_dir.rb +++ b/lib/chef/chef_fs/file_system/multiplexed_dir.rb @@ -1,5 +1,5 @@ -require "chef/chef_fs/file_system/base_fs_object" -require "chef/chef_fs/file_system/nonexistent_fs_object" +require_relative "base_fs_object" +require_relative "nonexistent_fs_object" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/nonexistent_fs_object.rb b/lib/chef/chef_fs/file_system/nonexistent_fs_object.rb index 1a48d23047..e232c6bd07 100644 --- a/lib/chef/chef_fs/file_system/nonexistent_fs_object.rb +++ b/lib/chef/chef_fs/file_system/nonexistent_fs_object.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/file_system/base_fs_object" -require "chef/chef_fs/file_system/exceptions" +require_relative "base_fs_object" +require_relative "exceptions" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/acl.rb b/lib/chef/chef_fs/file_system/repository/acl.rb index 023ae11379..389c1fd38b 100644 --- a/lib/chef/chef_fs/file_system/repository/acl.rb +++ b/lib/chef/chef_fs/file_system/repository/acl.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/data_handler/acl_data_handler" -require "chef/chef_fs/file_system/repository/base_file" +require_relative "../../data_handler/acl_data_handler" +require_relative "base_file" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/acls_dir.rb b/lib/chef/chef_fs/file_system/repository/acls_dir.rb index ef30bef725..f97796d6b5 100644 --- a/lib/chef/chef_fs/file_system/repository/acls_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/acls_dir.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/acl" -require "chef/chef_fs/file_system/repository/directory" -require "chef/chef_fs/file_system/repository/acls_sub_dir" -require "chef/chef_fs/file_system/chef_server/acls_dir" -require "chef/chef_fs/data_handler/acl_data_handler" +require_relative "acl" +require_relative "directory" +require_relative "acls_sub_dir" +require_relative "../chef_server/acls_dir" +require_relative "../../data_handler/acl_data_handler" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/acls_sub_dir.rb b/lib/chef/chef_fs/file_system/repository/acls_sub_dir.rb index 70c7d77480..2386a03d0e 100644 --- a/lib/chef/chef_fs/file_system/repository/acls_sub_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/acls_sub_dir.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/acl" -require "chef/chef_fs/data_handler/acl_data_handler" -require "chef/chef_fs/file_system/repository/directory" +require_relative "acl" +require_relative "../../data_handler/acl_data_handler" +require_relative "directory" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/base_file.rb b/lib/chef/chef_fs/file_system/repository/base_file.rb index 76d242eee5..ade5fc2039 100644 --- a/lib/chef/chef_fs/file_system/repository/base_file.rb +++ b/lib/chef/chef_fs/file_system/repository/base_file.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/chef_fs/file_system_cache" +require_relative "../../file_system_cache" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_artifact_dir.rb b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_artifact_dir.rb index 83c13e5e20..8a6e375fde 100644 --- a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_artifact_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_artifact_dir.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir" +require_relative "chef_repository_file_system_cookbook_dir" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb index 8e64e3ca06..5098d55727 100644 --- a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry" -require "chef/chef_fs/file_system/chef_server/cookbook_dir" -require "chef/chef_fs/file_system/chef_server/versioned_cookbook_dir" -require "chef/chef_fs/file_system/exceptions" -require "chef/cookbook/cookbook_version_loader" +require_relative "chef_repository_file_system_cookbook_entry" +require_relative "../chef_server/cookbook_dir" +require_relative "../chef_server/versioned_cookbook_dir" +require_relative "../exceptions" +require_relative "../../../cookbook/cookbook_version_loader" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb index c840fad126..a6cae64c6d 100644 --- a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +++ b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/file_system_entry" -require "chef/chef_fs/file_system/repository/cookbooks_dir" -require "chef/chef_fs/file_system/exceptions" +require_relative "file_system_entry" +require_relative "cookbooks_dir" +require_relative "../exceptions" class Chef module ChefFS 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 5abd1c238b..a180cd1e2e 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 @@ -16,34 +16,34 @@ # limitations under the License. # -require "chef/chef_fs/file_system/base_fs_dir" -require "chef/chef_fs/file_system/repository/acls_dir" -require "chef/chef_fs/file_system/repository/clients_dir" -require "chef/chef_fs/file_system/repository/cookbooks_dir" -require "chef/chef_fs/file_system/repository/cookbook_artifacts_dir" -require "chef/chef_fs/file_system/repository/containers_dir" -require "chef/chef_fs/file_system/repository/data_bags_dir" -require "chef/chef_fs/file_system/repository/environments_dir" -require "chef/chef_fs/file_system/repository/groups_dir" -require "chef/chef_fs/file_system/repository/nodes_dir" -require "chef/chef_fs/file_system/repository/policy_groups_dir" -require "chef/chef_fs/file_system/repository/roles_dir" -require "chef/chef_fs/file_system/repository/users_dir" -require "chef/chef_fs/file_system/repository/client_keys_dir" -require "chef/chef_fs/file_system/repository/file_system_entry" -require "chef/chef_fs/file_system/repository/policies_dir" -require "chef/chef_fs/file_system/repository/versioned_cookbooks_dir" -require "chef/chef_fs/file_system/multiplexed_dir" -require "chef/chef_fs/data_handler/client_data_handler" -require "chef/chef_fs/data_handler/client_key_data_handler" -require "chef/chef_fs/data_handler/environment_data_handler" -require "chef/chef_fs/data_handler/node_data_handler" -require "chef/chef_fs/data_handler/policy_data_handler" -require "chef/chef_fs/data_handler/policy_group_data_handler" -require "chef/chef_fs/data_handler/role_data_handler" -require "chef/chef_fs/data_handler/user_data_handler" -require "chef/chef_fs/data_handler/group_data_handler" -require "chef/chef_fs/data_handler/container_data_handler" +require_relative "../base_fs_dir" +require_relative "acls_dir" +require_relative "clients_dir" +require_relative "cookbooks_dir" +require_relative "cookbook_artifacts_dir" +require_relative "containers_dir" +require_relative "data_bags_dir" +require_relative "environments_dir" +require_relative "groups_dir" +require_relative "nodes_dir" +require_relative "policy_groups_dir" +require_relative "roles_dir" +require_relative "users_dir" +require_relative "client_keys_dir" +require_relative "file_system_entry" +require_relative "policies_dir" +require_relative "versioned_cookbooks_dir" +require_relative "../multiplexed_dir" +require_relative "../../data_handler/client_data_handler" +require_relative "../../data_handler/client_key_data_handler" +require_relative "../../data_handler/environment_data_handler" +require_relative "../../data_handler/node_data_handler" +require_relative "../../data_handler/policy_data_handler" +require_relative "../../data_handler/policy_group_data_handler" +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? class Chef diff --git a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_versioned_cookbook_dir.rb b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_versioned_cookbook_dir.rb index 5dc74d85da..4fb214cff8 100644 --- a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_versioned_cookbook_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_versioned_cookbook_dir.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir" +require_relative "chef_repository_file_system_cookbook_dir" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/client.rb b/lib/chef/chef_fs/file_system/repository/client.rb index 6a99b7f005..6d747aa6cc 100644 --- a/lib/chef/chef_fs/file_system/repository/client.rb +++ b/lib/chef/chef_fs/file_system/repository/client.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/data_handler/client_data_handler" -require "chef/chef_fs/file_system/repository/base_file" +require_relative "../../data_handler/client_data_handler" +require_relative "base_file" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/client_key.rb b/lib/chef/chef_fs/file_system/repository/client_key.rb index 8ca4f85d2f..07b6bafafe 100644 --- a/lib/chef/chef_fs/file_system/repository/client_key.rb +++ b/lib/chef/chef_fs/file_system/repository/client_key.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/data_handler/client_key_data_handler" -require "chef/chef_fs/file_system/repository/base_file" +require_relative "../../data_handler/client_key_data_handler" +require_relative "base_file" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/client_keys_dir.rb b/lib/chef/chef_fs/file_system/repository/client_keys_dir.rb index 9e7e7b3d5c..7b5b29ea02 100644 --- a/lib/chef/chef_fs/file_system/repository/client_keys_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/client_keys_dir.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/client_keys_sub_dir" -require "chef/chef_fs/data_handler/client_key_data_handler" -require "chef/chef_fs/file_system/repository/directory" +require_relative "client_keys_sub_dir" +require_relative "../../data_handler/client_key_data_handler" +require_relative "directory" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/client_keys_sub_dir.rb b/lib/chef/chef_fs/file_system/repository/client_keys_sub_dir.rb index 6aafcfe294..0c6ad449b3 100644 --- a/lib/chef/chef_fs/file_system/repository/client_keys_sub_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/client_keys_sub_dir.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/client_key" -require "chef/chef_fs/data_handler/client_key_data_handler" -require "chef/chef_fs/file_system/repository/directory" +require_relative "client_key" +require_relative "../../data_handler/client_key_data_handler" +require_relative "directory" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/clients_dir.rb b/lib/chef/chef_fs/file_system/repository/clients_dir.rb index 01027f83ac..e3e7979cd2 100644 --- a/lib/chef/chef_fs/file_system/repository/clients_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/clients_dir.rb @@ -17,9 +17,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/client" -require "chef/chef_fs/file_system/repository/directory" -require "chef/chef_fs/file_system/exceptions" +require_relative "client" +require_relative "directory" +require_relative "../exceptions" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/container.rb b/lib/chef/chef_fs/file_system/repository/container.rb index e14a2ded73..7aefa3d482 100644 --- a/lib/chef/chef_fs/file_system/repository/container.rb +++ b/lib/chef/chef_fs/file_system/repository/container.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/data_handler/container_data_handler" -require "chef/chef_fs/file_system/repository/base_file" +require_relative "../../data_handler/container_data_handler" +require_relative "base_file" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/containers_dir.rb b/lib/chef/chef_fs/file_system/repository/containers_dir.rb index 2af496f418..892fe73244 100644 --- a/lib/chef/chef_fs/file_system/repository/containers_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/containers_dir.rb @@ -17,9 +17,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/container" -require "chef/chef_fs/file_system/repository/directory" -require "chef/chef_fs/file_system/exceptions" +require_relative "container" +require_relative "directory" +require_relative "../exceptions" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/cookbook_artifacts_dir.rb b/lib/chef/chef_fs/file_system/repository/cookbook_artifacts_dir.rb index 773d9a5e5a..c94430ea51 100644 --- a/lib/chef/chef_fs/file_system/repository/cookbook_artifacts_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/cookbook_artifacts_dir.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/cookbooks_dir" -require "chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_artifact_dir" +require_relative "cookbooks_dir" +require_relative "chef_repository_file_system_cookbook_artifact_dir" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/cookbooks_dir.rb b/lib/chef/chef_fs/file_system/repository/cookbooks_dir.rb index 86eca95ba8..1dfc1fcbc3 100644 --- a/lib/chef/chef_fs/file_system/repository/cookbooks_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/cookbooks_dir.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/directory" -require "chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir" -require "chef/cookbook/chefignore" +require_relative "directory" +require_relative "chef_repository_file_system_cookbook_dir" +require_relative "../../../cookbook/chefignore" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/data_bag.rb b/lib/chef/chef_fs/file_system/repository/data_bag.rb index fb3ad9da77..8d7fb977cf 100644 --- a/lib/chef/chef_fs/file_system/repository/data_bag.rb +++ b/lib/chef/chef_fs/file_system/repository/data_bag.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/directory" -require "chef/chef_fs/file_system/repository/data_bag_item" +require_relative "directory" +require_relative "data_bag_item" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/data_bag_item.rb b/lib/chef/chef_fs/file_system/repository/data_bag_item.rb index 2e3fb39606..c88fc3c153 100644 --- a/lib/chef/chef_fs/file_system/repository/data_bag_item.rb +++ b/lib/chef/chef_fs/file_system/repository/data_bag_item.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/data_handler/data_bag_item_data_handler" -require "chef/chef_fs/file_system/repository/base_file" +require_relative "../../data_handler/data_bag_item_data_handler" +require_relative "base_file" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/data_bags_dir.rb b/lib/chef/chef_fs/file_system/repository/data_bags_dir.rb index 666fede62b..8a0e03ae3f 100644 --- a/lib/chef/chef_fs/file_system/repository/data_bags_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/data_bags_dir.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/directory" -require "chef/chef_fs/file_system/repository/data_bag" +require_relative "directory" +require_relative "data_bag" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/directory.rb b/lib/chef/chef_fs/file_system/repository/directory.rb index d3f8d84324..f428e939d3 100644 --- a/lib/chef/chef_fs/file_system/repository/directory.rb +++ b/lib/chef/chef_fs/file_system/repository/directory.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/chef_fs/file_system_cache" +require_relative "../../file_system_cache" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/environment.rb b/lib/chef/chef_fs/file_system/repository/environment.rb index 9ef9741308..bc34ec7e07 100644 --- a/lib/chef/chef_fs/file_system/repository/environment.rb +++ b/lib/chef/chef_fs/file_system/repository/environment.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/data_handler/environment_data_handler" -require "chef/chef_fs/file_system/repository/base_file" +require_relative "../../data_handler/environment_data_handler" +require_relative "base_file" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/environments_dir.rb b/lib/chef/chef_fs/file_system/repository/environments_dir.rb index 4d04348d6e..3354f86329 100644 --- a/lib/chef/chef_fs/file_system/repository/environments_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/environments_dir.rb @@ -17,9 +17,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/environment" -require "chef/chef_fs/data_handler/environment_data_handler" -require "chef/chef_fs/file_system/repository/directory" +require_relative "environment" +require_relative "../../data_handler/environment_data_handler" +require_relative "directory" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/file_system_entry.rb b/lib/chef/chef_fs/file_system/repository/file_system_entry.rb index 183fcda26d..f015dc9e51 100644 --- a/lib/chef/chef_fs/file_system/repository/file_system_entry.rb +++ b/lib/chef/chef_fs/file_system/repository/file_system_entry.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/chef_fs/file_system/base_fs_dir" -require "chef/chef_fs/file_system/chef_server/rest_list_dir" -require "chef/chef_fs/file_system/exceptions" -require "chef/chef_fs/path_utils" +require_relative "../base_fs_dir" +require_relative "../chef_server/rest_list_dir" +require_relative "../exceptions" +require_relative "../../path_utils" require "fileutils" class Chef diff --git a/lib/chef/chef_fs/file_system/repository/group.rb b/lib/chef/chef_fs/file_system/repository/group.rb index 302e72739b..231d8d1003 100644 --- a/lib/chef/chef_fs/file_system/repository/group.rb +++ b/lib/chef/chef_fs/file_system/repository/group.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/data_handler/group_data_handler" -require "chef/chef_fs/file_system/repository/base_file" +require_relative "../../data_handler/group_data_handler" +require_relative "base_file" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/groups_dir.rb b/lib/chef/chef_fs/file_system/repository/groups_dir.rb index 20728d1248..0ecea2b87d 100644 --- a/lib/chef/chef_fs/file_system/repository/groups_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/groups_dir.rb @@ -17,9 +17,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/group" -require "chef/chef_fs/file_system/repository/directory" -require "chef/chef_fs/file_system/exceptions" +require_relative "group" +require_relative "directory" +require_relative "../exceptions" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/node.rb b/lib/chef/chef_fs/file_system/repository/node.rb index d8f0dec7c4..d3b9c26533 100644 --- a/lib/chef/chef_fs/file_system/repository/node.rb +++ b/lib/chef/chef_fs/file_system/repository/node.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/data_handler/node_data_handler" -require "chef/chef_fs/file_system/repository/base_file" +require_relative "../../data_handler/node_data_handler" +require_relative "base_file" 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 a0dd0c9e51..267c255cf0 100644 --- a/lib/chef/chef_fs/file_system/repository/nodes_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/nodes_dir.rb @@ -17,9 +17,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/node" -require "chef/chef_fs/file_system/repository/directory" -require "chef/chef_fs/file_system/exceptions" +require_relative "node" +require_relative "directory" +require_relative "../exceptions" require "chef/win32/security" if Chef::Platform.windows? class Chef diff --git a/lib/chef/chef_fs/file_system/repository/policies_dir.rb b/lib/chef/chef_fs/file_system/repository/policies_dir.rb index c74ea5469b..282a1db4ff 100644 --- a/lib/chef/chef_fs/file_system/repository/policies_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/policies_dir.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/policy" -require "chef/chef_fs/file_system/repository/directory" -require "chef/chef_fs/data_handler/policy_data_handler" +require_relative "policy" +require_relative "directory" +require_relative "../../data_handler/policy_data_handler" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/policy.rb b/lib/chef/chef_fs/file_system/repository/policy.rb index 695bf17e83..7cadd82498 100644 --- a/lib/chef/chef_fs/file_system/repository/policy.rb +++ b/lib/chef/chef_fs/file_system/repository/policy.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/data_handler/policy_data_handler" -require "chef/chef_fs/file_system/repository/base_file" +require_relative "../../data_handler/policy_data_handler" +require_relative "base_file" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/policy_group.rb b/lib/chef/chef_fs/file_system/repository/policy_group.rb index e4182847b6..31fad664ef 100644 --- a/lib/chef/chef_fs/file_system/repository/policy_group.rb +++ b/lib/chef/chef_fs/file_system/repository/policy_group.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/data_handler/policy_group_data_handler" -require "chef/chef_fs/file_system/repository/base_file" +require_relative "../../data_handler/policy_group_data_handler" +require_relative "base_file" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/policy_groups_dir.rb b/lib/chef/chef_fs/file_system/repository/policy_groups_dir.rb index 4db85a93f7..89c3f13d6c 100644 --- a/lib/chef/chef_fs/file_system/repository/policy_groups_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/policy_groups_dir.rb @@ -17,9 +17,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/policy_group" -require "chef/chef_fs/file_system/repository/directory" -require "chef/chef_fs/file_system/exceptions" +require_relative "policy_group" +require_relative "directory" +require_relative "../exceptions" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/role.rb b/lib/chef/chef_fs/file_system/repository/role.rb index d97ae0e7a1..2d55ef152c 100644 --- a/lib/chef/chef_fs/file_system/repository/role.rb +++ b/lib/chef/chef_fs/file_system/repository/role.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/data_handler/role_data_handler" -require "chef/chef_fs/file_system/repository/base_file" +require_relative "../../data_handler/role_data_handler" +require_relative "base_file" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/roles_dir.rb b/lib/chef/chef_fs/file_system/repository/roles_dir.rb index 42f4376e71..a18d2e9b70 100644 --- a/lib/chef/chef_fs/file_system/repository/roles_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/roles_dir.rb @@ -17,9 +17,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/role" -require "chef/chef_fs/file_system/repository/directory" -require "chef/chef_fs/file_system/exceptions" +require_relative "role" +require_relative "directory" +require_relative "../exceptions" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/user.rb b/lib/chef/chef_fs/file_system/repository/user.rb index 59355cc303..31ca6e6423 100644 --- a/lib/chef/chef_fs/file_system/repository/user.rb +++ b/lib/chef/chef_fs/file_system/repository/user.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/data_handler/user_data_handler" -require "chef/chef_fs/file_system/repository/base_file" +require_relative "../../data_handler/user_data_handler" +require_relative "base_file" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/users_dir.rb b/lib/chef/chef_fs/file_system/repository/users_dir.rb index 9e8621575b..76a74e6a1f 100644 --- a/lib/chef/chef_fs/file_system/repository/users_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/users_dir.rb @@ -17,9 +17,9 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/user" -require "chef/chef_fs/file_system/repository/directory" -require "chef/chef_fs/file_system/exceptions" +require_relative "user" +require_relative "directory" +require_relative "../exceptions" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system/repository/versioned_cookbooks_dir.rb b/lib/chef/chef_fs/file_system/repository/versioned_cookbooks_dir.rb index 80f77d02be..a792e5c64e 100644 --- a/lib/chef/chef_fs/file_system/repository/versioned_cookbooks_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/versioned_cookbooks_dir.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/chef_fs/file_system/repository/cookbooks_dir" -require "chef/chef_fs/file_system/repository/chef_repository_file_system_versioned_cookbook_dir" +require_relative "cookbooks_dir" +require_relative "chef_repository_file_system_versioned_cookbook_dir" class Chef module ChefFS diff --git a/lib/chef/chef_fs/file_system_cache.rb b/lib/chef/chef_fs/file_system_cache.rb index 7b6c4c148f..fe7c600ab3 100644 --- a/lib/chef/chef_fs/file_system_cache.rb +++ b/lib/chef/chef_fs/file_system_cache.rb @@ -16,7 +16,7 @@ # require "singleton" -require "chef/client" +require_relative "../client" class Chef module ChefFS diff --git a/lib/chef/chef_fs/knife.rb b/lib/chef/chef_fs/knife.rb index 36445e5680..47f34225b7 100644 --- a/lib/chef/chef_fs/knife.rb +++ b/lib/chef/chef_fs/knife.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "../knife" require "pathname" class Chef @@ -25,11 +25,11 @@ class Chef # Workaround for CHEF-3932 def self.deps super do - require "chef/config" - require "chef/chef_fs/parallelizer" - require "chef/chef_fs/config" - require "chef/chef_fs/file_pattern" - require "chef/chef_fs/path_utils" + require_relative "../config" + require_relative "parallelizer" + require_relative "config" + require_relative "file_pattern" + require_relative "path_utils" yield end end diff --git a/lib/chef/chef_fs/parallelizer.rb b/lib/chef/chef_fs/parallelizer.rb index eee555fc93..be7d93c669 100644 --- a/lib/chef/chef_fs/parallelizer.rb +++ b/lib/chef/chef_fs/parallelizer.rb @@ -1,5 +1,5 @@ require "thread" -require "chef/chef_fs/parallelizer/parallel_enumerable" +require_relative "parallelizer/parallel_enumerable" class Chef module ChefFS diff --git a/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb b/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb index ab578bdb7f..2291220ef8 100644 --- a/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb +++ b/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb @@ -1,4 +1,4 @@ -require "chef/chef_fs/parallelizer/flatten_enumerable" +require_relative "flatten_enumerable" class Chef module ChefFS diff --git a/lib/chef/chef_fs/path_utils.rb b/lib/chef/chef_fs/path_utils.rb index 4de23f8266..fe8343d94a 100644 --- a/lib/chef/chef_fs/path_utils.rb +++ b/lib/chef/chef_fs/path_utils.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/chef_fs" +require_relative "" require "pathname" class Chef diff --git a/lib/chef/client.rb b/lib/chef/client.rb index a11662b7d8..eb42b58890 100644 --- a/lib/chef/client.rb +++ b/lib/chef/client.rb @@ -18,43 +18,43 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/config" -require "chef/mixin/params_validate" -require "chef/mixin/path_sanity" -require "chef/log" -require "chef/deprecated" -require "chef/server_api" -require "chef/api_client" -require "chef/api_client/registration" -require "chef/node" -require "chef/role" -require "chef/file_cache" -require "chef/run_context" -require "chef/runner" -require "chef/run_status" -require "chef/cookbook/cookbook_collection" -require "chef/cookbook/file_vendor" -require "chef/cookbook/file_system_file_vendor" -require "chef/cookbook/remote_file_vendor" -require "chef/event_dispatch/dispatcher" -require "chef/event_loggers/base" -require "chef/event_loggers/windows_eventlog" -require "chef/exceptions" -require "chef/formatters/base" -require "chef/formatters/doc" -require "chef/formatters/minimal" -require "chef/version" -require "chef/action_collection" -require "chef/resource_reporter" -require "chef/data_collector" -require "chef/run_lock" -require "chef/policy_builder" -require "chef/request_id" -require "chef/platform/rebooter" -require "chef/mixin/deprecation" +require_relative "config" +require_relative "mixin/params_validate" +require_relative "mixin/path_sanity" +require_relative "log" +require_relative "deprecated" +require_relative "server_api" +require_relative "api_client" +require_relative "api_client/registration" +require_relative "node" +require_relative "role" +require_relative "file_cache" +require_relative "run_context" +require_relative "runner" +require_relative "run_status" +require_relative "cookbook/cookbook_collection" +require_relative "cookbook/file_vendor" +require_relative "cookbook/file_system_file_vendor" +require_relative "cookbook/remote_file_vendor" +require_relative "event_dispatch/dispatcher" +require_relative "event_loggers/base" +require_relative "event_loggers/windows_eventlog" +require_relative "exceptions" +require_relative "formatters/base" +require_relative "formatters/doc" +require_relative "formatters/minimal" +require_relative "version" +require_relative "action_collection" +require_relative "resource_reporter" +require_relative "data_collector" +require_relative "run_lock" +require_relative "policy_builder" +require_relative "request_id" +require_relative "platform/rebooter" +require_relative "mixin/deprecation" require "ohai" require "rbconfig" -require "chef/dist" +require_relative "dist" require "forwardable" class Chef @@ -921,7 +921,7 @@ class Chef end def has_admin_privileges? - require "chef/win32/security" + require_relative "win32/security" Chef::ReservedNames::Win32::Security.has_admin_privileges? end @@ -929,6 +929,6 @@ class Chef end # HACK cannot load this first, but it must be loaded. -require "chef/cookbook_loader" -require "chef/cookbook_version" -require "chef/cookbook/synchronizer" +require_relative "cookbook_loader" +require_relative "cookbook_version" +require_relative "cookbook/synchronizer" diff --git a/lib/chef/config.rb b/lib/chef/config.rb index f5466ae145..759818261e 100644 --- a/lib/chef/config.rb +++ b/lib/chef/config.rb @@ -19,7 +19,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/log" +require_relative "log" require "chef-config/logger" # DI our logger into ChefConfig before we load the config. Some defaults are @@ -28,7 +28,7 @@ require "chef-config/logger" ChefConfig.logger = Chef::Log require "chef-config/config" -require "chef/platform/query_helpers" +require_relative "platform/query_helpers" # Ohai::Config defines its own log_level and log_location. When loaded, it will # override the default ChefConfig::Config values. We save them here before diff --git a/lib/chef/config_fetcher.rb b/lib/chef/config_fetcher.rb index d9d100ed00..0e4a7935ac 100644 --- a/lib/chef/config_fetcher.rb +++ b/lib/chef/config_fetcher.rb @@ -1,7 +1,7 @@ -require "chef/application" -require "chef/chef_fs/path_utils" -require "chef/http/simple" -require "chef/json_compat" +require_relative "application" +require_relative "chef_fs/path_utils" +require_relative "http/simple" +require_relative "json_compat" class Chef class ConfigFetcher diff --git a/lib/chef/cookbook/cookbook_collection.rb b/lib/chef/cookbook/cookbook_collection.rb index 0ebf7d8464..692cb1595e 100644 --- a/lib/chef/cookbook/cookbook_collection.rb +++ b/lib/chef/cookbook/cookbook_collection.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/mash" -require "chef/cookbook/gem_installer" +require_relative "../mash" +require_relative "gem_installer" class Chef # == Chef::CookbookCollection diff --git a/lib/chef/cookbook/cookbook_version_loader.rb b/lib/chef/cookbook/cookbook_version_loader.rb index d5ad9c98d7..ad7ee3b1c2 100644 --- a/lib/chef/cookbook/cookbook_version_loader.rb +++ b/lib/chef/cookbook/cookbook_version_loader.rb @@ -13,10 +13,10 @@ # limitations under the License. # -require "chef/cookbook_version" -require "chef/cookbook/chefignore" -require "chef/cookbook/metadata" -require "chef/util/path_helper" +require_relative "../cookbook_version" +require_relative "chefignore" +require_relative "metadata" +require_relative "../util/path_helper" require "find" class Chef diff --git a/lib/chef/cookbook/file_system_file_vendor.rb b/lib/chef/cookbook/file_system_file_vendor.rb index fe16af26b0..2faeb31815 100644 --- a/lib/chef/cookbook/file_system_file_vendor.rb +++ b/lib/chef/cookbook/file_system_file_vendor.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/cookbook/file_vendor" +require_relative "file_vendor" class Chef class Cookbook diff --git a/lib/chef/cookbook/gem_installer.rb b/lib/chef/cookbook/gem_installer.rb index dafb76f412..830dce757a 100644 --- a/lib/chef/cookbook/gem_installer.rb +++ b/lib/chef/cookbook/gem_installer.rb @@ -15,7 +15,7 @@ # require "tmpdir" -require "chef/mixin/shell_out" +require_relative "../mixin/shell_out" class Chef class Cookbook diff --git a/lib/chef/cookbook/manifest_v0.rb b/lib/chef/cookbook/manifest_v0.rb index 198c7a4741..e285b29fd2 100644 --- a/lib/chef/cookbook/manifest_v0.rb +++ b/lib/chef/cookbook/manifest_v0.rb @@ -14,8 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/json_compat" -require "chef/mixin/versioned_api" +require_relative "../json_compat" +require_relative "../mixin/versioned_api" class Chef class Cookbook diff --git a/lib/chef/cookbook/manifest_v2.rb b/lib/chef/cookbook/manifest_v2.rb index 37cad4b3b7..2b98c3550c 100644 --- a/lib/chef/cookbook/manifest_v2.rb +++ b/lib/chef/cookbook/manifest_v2.rb @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/json_compat" -require "chef/mixin/versioned_api" +require_relative "../json_compat" +require_relative "../mixin/versioned_api" class Chef class Cookbook diff --git a/lib/chef/cookbook/metadata.rb b/lib/chef/cookbook/metadata.rb index 5db862e500..6d82ae4e30 100644 --- a/lib/chef/cookbook/metadata.rb +++ b/lib/chef/cookbook/metadata.rb @@ -17,15 +17,15 @@ # limitations under the License. # -require "chef/exceptions" -require "chef/mash" -require "chef/mixin/from_file" -require "chef/mixin/params_validate" -require "chef/log" -require "chef/version_class" -require "chef/version_constraint" -require "chef/version_constraint/platform" -require "chef/json_compat" +require_relative "../exceptions" +require_relative "../mash" +require_relative "../mixin/from_file" +require_relative "../mixin/params_validate" +require_relative "../log" +require_relative "../version_class" +require_relative "../version_constraint" +require_relative "../version_constraint/platform" +require_relative "../json_compat" class Chef class Cookbook diff --git a/lib/chef/cookbook/remote_file_vendor.rb b/lib/chef/cookbook/remote_file_vendor.rb index 3160c88eb3..9ccb2ff46c 100644 --- a/lib/chef/cookbook/remote_file_vendor.rb +++ b/lib/chef/cookbook/remote_file_vendor.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/cookbook/file_vendor" +require_relative "file_vendor" class Chef class Cookbook diff --git a/lib/chef/cookbook/synchronizer.rb b/lib/chef/cookbook/synchronizer.rb index 5f098a0538..b1fa1b436d 100644 --- a/lib/chef/cookbook/synchronizer.rb +++ b/lib/chef/cookbook/synchronizer.rb @@ -13,11 +13,11 @@ # limitations under the License. # -require "chef/client" -require "chef/util/threaded_job_queue" -require "chef/server_api" +require_relative "../client" +require_relative "../util/threaded_job_queue" +require_relative "../server_api" require "singleton" -require "chef/dist" +require_relative "../dist" class Chef diff --git a/lib/chef/cookbook/syntax_check.rb b/lib/chef/cookbook/syntax_check.rb index 686abce178..8743e07caf 100644 --- a/lib/chef/cookbook/syntax_check.rb +++ b/lib/chef/cookbook/syntax_check.rb @@ -18,9 +18,9 @@ require "pathname" require "stringio" require "erubis" -require "chef/mixin/shell_out" -require "chef/mixin/checksum" -require "chef/util/path_helper" +require_relative "../mixin/shell_out" +require_relative "../mixin/checksum" +require_relative "../util/path_helper" class Chef class Cookbook diff --git a/lib/chef/cookbook_loader.rb b/lib/chef/cookbook_loader.rb index 1a7dec8b03..ada19baed7 100644 --- a/lib/chef/cookbook_loader.rb +++ b/lib/chef/cookbook_loader.rb @@ -18,12 +18,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/config" -require "chef/exceptions" -require "chef/cookbook/cookbook_version_loader" -require "chef/cookbook_version" -require "chef/cookbook/chefignore" -require "chef/cookbook/metadata" +require_relative "config" +require_relative "exceptions" +require_relative "cookbook/cookbook_version_loader" +require_relative "cookbook_version" +require_relative "cookbook/chefignore" +require_relative "cookbook/metadata" class Chef # This class is used by knife, cheffs and legacy chef-solo modes. It is not used by the server mode diff --git a/lib/chef/cookbook_manifest.rb b/lib/chef/cookbook_manifest.rb index 3f38f9cf29..2633dfa8ba 100644 --- a/lib/chef/cookbook_manifest.rb +++ b/lib/chef/cookbook_manifest.rb @@ -15,11 +15,11 @@ # limitations under the License. require "forwardable" -require "chef/mixin/versioned_api" -require "chef/util/path_helper" -require "chef/cookbook/manifest_v0" -require "chef/cookbook/manifest_v2" -require "chef/log" +require_relative "mixin/versioned_api" +require_relative "util/path_helper" +require_relative "cookbook/manifest_v0" +require_relative "cookbook/manifest_v2" +require_relative "log" class Chef diff --git a/lib/chef/cookbook_uploader.rb b/lib/chef/cookbook_uploader.rb index de367f2455..e2393b91f6 100644 --- a/lib/chef/cookbook_uploader.rb +++ b/lib/chef/cookbook_uploader.rb @@ -1,15 +1,15 @@ require "set" -require "chef/exceptions" -require "chef/knife/cookbook_metadata" -require "chef/digester" -require "chef/cookbook_manifest" -require "chef/cookbook_version" -require "chef/cookbook/syntax_check" -require "chef/cookbook/file_system_file_vendor" -require "chef/util/threaded_job_queue" -require "chef/sandbox" -require "chef/server_api" +require_relative "exceptions" +require_relative "knife/cookbook_metadata" +require_relative "digester" +require_relative "cookbook_manifest" +require_relative "cookbook_version" +require_relative "cookbook/syntax_check" +require_relative "cookbook/file_system_file_vendor" +require_relative "util/threaded_job_queue" +require_relative "sandbox" +require_relative "server_api" class Chef class CookbookUploader diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb index 8d4eb2e8ab..e69b2404b7 100644 --- a/lib/chef/cookbook_version.rb +++ b/lib/chef/cookbook_version.rb @@ -19,13 +19,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/log" -require "chef/cookbook/file_vendor" -require "chef/cookbook/metadata" -require "chef/version_class" -require "chef/digester" -require "chef/cookbook_manifest" -require "chef/server_api" +require_relative "log" +require_relative "cookbook/file_vendor" +require_relative "cookbook/metadata" +require_relative "version_class" +require_relative "digester" +require_relative "cookbook_manifest" +require_relative "server_api" class Chef diff --git a/lib/chef/daemon.rb b/lib/chef/daemon.rb index 70bdddf457..9fdfe6481f 100644 --- a/lib/chef/daemon.rb +++ b/lib/chef/daemon.rb @@ -17,8 +17,8 @@ # I love you Merb (lib/merb-core/server.rb) -require "chef/config" -require "chef/run_lock" +require_relative "config" +require_relative "run_lock" require "etc" class Chef diff --git a/lib/chef/data_bag.rb b/lib/chef/data_bag.rb index e8545fb1c0..d7e2de7397 100644 --- a/lib/chef/data_bag.rb +++ b/lib/chef/data_bag.rb @@ -18,13 +18,13 @@ # limitations under the License. # -require "chef/config" -require "chef/mixin/params_validate" -require "chef/mixin/from_file" -require "chef/data_bag_item" -require "chef/mash" -require "chef/json_compat" -require "chef/server_api" +require_relative "config" +require_relative "mixin/params_validate" +require_relative "mixin/from_file" +require_relative "data_bag_item" +require_relative "mash" +require_relative "json_compat" +require_relative "server_api" class Chef class DataBag diff --git a/lib/chef/data_bag_item.rb b/lib/chef/data_bag_item.rb index 2a02ada605..95626a346a 100644 --- a/lib/chef/data_bag_item.rb +++ b/lib/chef/data_bag_item.rb @@ -20,13 +20,13 @@ require "forwardable" -require "chef/config" -require "chef/mixin/params_validate" -require "chef/mixin/from_file" -require "chef/data_bag" -require "chef/mash" -require "chef/server_api" -require "chef/json_compat" +require_relative "config" +require_relative "mixin/params_validate" +require_relative "mixin/from_file" +require_relative "data_bag" +require_relative "mash" +require_relative "server_api" +require_relative "json_compat" class Chef class DataBagItem diff --git a/lib/chef/data_collector.rb b/lib/chef/data_collector.rb index 66853c58fb..167b9f5d54 100644 --- a/lib/chef/data_collector.rb +++ b/lib/chef/data_collector.rb @@ -18,15 +18,15 @@ # limitations under the License. # -require "chef/server_api" -require "chef/http/simple_json" -require "chef/event_dispatch/base" +require_relative "server_api" +require_relative "http/simple_json" +require_relative "event_dispatch/base" require "set" -require "chef/data_collector/run_end_message" -require "chef/data_collector/run_start_message" -require "chef/data_collector/config_validation" -require "chef/data_collector/error_handlers" -require "chef/dist" +require_relative "data_collector/run_end_message" +require_relative "data_collector/run_start_message" +require_relative "data_collector/config_validation" +require_relative "data_collector/error_handlers" +require_relative "dist" class Chef class DataCollector diff --git a/lib/chef/data_collector/run_end_message.rb b/lib/chef/data_collector/run_end_message.rb index 1aba651d96..70a0b59650 100644 --- a/lib/chef/data_collector/run_end_message.rb +++ b/lib/chef/data_collector/run_end_message.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/data_collector/message_helpers" +require_relative "message_helpers" class Chef class DataCollector diff --git a/lib/chef/data_collector/run_start_message.rb b/lib/chef/data_collector/run_start_message.rb index 448043a48d..fd070da8e4 100644 --- a/lib/chef/data_collector/run_start_message.rb +++ b/lib/chef/data_collector/run_start_message.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/data_collector/message_helpers" +require_relative "message_helpers" class Chef class DataCollector diff --git a/lib/chef/decorator/lazy.rb b/lib/chef/decorator/lazy.rb index 71a2151d65..478d2edeb8 100644 --- a/lib/chef/decorator/lazy.rb +++ b/lib/chef/decorator/lazy.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/decorator" +require_relative "" class Chef class Decorator diff --git a/lib/chef/decorator/lazy_array.rb b/lib/chef/decorator/lazy_array.rb index dc8ea832ee..f67365c458 100644 --- a/lib/chef/decorator/lazy_array.rb +++ b/lib/chef/decorator/lazy_array.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/decorator/lazy" +require_relative "lazy" class Chef class Decorator diff --git a/lib/chef/deprecated.rb b/lib/chef/deprecated.rb index e3931427ba..da29285223 100644 --- a/lib/chef/deprecated.rb +++ b/lib/chef/deprecated.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/mixin/convert_to_class_name" +require_relative "mixin/convert_to_class_name" # Structured deprecations have a unique URL associated with them, which must exist before the deprecation is merged. class Chef diff --git a/lib/chef/deprecation/warnings.rb b/lib/chef/deprecation/warnings.rb index c227739a8d..7120b87f43 100644 --- a/lib/chef/deprecation/warnings.rb +++ b/lib/chef/deprecation/warnings.rb @@ -20,7 +20,7 @@ class Chef module Deprecation module Warnings - require "chef/version" + require_relative "../version" def add_deprecation_warnings_for(method_names) method_names.each do |name| diff --git a/lib/chef/dsl.rb b/lib/chef/dsl.rb index 1fa0099e91..6893298d1d 100644 --- a/lib/chef/dsl.rb +++ b/lib/chef/dsl.rb @@ -1,6 +1,6 @@ -require "chef/dsl/recipe" -require "chef/dsl/platform_introspection" -require "chef/dsl/data_query" -require "chef/dsl/include_recipe" -require "chef/dsl/include_attribute" -require "chef/dsl/registry_helper" +require_relative "dsl/recipe" +require_relative "dsl/platform_introspection" +require_relative "dsl/data_query" +require_relative "dsl/include_recipe" +require_relative "dsl/include_attribute" +require_relative "dsl/registry_helper" diff --git a/lib/chef/dsl/core.rb b/lib/chef/dsl/core.rb index d7c5b6a006..a06adc28d0 100644 --- a/lib/chef/dsl/core.rb +++ b/lib/chef/dsl/core.rb @@ -17,10 +17,10 @@ # limitations under the License. # -require "chef/dsl/declare_resource" -require "chef/dsl/universal" -require "chef/mixin/notifying_block" -require "chef/mixin/lazy_module_include" +require_relative "declare_resource" +require_relative "universal" +require_relative "../mixin/notifying_block" +require_relative "../mixin/lazy_module_include" class Chef module DSL diff --git a/lib/chef/dsl/data_query.rb b/lib/chef/dsl/data_query.rb index a447ff1f38..88562df190 100644 --- a/lib/chef/dsl/data_query.rb +++ b/lib/chef/dsl/data_query.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/search/query" -require "chef/data_bag" -require "chef/data_bag_item" -require "chef/encrypted_data_bag_item" -require "chef/encrypted_data_bag_item/check_encrypted" +require_relative "../search/query" +require_relative "../data_bag" +require_relative "../data_bag_item" +require_relative "../encrypted_data_bag_item" +require_relative "../encrypted_data_bag_item/check_encrypted" class Chef module DSL diff --git a/lib/chef/dsl/declare_resource.rb b/lib/chef/dsl/declare_resource.rb index dc95489d52..bf1a6bcbcc 100644 --- a/lib/chef/dsl/declare_resource.rb +++ b/lib/chef/dsl/declare_resource.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/exceptions" +require_relative "../exceptions" class Chef module DSL diff --git a/lib/chef/dsl/include_attribute.rb b/lib/chef/dsl/include_attribute.rb index c81b37a963..56dc46e1da 100644 --- a/lib/chef/dsl/include_attribute.rb +++ b/lib/chef/dsl/include_attribute.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/log" +require_relative "../log" class Chef module DSL diff --git a/lib/chef/dsl/include_recipe.rb b/lib/chef/dsl/include_recipe.rb index 31b031080a..cea5577285 100644 --- a/lib/chef/dsl/include_recipe.rb +++ b/lib/chef/dsl/include_recipe.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/log" +require_relative "../log" class Chef module DSL diff --git a/lib/chef/dsl/powershell.rb b/lib/chef/dsl/powershell.rb index 7dc7a9a0f6..d12a787d48 100644 --- a/lib/chef/dsl/powershell.rb +++ b/lib/chef/dsl/powershell.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/util/powershell/ps_credential" +require_relative "../util/powershell/ps_credential" class Chef module DSL diff --git a/lib/chef/dsl/reboot_pending.rb b/lib/chef/dsl/reboot_pending.rb index 1dc0a8d41b..e554ca83ad 100644 --- a/lib/chef/dsl/reboot_pending.rb +++ b/lib/chef/dsl/reboot_pending.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/dsl/platform_introspection" -require "chef/dsl/registry_helper" +require_relative "platform_introspection" +require_relative "registry_helper" class Chef module DSL diff --git a/lib/chef/dsl/recipe.rb b/lib/chef/dsl/recipe.rb index a8ca8713b6..1d02d9c03e 100644 --- a/lib/chef/dsl/recipe.rb +++ b/lib/chef/dsl/recipe.rb @@ -17,13 +17,13 @@ # limitations under the License. # -require "chef/exceptions" -require "chef/dsl/resources" -require "chef/dsl/definitions" -require "chef/dsl/include_recipe" -require "chef/dsl/reboot_pending" -require "chef/dsl/core" -require "chef/mixin/lazy_module_include" +require_relative "../exceptions" +require_relative "resources" +require_relative "definitions" +require_relative "include_recipe" +require_relative "reboot_pending" +require_relative "core" +require_relative "../mixin/lazy_module_include" class Chef module DSL @@ -71,4 +71,4 @@ class Chef end # Avoid circular references for things that are only used in instance methods -require "chef/resource" +require_relative "../resource" diff --git a/lib/chef/dsl/resources.rb b/lib/chef/dsl/resources.rb index 4e404b44ed..4a87b40e81 100644 --- a/lib/chef/dsl/resources.rb +++ b/lib/chef/dsl/resources.rb @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/dsl/cheffish" +require_relative "cheffish" class Chef module DSL diff --git a/lib/chef/dsl/universal.rb b/lib/chef/dsl/universal.rb index 7e4843adcb..cdcd5ee286 100644 --- a/lib/chef/dsl/universal.rb +++ b/lib/chef/dsl/universal.rb @@ -17,15 +17,15 @@ # limitations under the License. # -require "chef/dsl/platform_introspection" -require "chef/dsl/data_query" -require "chef/dsl/registry_helper" -require "chef/dsl/powershell" -require "chef/mixin/powershell_exec" -require "chef/mixin/powershell_out" -require "chef/mixin/shell_out" -require "chef/mixin/lazy_module_include" -require "chef/mixin/train_or_shell" +require_relative "platform_introspection" +require_relative "data_query" +require_relative "registry_helper" +require_relative "powershell" +require_relative "../mixin/powershell_exec" +require_relative "../mixin/powershell_out" +require_relative "../mixin/shell_out" +require_relative "../mixin/lazy_module_include" +require_relative "../mixin/train_or_shell" class Chef module DSL diff --git a/lib/chef/encrypted_data_bag_item.rb b/lib/chef/encrypted_data_bag_item.rb index 71b506aba4..314d52cafb 100644 --- a/lib/chef/encrypted_data_bag_item.rb +++ b/lib/chef/encrypted_data_bag_item.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/config" -require "chef/data_bag_item" -require "chef/encrypted_data_bag_item/decryptor" -require "chef/encrypted_data_bag_item/encryptor" +require_relative "config" +require_relative "data_bag_item" +require_relative "encrypted_data_bag_item/decryptor" +require_relative "encrypted_data_bag_item/encryptor" require "open-uri" # An EncryptedDataBagItem represents a read-only data bag item where diff --git a/lib/chef/encrypted_data_bag_item/assertions.rb b/lib/chef/encrypted_data_bag_item/assertions.rb index e8f8bfcbf2..bdd522e039 100644 --- a/lib/chef/encrypted_data_bag_item/assertions.rb +++ b/lib/chef/encrypted_data_bag_item/assertions.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/encrypted_data_bag_item/unacceptable_encrypted_data_bag_item_format" -require "chef/encrypted_data_bag_item/unsupported_cipher" +require_relative "unacceptable_encrypted_data_bag_item_format" +require_relative "unsupported_cipher" class Chef::EncryptedDataBagItem diff --git a/lib/chef/encrypted_data_bag_item/check_encrypted.rb b/lib/chef/encrypted_data_bag_item/check_encrypted.rb index a266df6dd6..9292ce6650 100644 --- a/lib/chef/encrypted_data_bag_item/check_encrypted.rb +++ b/lib/chef/encrypted_data_bag_item/check_encrypted.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/encrypted_data_bag_item/encryptor" +require_relative "encryptor" class Chef::EncryptedDataBagItem # Common code for checking if a data bag appears encrypted diff --git a/lib/chef/encrypted_data_bag_item/decryptor.rb b/lib/chef/encrypted_data_bag_item/decryptor.rb index 59911c7ca7..1936380b4f 100644 --- a/lib/chef/encrypted_data_bag_item/decryptor.rb +++ b/lib/chef/encrypted_data_bag_item/decryptor.rb @@ -17,14 +17,14 @@ # require "yaml" -require "chef/json_compat" +require_relative "../json_compat" require "openssl" require "base64" require "digest/sha2" -require "chef/encrypted_data_bag_item" -require "chef/encrypted_data_bag_item/unsupported_encrypted_data_bag_item_format" -require "chef/encrypted_data_bag_item/decryption_failure" -require "chef/encrypted_data_bag_item/assertions" +require_relative "" +require_relative "unsupported_encrypted_data_bag_item_format" +require_relative "decryption_failure" +require_relative "assertions" class Chef::EncryptedDataBagItem diff --git a/lib/chef/encrypted_data_bag_item/encryptor.rb b/lib/chef/encrypted_data_bag_item/encryptor.rb index 21783503f4..bb69e95aec 100644 --- a/lib/chef/encrypted_data_bag_item/encryptor.rb +++ b/lib/chef/encrypted_data_bag_item/encryptor.rb @@ -20,10 +20,10 @@ require "base64" require "digest/sha2" require "openssl" require "ffi_yajl" -require "chef/encrypted_data_bag_item" -require "chef/encrypted_data_bag_item/unsupported_encrypted_data_bag_item_format" -require "chef/encrypted_data_bag_item/encryption_failure" -require "chef/encrypted_data_bag_item/assertions" +require_relative "" +require_relative "unsupported_encrypted_data_bag_item_format" +require_relative "encryption_failure" +require_relative "assertions" class Chef::EncryptedDataBagItem diff --git a/lib/chef/environment.rb b/lib/chef/environment.rb index ec3361adfb..bd966e9b57 100644 --- a/lib/chef/environment.rb +++ b/lib/chef/environment.rb @@ -19,12 +19,12 @@ # limitations under the License. # -require "chef/config" -require "chef/mash" -require "chef/mixin/params_validate" -require "chef/mixin/from_file" -require "chef/version_constraint" -require "chef/server_api" +require_relative "config" +require_relative "mash" +require_relative "mixin/params_validate" +require_relative "mixin/from_file" +require_relative "version_constraint" +require_relative "server_api" class Chef class Environment diff --git a/lib/chef/event_dispatch/dispatcher.rb b/lib/chef/event_dispatch/dispatcher.rb index d69a7c76e8..84f1d05129 100644 --- a/lib/chef/event_dispatch/dispatcher.rb +++ b/lib/chef/event_dispatch/dispatcher.rb @@ -1,4 +1,4 @@ -require "chef/event_dispatch/base" +require_relative "base" class Chef module EventDispatch diff --git a/lib/chef/event_dispatch/dsl.rb b/lib/chef/event_dispatch/dsl.rb index 0a9c082fc1..275506a4ec 100644 --- a/lib/chef/event_dispatch/dsl.rb +++ b/lib/chef/event_dispatch/dsl.rb @@ -15,9 +15,9 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require "chef/event_dispatch/base" -require "chef/exceptions" -require "chef/config" +require_relative "base" +require_relative "../exceptions" +require_relative "../config" class Chef module EventDispatch diff --git a/lib/chef/event_loggers/base.rb b/lib/chef/event_loggers/base.rb index 3c11e809f6..2fcc0d2458 100644 --- a/lib/chef/event_loggers/base.rb +++ b/lib/chef/event_loggers/base.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/event_dispatch/base" +require_relative "../event_dispatch/base" class Chef module EventLoggers diff --git a/lib/chef/event_loggers/windows_eventlog.rb b/lib/chef/event_loggers/windows_eventlog.rb index e084fac684..e0f611590a 100644 --- a/lib/chef/event_loggers/windows_eventlog.rb +++ b/lib/chef/event_loggers/windows_eventlog.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/event_loggers/base" -require "chef/platform/query_helpers" -require "chef/win32/eventlog" +require_relative "base" +require_relative "../platform/query_helpers" +require_relative "../win32/eventlog" class Chef module EventLoggers diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb index f109b9406e..de5c155c50 100644 --- a/lib/chef/exceptions.rb +++ b/lib/chef/exceptions.rb @@ -18,7 +18,7 @@ # limitations under the License. require "chef-config/exceptions" -require "chef/dist" +require_relative "dist" class Chef # == Chef::Exceptions diff --git a/lib/chef/file_access_control.rb b/lib/chef/file_access_control.rb index 50a1ea29bb..652dbd28f0 100644 --- a/lib/chef/file_access_control.rb +++ b/lib/chef/file_access_control.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/log" +require_relative "log" class Chef @@ -27,10 +27,10 @@ class Chef class FileAccessControl if RUBY_PLATFORM =~ /mswin|mingw|windows/ - require "chef/file_access_control/windows" + require_relative "file_access_control/windows" include FileAccessControl::Windows else - require "chef/file_access_control/unix" + require_relative "file_access_control/unix" include FileAccessControl::Unix end diff --git a/lib/chef/file_access_control/unix.rb b/lib/chef/file_access_control/unix.rb index 5d674c2c32..8774ad9498 100644 --- a/lib/chef/file_access_control/unix.rb +++ b/lib/chef/file_access_control/unix.rb @@ -18,7 +18,7 @@ # limitations under the License. # -require "chef/log" +require_relative "../log" class Chef class FileAccessControl diff --git a/lib/chef/file_access_control/windows.rb b/lib/chef/file_access_control/windows.rb index a7cefdc6d7..3a5bcf9278 100644 --- a/lib/chef/file_access_control/windows.rb +++ b/lib/chef/file_access_control/windows.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/win32/security" -require "chef/win32/file" +require_relative "../win32/security" +require_relative "../win32/file" class Chef class FileAccessControl diff --git a/lib/chef/file_cache.rb b/lib/chef/file_cache.rb index eb1fd1f582..9403c9b7db 100644 --- a/lib/chef/file_cache.rb +++ b/lib/chef/file_cache.rb @@ -15,12 +15,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/mixin/params_validate" -require "chef/mixin/create_path" -require "chef/exceptions" -require "chef/json_compat" +require_relative "mixin/params_validate" +require_relative "mixin/create_path" +require_relative "exceptions" +require_relative "json_compat" require "fileutils" -require "chef/util/path_helper" +require_relative "util/path_helper" class Chef class FileCache diff --git a/lib/chef/file_content_management/deploy.rb b/lib/chef/file_content_management/deploy.rb index 1e3ae55c21..2ad3aa19d5 100644 --- a/lib/chef/file_content_management/deploy.rb +++ b/lib/chef/file_content_management/deploy.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/file_content_management/deploy/cp" -require "chef/file_content_management/deploy/mv_unix" +require_relative "deploy/cp" +require_relative "deploy/mv_unix" if Chef::Platform.windows? - require "chef/file_content_management/deploy/mv_windows" + require_relative "deploy/mv_windows" end class Chef diff --git a/lib/chef/file_content_management/deploy/mv_windows.rb b/lib/chef/file_content_management/deploy/mv_windows.rb index 210400bc08..132e9635d0 100644 --- a/lib/chef/file_content_management/deploy/mv_windows.rb +++ b/lib/chef/file_content_management/deploy/mv_windows.rb @@ -21,9 +21,9 @@ # ACL information on the dst file. # -require "chef/platform/query_helpers" +require_relative "../../platform/query_helpers" if Chef::Platform.windows? - require "chef/win32/security" + require_relative "../../win32/security" end class Chef diff --git a/lib/chef/formatters/base.rb b/lib/chef/formatters/base.rb index fa309b67e7..a295e1390d 100644 --- a/lib/chef/formatters/base.rb +++ b/lib/chef/formatters/base.rb @@ -17,11 +17,11 @@ # limitations under the License. # -require "chef/event_dispatch/base" -require "chef/formatters/error_inspectors" -require "chef/formatters/error_description" -require "chef/formatters/error_mapper" -require "chef/formatters/indentable_output_stream" +require_relative "../event_dispatch/base" +require_relative "error_inspectors" +require_relative "error_description" +require_relative "error_mapper" +require_relative "indentable_output_stream" class Chef diff --git a/lib/chef/formatters/doc.rb b/lib/chef/formatters/doc.rb index d1849a72d9..77deff5b66 100644 --- a/lib/chef/formatters/doc.rb +++ b/lib/chef/formatters/doc.rb @@ -1,6 +1,6 @@ -require "chef/formatters/base" -require "chef/config" -require "chef/dist" +require_relative "base" +require_relative "../config" +require_relative "../dist" class Chef module Formatters diff --git a/lib/chef/formatters/error_description.rb b/lib/chef/formatters/error_description.rb index ceb2f68539..0bd1b20f81 100644 --- a/lib/chef/formatters/error_description.rb +++ b/lib/chef/formatters/error_description.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/version" +require_relative "../version" class Chef module Formatters diff --git a/lib/chef/formatters/error_inspectors.rb b/lib/chef/formatters/error_inspectors.rb index 9221ecda4d..e83d527e05 100644 --- a/lib/chef/formatters/error_inspectors.rb +++ b/lib/chef/formatters/error_inspectors.rb @@ -1,10 +1,10 @@ -require "chef/formatters/error_inspectors/node_load_error_inspector" -require "chef/formatters/error_inspectors/registration_error_inspector" -require "chef/formatters/error_inspectors/compile_error_inspector" -require "chef/formatters/error_inspectors/resource_failure_inspector" -require "chef/formatters/error_inspectors/run_list_expansion_error_inspector" -require "chef/formatters/error_inspectors/cookbook_resolve_error_inspector" -require "chef/formatters/error_inspectors/cookbook_sync_error_inspector" +require_relative "error_inspectors/node_load_error_inspector" +require_relative "error_inspectors/registration_error_inspector" +require_relative "error_inspectors/compile_error_inspector" +require_relative "error_inspectors/resource_failure_inspector" +require_relative "error_inspectors/run_list_expansion_error_inspector" +require_relative "error_inspectors/cookbook_resolve_error_inspector" +require_relative "error_inspectors/cookbook_sync_error_inspector" class Chef module Formatters diff --git a/lib/chef/formatters/error_inspectors/api_error_formatting.rb b/lib/chef/formatters/error_inspectors/api_error_formatting.rb index 6dd6ed292f..dd6d00900d 100644 --- a/lib/chef/formatters/error_inspectors/api_error_formatting.rb +++ b/lib/chef/formatters/error_inspectors/api_error_formatting.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/http/authenticator" -require "chef/dist" +require_relative "../../http/authenticator" +require_relative "../../dist" class Chef module Formatters diff --git a/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb b/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb index 6801884aac..89d4ba7bce 100644 --- a/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb +++ b/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/formatters/error_inspectors/api_error_formatting" +require_relative "api_error_formatting" class Chef module Formatters diff --git a/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb b/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb index 6ab2816a57..83f00bf8ac 100644 --- a/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb +++ b/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/formatters/error_inspectors/api_error_formatting" +require_relative "api_error_formatting" class Chef module Formatters diff --git a/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb b/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb index 8a94529237..1d75cbb5bd 100644 --- a/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb +++ b/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/formatters/error_inspectors/api_error_formatting" -require "chef/dist" +require_relative "api_error_formatting" +require_relative "../../dist" class Chef module Formatters diff --git a/lib/chef/formatters/error_inspectors/registration_error_inspector.rb b/lib/chef/formatters/error_inspectors/registration_error_inspector.rb index 7ab309be70..388e6af20d 100644 --- a/lib/chef/formatters/error_inspectors/registration_error_inspector.rb +++ b/lib/chef/formatters/error_inspectors/registration_error_inspector.rb @@ -1,4 +1,4 @@ -require "chef/dist" +require_relative "../../dist" class Chef module Formatters diff --git a/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb b/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb index 367bba321e..3fd6094ae0 100644 --- a/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb +++ b/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require "chef/dist" +require_relative "../../dist" class Chef module Formatters @@ -53,7 +53,7 @@ class Chef end if Chef::Platform.windows? - require "chef/win32/security" + require_relative "../../win32/security" if !Chef::ReservedNames::Win32::Security.has_admin_privileges? error_description.section("Missing Windows Admin Privileges", "#{Chef::Dist::CLIENT} doesn't have administrator privileges. This can be a possible reason for the resource failure.") diff --git a/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb b/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb index d6fe3564f7..e33e5cea1a 100644 --- a/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb +++ b/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/formatters/error_inspectors/api_error_formatting" -require "chef/dist" +require_relative "api_error_formatting" +require_relative "../../dist" class Chef module Formatters diff --git a/lib/chef/formatters/minimal.rb b/lib/chef/formatters/minimal.rb index 1a755afd94..272a89bad0 100644 --- a/lib/chef/formatters/minimal.rb +++ b/lib/chef/formatters/minimal.rb @@ -1,5 +1,5 @@ -require "chef/formatters/base" -require "chef/dist" +require_relative "base" +require_relative "../dist" class Chef diff --git a/lib/chef/guard_interpreter.rb b/lib/chef/guard_interpreter.rb index e11201e50b..3a30b0773f 100644 --- a/lib/chef/guard_interpreter.rb +++ b/lib/chef/guard_interpreter.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/guard_interpreter/default_guard_interpreter" -require "chef/guard_interpreter/resource_guard_interpreter" +require_relative "guard_interpreter/default_guard_interpreter" +require_relative "guard_interpreter/resource_guard_interpreter" class Chef class GuardInterpreter diff --git a/lib/chef/guard_interpreter/default_guard_interpreter.rb b/lib/chef/guard_interpreter/default_guard_interpreter.rb index 740e8e3f2c..57a82cd9d6 100644 --- a/lib/chef/guard_interpreter/default_guard_interpreter.rb +++ b/lib/chef/guard_interpreter/default_guard_interpreter.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/mixin/train_or_shell" -require "chef/exceptions" +require_relative "../mixin/train_or_shell" +require_relative "../exceptions" class Chef class GuardInterpreter diff --git a/lib/chef/guard_interpreter/resource_guard_interpreter.rb b/lib/chef/guard_interpreter/resource_guard_interpreter.rb index 79134d3dfb..3ff1e6c847 100644 --- a/lib/chef/guard_interpreter/resource_guard_interpreter.rb +++ b/lib/chef/guard_interpreter/resource_guard_interpreter.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/guard_interpreter" +require_relative "" class Chef class GuardInterpreter diff --git a/lib/chef/handler.rb b/lib/chef/handler.rb index 0d4a3edbaa..775ddd6d89 100644 --- a/lib/chef/handler.rb +++ b/lib/chef/handler.rb @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require "chef/client" +require_relative "client" require "forwardable" class Chef diff --git a/lib/chef/handler/error_report.rb b/lib/chef/handler/error_report.rb index e84a817e06..ab751c02df 100644 --- a/lib/chef/handler/error_report.rb +++ b/lib/chef/handler/error_report.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/handler" -require "chef/resource/directory" +require_relative "" +require_relative "../resource/directory" class Chef class Handler diff --git a/lib/chef/handler/json_file.rb b/lib/chef/handler/json_file.rb index 3dc7c51274..bfb36de9a4 100644 --- a/lib/chef/handler/json_file.rb +++ b/lib/chef/handler/json_file.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/handler" -require "chef/resource/directory" +require_relative "" +require_relative "../resource/directory" class Chef class Handler diff --git a/lib/chef/http.rb b/lib/chef/http.rb index e9f94e6c92..ab78ff7ae4 100644 --- a/lib/chef/http.rb +++ b/lib/chef/http.rb @@ -24,11 +24,11 @@ require "tempfile" require "net/https" require "uri" -require "chef/http/basic_client" -require "chef/monkey_patches/net_http" -require "chef/config" -require "chef/platform/query_helpers" -require "chef/exceptions" +require_relative "http/basic_client" +require_relative "monkey_patches/net_http" +require_relative "config" +require_relative "platform/query_helpers" +require_relative "exceptions" class Chef @@ -297,7 +297,7 @@ class Chef # when for most knife/chef-client work we never need/want this loaded. unless defined?(SocketlessChefZeroClient) - require "chef/http/socketless_chef_zero_client" + require_relative "http/socketless_chef_zero_client" end SocketlessChefZeroClient.new(base_url) diff --git a/lib/chef/http/api_versions.rb b/lib/chef/http/api_versions.rb index 6c5ede40aa..e1eae4b468 100644 --- a/lib/chef/http/api_versions.rb +++ b/lib/chef/http/api_versions.rb @@ -15,8 +15,8 @@ # limitations under the License. # -require "chef/server_api_versions" -require "chef/json_compat" +require_relative "../server_api_versions" +require_relative "../json_compat" class Chef class HTTP diff --git a/lib/chef/http/auth_credentials.rb b/lib/chef/http/auth_credentials.rb index 547b5c8a83..e761c97e9b 100644 --- a/lib/chef/http/auth_credentials.rb +++ b/lib/chef/http/auth_credentials.rb @@ -20,7 +20,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require "chef/log" +require_relative "../log" require "mixlib/authentication/signedheaderauth" class Chef diff --git a/lib/chef/http/authenticator.rb b/lib/chef/http/authenticator.rb index daa582f890..6b059c9733 100644 --- a/lib/chef/http/authenticator.rb +++ b/lib/chef/http/authenticator.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/http/auth_credentials" -require "chef/exceptions" +require_relative "auth_credentials" +require_relative "../exceptions" require "openssl" class Chef diff --git a/lib/chef/http/basic_client.rb b/lib/chef/http/basic_client.rb index 54da722b3d..a599f2219e 100644 --- a/lib/chef/http/basic_client.rb +++ b/lib/chef/http/basic_client.rb @@ -22,8 +22,8 @@ # require "uri" require "net/http" -require "chef/http/ssl_policies" -require "chef/http/http_request" +require_relative "ssl_policies" +require_relative "http_request" class Chef class HTTP diff --git a/lib/chef/http/cookie_manager.rb b/lib/chef/http/cookie_manager.rb index 723b26ad87..b7b6dddb52 100644 --- a/lib/chef/http/cookie_manager.rb +++ b/lib/chef/http/cookie_manager.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/http/cookie_jar" +require_relative "cookie_jar" class Chef class HTTP diff --git a/lib/chef/http/decompressor.rb b/lib/chef/http/decompressor.rb index cf4a4bc593..f43f054366 100644 --- a/lib/chef/http/decompressor.rb +++ b/lib/chef/http/decompressor.rb @@ -17,7 +17,7 @@ # require "zlib" -require "chef/http/http_request" +require_relative "http_request" class Chef class HTTP diff --git a/lib/chef/http/http_request.rb b/lib/chef/http/http_request.rb index 18a4648443..a8549b32da 100644 --- a/lib/chef/http/http_request.rb +++ b/lib/chef/http/http_request.rb @@ -22,7 +22,7 @@ # require "uri" require "net/http" -require "chef/dist" +require_relative "../dist" # To load faster, we only want ohai's version string. # However, in ohai before 0.6.0, the version is defined @@ -33,7 +33,7 @@ rescue LoadError require "ohai" end -require "chef/version" +require_relative "../version" class Chef class HTTP diff --git a/lib/chef/http/json_input.rb b/lib/chef/http/json_input.rb index e2c8b3e2ee..f7204d4ccc 100644 --- a/lib/chef/http/json_input.rb +++ b/lib/chef/http/json_input.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/json_compat" +require_relative "../json_compat" class Chef class HTTP diff --git a/lib/chef/http/json_output.rb b/lib/chef/http/json_output.rb index 25f1380ceb..5fe2622f94 100644 --- a/lib/chef/http/json_output.rb +++ b/lib/chef/http/json_output.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/json_compat" -require "chef/log" +require_relative "../json_compat" +require_relative "../log" class Chef class HTTP diff --git a/lib/chef/http/json_to_model_output.rb b/lib/chef/http/json_to_model_output.rb index 997ceb8b1f..c908d0d23d 100644 --- a/lib/chef/http/json_to_model_output.rb +++ b/lib/chef/http/json_to_model_output.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/http/json_output" +require_relative "json_output" class Chef class HTTP diff --git a/lib/chef/http/remote_request_id.rb b/lib/chef/http/remote_request_id.rb index a779df805e..d4fb8eb115 100644 --- a/lib/chef/http/remote_request_id.rb +++ b/lib/chef/http/remote_request_id.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/request_id" +require_relative "../request_id" class Chef class HTTP diff --git a/lib/chef/http/simple.rb b/lib/chef/http/simple.rb index bdbc31c9f1..c318debd1d 100644 --- a/lib/chef/http/simple.rb +++ b/lib/chef/http/simple.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/http" -require "chef/http/authenticator" -require "chef/http/decompressor" -require "chef/http/cookie_manager" -require "chef/http/validate_content_length" +require_relative "" +require_relative "authenticator" +require_relative "decompressor" +require_relative "cookie_manager" +require_relative "validate_content_length" class Chef class HTTP diff --git a/lib/chef/http/simple_json.rb b/lib/chef/http/simple_json.rb index 7357d859ee..57886380e6 100644 --- a/lib/chef/http/simple_json.rb +++ b/lib/chef/http/simple_json.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/http" -require "chef/http/authenticator" -require "chef/http/decompressor" -require "chef/http/cookie_manager" -require "chef/http/validate_content_length" +require_relative "" +require_relative "authenticator" +require_relative "decompressor" +require_relative "cookie_manager" +require_relative "validate_content_length" class Chef class HTTP diff --git a/lib/chef/http/ssl_policies.rb b/lib/chef/http/ssl_policies.rb index a3692b81b6..2708e5b3b1 100644 --- a/lib/chef/http/ssl_policies.rb +++ b/lib/chef/http/ssl_policies.rb @@ -22,7 +22,7 @@ # require "openssl" -require "chef/util/path_helper" +require_relative "../util/path_helper" class Chef class HTTP diff --git a/lib/chef/http/validate_content_length.rb b/lib/chef/http/validate_content_length.rb index c8e8ac53ad..e24ebc0dd5 100644 --- a/lib/chef/http/validate_content_length.rb +++ b/lib/chef/http/validate_content_length.rb @@ -17,7 +17,7 @@ # require "pp" -require "chef/log" +require_relative "../log" class Chef class HTTP diff --git a/lib/chef/json_compat.rb b/lib/chef/json_compat.rb index 1ce54b68bc..e7720e9e2a 100644 --- a/lib/chef/json_compat.rb +++ b/lib/chef/json_compat.rb @@ -18,7 +18,7 @@ # Wrapper class for interacting with JSON. require "ffi_yajl" -require "chef/exceptions" +require_relative "exceptions" # We're requiring this to prevent breaking consumers using Hash.to_json require "json" diff --git a/lib/chef/key.rb b/lib/chef/key.rb index 19ed07f608..1d475d5c1b 100644 --- a/lib/chef/key.rb +++ b/lib/chef/key.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/json_compat" -require "chef/mixin/params_validate" -require "chef/exceptions" -require "chef/server_api" +require_relative "json_compat" +require_relative "mixin/params_validate" +require_relative "exceptions" +require_relative "server_api" class Chef # Class for interacting with a chef key object. Can be used to create new keys, diff --git a/lib/chef/knife.rb b/lib/chef/knife.rb index a5f56180fc..1d6392ce52 100644 --- a/lib/chef/knife.rb +++ b/lib/chef/knife.rb @@ -18,20 +18,20 @@ # require "forwardable" -require "chef/version" +require_relative "version" require "mixlib/cli" -require "chef/workstation_config_loader" -require "chef/mixin/convert_to_class_name" -require "chef/mixin/path_sanity" -require "chef/knife/core/subcommand_loader" -require "chef/knife/core/ui" -require "chef/local_mode" -require "chef/server_api" -require "chef/http/authenticator" -require "chef/http/http_request" -require "chef/http" +require_relative "workstation_config_loader" +require_relative "mixin/convert_to_class_name" +require_relative "mixin/path_sanity" +require_relative "knife/core/subcommand_loader" +require_relative "knife/core/ui" +require_relative "local_mode" +require_relative "server_api" +require_relative "http/authenticator" +require_relative "http/http_request" +require_relative "http" require "pp" -require "chef/dist" +require_relative "dist" class Chef class Knife @@ -615,14 +615,14 @@ class Chef def rest @rest ||= begin - require "chef/server_api" + require_relative "server_api" Chef::ServerAPI.new(Chef::Config[:chef_server_url]) end end def noauth_rest @rest ||= begin - require "chef/http/simple_json" + require_relative "http/simple_json" Chef::HTTP::SimpleJSON.new(Chef::Config[:chef_server_url]) end end diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb index 6f6b31f2ec..0b9431c96f 100644 --- a/lib/chef/knife/bootstrap.rb +++ b/lib/chef/knife/bootstrap.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/data_bag_secret_options" -require "chef/dist" +require_relative "" +require_relative "data_bag_secret_options" +require_relative "../dist" require "license_acceptance/cli_flags/mixlib_cli" require "license_acceptance/acceptor" @@ -403,11 +403,11 @@ class Chef deps do require "erubis" - require "chef/json_compat" - require "chef/util/path_helper" - require "chef/knife/bootstrap/chef_vault_handler" - require "chef/knife/bootstrap/client_builder" - require "chef/knife/bootstrap/train_connector" + require_relative "../json_compat" + require_relative "../util/path_helper" + require_relative "bootstrap/chef_vault_handler" + require_relative "bootstrap/client_builder" + require_relative "bootstrap/train_connector" end banner "knife bootstrap [PROTOCOL://][USER@]FQDN (options)" @@ -516,10 +516,10 @@ class Chef def bootstrap_context @bootstrap_context ||= if connection.windows? - require "chef/knife/core/windows_bootstrap_context" + require_relative "core/windows_bootstrap_context" Knife::Core::WindowsBootstrapContext.new(config, config[:run_list], Chef::Config, secret) else - require "chef/knife/core/bootstrap_context" + require_relative "core/bootstrap_context" Knife::Core::BootstrapContext.new(config, config[:run_list], Chef::Config, secret) end end diff --git a/lib/chef/knife/bootstrap/client_builder.rb b/lib/chef/knife/bootstrap/client_builder.rb index 09f4f67ced..1864297053 100644 --- a/lib/chef/knife/bootstrap/client_builder.rb +++ b/lib/chef/knife/bootstrap/client_builder.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/node" -require "chef/server_api" -require "chef/api_client/registration" -require "chef/api_client" +require_relative "../../node" +require_relative "../../server_api" +require_relative "../../api_client/registration" +require_relative "../../api_client" require "tmpdir" class Chef diff --git a/lib/chef/knife/client_bulk_delete.rb b/lib/chef/knife/client_bulk_delete.rb index a4777a4a16..9019abe6c0 100644 --- a/lib/chef/knife/client_bulk_delete.rb +++ b/lib/chef/knife/client_bulk_delete.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class ClientBulkDelete < Knife deps do - require "chef/api_client_v1" + require_relative "../api_client_v1" end option :delete_validators, diff --git a/lib/chef/knife/client_create.rb b/lib/chef/knife/client_create.rb index d87951555f..871b4e2aa5 100644 --- a/lib/chef/knife/client_create.rb +++ b/lib/chef/knife/client_create.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/knife" -require "chef/dist" +require_relative "" +require_relative "../dist" class Chef class Knife class ClientCreate < Knife deps do - require "chef/api_client_v1" + require_relative "../api_client_v1" end option :file, diff --git a/lib/chef/knife/client_delete.rb b/lib/chef/knife/client_delete.rb index b2e34352a2..05125df38c 100644 --- a/lib/chef/knife/client_delete.rb +++ b/lib/chef/knife/client_delete.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class ClientDelete < Knife deps do - require "chef/api_client_v1" + require_relative "../api_client_v1" end option :delete_validators, diff --git a/lib/chef/knife/client_edit.rb b/lib/chef/knife/client_edit.rb index 21fd3f457d..34b8014b69 100644 --- a/lib/chef/knife/client_edit.rb +++ b/lib/chef/knife/client_edit.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class ClientEdit < Knife deps do - require "chef/api_client_v1" + require_relative "../api_client_v1" end banner "knife client edit CLIENT (options)" diff --git a/lib/chef/knife/client_key_create.rb b/lib/chef/knife/client_key_create.rb index 1f209ec879..469e7ee19f 100644 --- a/lib/chef/knife/client_key_create.rb +++ b/lib/chef/knife/client_key_create.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/key_create" -require "chef/knife/key_create_base" +require_relative "" +require_relative "key_create" +require_relative "key_create_base" class Chef class Knife diff --git a/lib/chef/knife/client_key_delete.rb b/lib/chef/knife/client_key_delete.rb index 3463389a05..fb5357f398 100644 --- a/lib/chef/knife/client_key_delete.rb +++ b/lib/chef/knife/client_key_delete.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/key_delete" +require_relative "" +require_relative "key_delete" class Chef class Knife diff --git a/lib/chef/knife/client_key_edit.rb b/lib/chef/knife/client_key_edit.rb index 1a685b7a56..11fb97994a 100644 --- a/lib/chef/knife/client_key_edit.rb +++ b/lib/chef/knife/client_key_edit.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/key_edit" -require "chef/knife/key_edit_base" +require_relative "" +require_relative "key_edit" +require_relative "key_edit_base" class Chef class Knife diff --git a/lib/chef/knife/client_key_list.rb b/lib/chef/knife/client_key_list.rb index aa63c1196b..438649fbad 100644 --- a/lib/chef/knife/client_key_list.rb +++ b/lib/chef/knife/client_key_list.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/key_list" -require "chef/knife/key_list_base" +require_relative "" +require_relative "key_list" +require_relative "key_list_base" class Chef class Knife diff --git a/lib/chef/knife/client_key_show.rb b/lib/chef/knife/client_key_show.rb index 49bc9d3596..58e3d02431 100644 --- a/lib/chef/knife/client_key_show.rb +++ b/lib/chef/knife/client_key_show.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/key_show" +require_relative "" +require_relative "key_show" class Chef class Knife diff --git a/lib/chef/knife/client_list.rb b/lib/chef/knife/client_list.rb index 49d833353d..bf3e4862b0 100644 --- a/lib/chef/knife/client_list.rb +++ b/lib/chef/knife/client_list.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class ClientList < Knife deps do - require "chef/api_client_v1" + require_relative "../api_client_v1" end banner "knife client list (options)" diff --git a/lib/chef/knife/client_reregister.rb b/lib/chef/knife/client_reregister.rb index 37ef259cad..7ad6cd1890 100644 --- a/lib/chef/knife/client_reregister.rb +++ b/lib/chef/knife/client_reregister.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class ClientReregister < Knife deps do - require "chef/api_client_v1" + require_relative "../api_client_v1" end banner "knife client reregister CLIENT (options)" diff --git a/lib/chef/knife/client_show.rb b/lib/chef/knife/client_show.rb index 5a07ff7af1..945267e924 100644 --- a/lib/chef/knife/client_show.rb +++ b/lib/chef/knife/client_show.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife @@ -25,7 +25,7 @@ class Chef include Knife::Core::MultiAttributeReturnOption deps do - require "chef/api_client_v1" + require_relative "../api_client_v1" end banner "knife client show CLIENT (options)" diff --git a/lib/chef/knife/config_get.rb b/lib/chef/knife/config_get.rb index c687e39a29..914633b4be 100644 --- a/lib/chef/knife/config_get.rb +++ b/lib/chef/knife/config_get.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife diff --git a/lib/chef/knife/config_get_profile.rb b/lib/chef/knife/config_get_profile.rb index 309b7f81e8..6d89ebfeb5 100644 --- a/lib/chef/knife/config_get_profile.rb +++ b/lib/chef/knife/config_get_profile.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife diff --git a/lib/chef/knife/config_list_profiles.rb b/lib/chef/knife/config_list_profiles.rb index 5b971345c6..4ccd96f5ef 100644 --- a/lib/chef/knife/config_list_profiles.rb +++ b/lib/chef/knife/config_list_profiles.rb @@ -15,8 +15,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/workstation_config_loader" +require_relative "" +require_relative "../workstation_config_loader" class Chef class Knife diff --git a/lib/chef/knife/config_use_profile.rb b/lib/chef/knife/config_use_profile.rb index 515c4a5336..1502b48063 100644 --- a/lib/chef/knife/config_use_profile.rb +++ b/lib/chef/knife/config_use_profile.rb @@ -17,7 +17,7 @@ require "fileutils" -require "chef/knife" +require_relative "" class Chef class Knife diff --git a/lib/chef/knife/configure.rb b/lib/chef/knife/configure.rb index e24958e1fc..7570e2a177 100644 --- a/lib/chef/knife/configure.rb +++ b/lib/chef/knife/configure.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/util/path_helper" +require_relative "" +require_relative "../util/path_helper" class Chef class Knife diff --git a/lib/chef/knife/configure_client.rb b/lib/chef/knife/configure_client.rb index c015687ac7..e99d263d5f 100644 --- a/lib/chef/knife/configure_client.rb +++ b/lib/chef/knife/configure_client.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife diff --git a/lib/chef/knife/cookbook_bulk_delete.rb b/lib/chef/knife/cookbook_bulk_delete.rb index d895797598..3fb8e6d4ed 100644 --- a/lib/chef/knife/cookbook_bulk_delete.rb +++ b/lib/chef/knife/cookbook_bulk_delete.rb @@ -17,15 +17,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class CookbookBulkDelete < Knife deps do - require "chef/knife/cookbook_delete" - require "chef/cookbook_version" + require_relative "cookbook_delete" + require_relative "../cookbook_version" end option :purge, short: "-p", long: "--purge", boolean: true, description: "Permanently remove files from backing data store." diff --git a/lib/chef/knife/cookbook_delete.rb b/lib/chef/knife/cookbook_delete.rb index 3de35d0a72..4f3b1a91bc 100644 --- a/lib/chef/knife/cookbook_delete.rb +++ b/lib/chef/knife/cookbook_delete.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife @@ -25,7 +25,7 @@ class Chef attr_accessor :cookbook_name, :version deps do - require "chef/cookbook_version" + require_relative "../cookbook_version" end option :all, short: "-a", long: "--all", boolean: true, description: "Delete all versions of the cookbook." diff --git a/lib/chef/knife/cookbook_download.rb b/lib/chef/knife/cookbook_download.rb index d5b1040e3e..5d121df847 100644 --- a/lib/chef/knife/cookbook_download.rb +++ b/lib/chef/knife/cookbook_download.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife @@ -27,7 +27,7 @@ class Chef attr_accessor :cookbook_name deps do - require "chef/cookbook_version" + require_relative "../cookbook_version" end banner "knife cookbook download COOKBOOK [VERSION] (options)" diff --git a/lib/chef/knife/cookbook_list.rb b/lib/chef/knife/cookbook_list.rb index c5a5bd5835..c77c45a971 100644 --- a/lib/chef/knife/cookbook_list.rb +++ b/lib/chef/knife/cookbook_list.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife diff --git a/lib/chef/knife/cookbook_metadata.rb b/lib/chef/knife/cookbook_metadata.rb index 2b25f505a0..a0560be029 100644 --- a/lib/chef/knife/cookbook_metadata.rb +++ b/lib/chef/knife/cookbook_metadata.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class CookbookMetadata < Knife deps do - require "chef/cookbook_loader" - require "chef/cookbook/metadata" + require_relative "../cookbook_loader" + require_relative "../cookbook/metadata" end banner "knife cookbook metadata COOKBOOK (options)" diff --git a/lib/chef/knife/cookbook_metadata_from_file.rb b/lib/chef/knife/cookbook_metadata_from_file.rb index 1f98f28aff..7f90e6f54d 100644 --- a/lib/chef/knife/cookbook_metadata_from_file.rb +++ b/lib/chef/knife/cookbook_metadata_from_file.rb @@ -18,14 +18,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class CookbookMetadataFromFile < Knife deps do - require "chef/cookbook/metadata" + require_relative "../cookbook/metadata" end banner "knife cookbook metadata from FILE (options)" diff --git a/lib/chef/knife/cookbook_show.rb b/lib/chef/knife/cookbook_show.rb index d42c114556..70dd6d762c 100644 --- a/lib/chef/knife/cookbook_show.rb +++ b/lib/chef/knife/cookbook_show.rb @@ -16,16 +16,16 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class CookbookShow < Knife deps do - require "chef/json_compat" + require_relative "../json_compat" require "uri" - require "chef/cookbook_version" + require_relative "../cookbook_version" end banner "knife cookbook show COOKBOOK [VERSION] [PART] [FILENAME] (options)" diff --git a/lib/chef/knife/cookbook_site_download.rb b/lib/chef/knife/cookbook_site_download.rb index e288bcaf4f..bc412dbc86 100644 --- a/lib/chef/knife/cookbook_site_download.rb +++ b/lib/chef/knife/cookbook_site_download.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/supermarket_download" +require_relative "" +require_relative "supermarket_download" class Chef class Knife diff --git a/lib/chef/knife/cookbook_site_install.rb b/lib/chef/knife/cookbook_site_install.rb index 433e572533..fd29bd76a5 100644 --- a/lib/chef/knife/cookbook_site_install.rb +++ b/lib/chef/knife/cookbook_site_install.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/supermarket_install" +require_relative "" +require_relative "supermarket_install" class Chef class Knife diff --git a/lib/chef/knife/cookbook_site_list.rb b/lib/chef/knife/cookbook_site_list.rb index 5b65420e4f..95cd88892d 100644 --- a/lib/chef/knife/cookbook_site_list.rb +++ b/lib/chef/knife/cookbook_site_list.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/supermarket_list" +require_relative "" +require_relative "supermarket_list" class Chef class Knife diff --git a/lib/chef/knife/cookbook_site_search.rb b/lib/chef/knife/cookbook_site_search.rb index 21ea045ed3..e12329f8a4 100644 --- a/lib/chef/knife/cookbook_site_search.rb +++ b/lib/chef/knife/cookbook_site_search.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/supermarket_search" +require_relative "" +require_relative "supermarket_search" class Chef class Knife diff --git a/lib/chef/knife/cookbook_site_share.rb b/lib/chef/knife/cookbook_site_share.rb index 6fe4bbb520..d6a5278e2a 100644 --- a/lib/chef/knife/cookbook_site_share.rb +++ b/lib/chef/knife/cookbook_site_share.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/supermarket_share" +require_relative "" +require_relative "supermarket_share" class Chef class Knife diff --git a/lib/chef/knife/cookbook_site_show.rb b/lib/chef/knife/cookbook_site_show.rb index 4a8d7c090e..7616d8129c 100644 --- a/lib/chef/knife/cookbook_site_show.rb +++ b/lib/chef/knife/cookbook_site_show.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/supermarket_show" +require_relative "" +require_relative "supermarket_show" class Chef class Knife diff --git a/lib/chef/knife/cookbook_site_unshare.rb b/lib/chef/knife/cookbook_site_unshare.rb index 850511e650..fa8c5b78c9 100644 --- a/lib/chef/knife/cookbook_site_unshare.rb +++ b/lib/chef/knife/cookbook_site_unshare.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/supermarket_unshare" +require_relative "" +require_relative "supermarket_unshare" class Chef class Knife diff --git a/lib/chef/knife/cookbook_upload.rb b/lib/chef/knife/cookbook_upload.rb index d2a140540e..90a044addc 100644 --- a/lib/chef/knife/cookbook_upload.rb +++ b/lib/chef/knife/cookbook_upload.rb @@ -18,8 +18,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/cookbook_uploader" +require_relative "" +require_relative "../cookbook_uploader" class Chef class Knife @@ -29,9 +29,9 @@ class Chef MATCH_CHECKSUM = /[0-9a-f]{32,}/.freeze deps do - require "chef/exceptions" - require "chef/cookbook_loader" - require "chef/cookbook_uploader" + require_relative "../exceptions" + require_relative "../cookbook_loader" + require_relative "../cookbook_uploader" end banner "knife cookbook upload [COOKBOOKS...] (options)" diff --git a/lib/chef/knife/core/bootstrap_context.rb b/lib/chef/knife/core/bootstrap_context.rb index 0f6dc0aedf..759fb043c0 100644 --- a/lib/chef/knife/core/bootstrap_context.rb +++ b/lib/chef/knife/core/bootstrap_context.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/run_list" -require "chef/util/path_helper" +require_relative "../../run_list" +require_relative "../../util/path_helper" require "pathname" -require "chef/dist" +require_relative "../../dist" class Chef class Knife diff --git a/lib/chef/knife/core/cookbook_scm_repo.rb b/lib/chef/knife/core/cookbook_scm_repo.rb index ba3a40207a..f97923d96b 100644 --- a/lib/chef/knife/core/cookbook_scm_repo.rb +++ b/lib/chef/knife/core/cookbook_scm_repo.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/mixin/shell_out" +require_relative "../../mixin/shell_out" class Chef class Knife diff --git a/lib/chef/knife/core/gem_glob_loader.rb b/lib/chef/knife/core/gem_glob_loader.rb index 987aef754f..b5b9143552 100644 --- a/lib/chef/knife/core/gem_glob_loader.rb +++ b/lib/chef/knife/core/gem_glob_loader.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/version" -require "chef/util/path_helper" +require_relative "../../version" +require_relative "../../util/path_helper" class Chef class Knife class SubcommandLoader diff --git a/lib/chef/knife/core/generic_presenter.rb b/lib/chef/knife/core/generic_presenter.rb index 8995f1f85d..77c874e71a 100644 --- a/lib/chef/knife/core/generic_presenter.rb +++ b/lib/chef/knife/core/generic_presenter.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/knife/core/text_formatter" +require_relative "text_formatter" class Chef class Knife diff --git a/lib/chef/knife/core/hashed_command_loader.rb b/lib/chef/knife/core/hashed_command_loader.rb index dff4ae50ab..66856b6414 100644 --- a/lib/chef/knife/core/hashed_command_loader.rb +++ b/lib/chef/knife/core/hashed_command_loader.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/version" +require_relative "../../version" class Chef class Knife class SubcommandLoader diff --git a/lib/chef/knife/core/node_editor.rb b/lib/chef/knife/core/node_editor.rb index b009bf8652..753ee01704 100644 --- a/lib/chef/knife/core/node_editor.rb +++ b/lib/chef/knife/core/node_editor.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/json_compat" -require "chef/node" +require_relative "../../json_compat" +require_relative "../../node" class Chef class Knife diff --git a/lib/chef/knife/core/node_presenter.rb b/lib/chef/knife/core/node_presenter.rb index b46ff2ae77..a77e9d7a65 100644 --- a/lib/chef/knife/core/node_presenter.rb +++ b/lib/chef/knife/core/node_presenter.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife/core/text_formatter" -require "chef/knife/core/generic_presenter" +require_relative "text_formatter" +require_relative "generic_presenter" class Chef class Knife diff --git a/lib/chef/knife/core/object_loader.rb b/lib/chef/knife/core/object_loader.rb index b08483f9a2..d87b3eaf71 100644 --- a/lib/chef/knife/core/object_loader.rb +++ b/lib/chef/knife/core/object_loader.rb @@ -17,8 +17,8 @@ # require "ffi_yajl" -require "chef/util/path_helper" -require "chef/data_bag_item" +require_relative "../../util/path_helper" +require_relative "../../data_bag_item" class Chef class Knife diff --git a/lib/chef/knife/core/status_presenter.rb b/lib/chef/knife/core/status_presenter.rb index dfd8eb8956..820c572f1f 100644 --- a/lib/chef/knife/core/status_presenter.rb +++ b/lib/chef/knife/core/status_presenter.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife/core/text_formatter" -require "chef/knife/core/generic_presenter" +require_relative "text_formatter" +require_relative "generic_presenter" class Chef class Knife diff --git a/lib/chef/knife/core/subcommand_loader.rb b/lib/chef/knife/core/subcommand_loader.rb index fb3723de50..bb84c55dd9 100644 --- a/lib/chef/knife/core/subcommand_loader.rb +++ b/lib/chef/knife/core/subcommand_loader.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/version" -require "chef/util/path_helper" -require "chef/knife/core/gem_glob_loader" -require "chef/knife/core/hashed_command_loader" +require_relative "../../version" +require_relative "../../util/path_helper" +require_relative "gem_glob_loader" +require_relative "hashed_command_loader" class Chef class Knife diff --git a/lib/chef/knife/core/ui.rb b/lib/chef/knife/core/ui.rb index 9801b8d033..cbda9c20f5 100644 --- a/lib/chef/knife/core/ui.rb +++ b/lib/chef/knife/core/ui.rb @@ -19,8 +19,8 @@ # require "forwardable" -require "chef/platform/query_helpers" -require "chef/knife/core/generic_presenter" +require_relative "../../platform/query_helpers" +require_relative "generic_presenter" require "tempfile" class Chef diff --git a/lib/chef/knife/core/windows_bootstrap_context.rb b/lib/chef/knife/core/windows_bootstrap_context.rb index 285afe8969..b06ddd9fcc 100644 --- a/lib/chef/knife/core/windows_bootstrap_context.rb +++ b/lib/chef/knife/core/windows_bootstrap_context.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/knife/core/bootstrap_context" -require "chef/util/path_helper" -require "chef/dist" +require_relative "bootstrap_context" +require_relative "../../util/path_helper" +require_relative "../../dist" class Chef class Knife diff --git a/lib/chef/knife/data_bag_create.rb b/lib/chef/knife/data_bag_create.rb index bf90fb81b3..71572c32a1 100644 --- a/lib/chef/knife/data_bag_create.rb +++ b/lib/chef/knife/data_bag_create.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/data_bag_secret_options" +require_relative "" +require_relative "data_bag_secret_options" class Chef class Knife @@ -26,8 +26,8 @@ class Chef include DataBagSecretOptions deps do - require "chef/data_bag" - require "chef/encrypted_data_bag_item" + require_relative "../data_bag" + require_relative "../encrypted_data_bag_item" end banner "knife data bag create BAG [ITEM] (options)" diff --git a/lib/chef/knife/data_bag_delete.rb b/lib/chef/knife/data_bag_delete.rb index c1ea2013c8..5b1f9aa1c9 100644 --- a/lib/chef/knife/data_bag_delete.rb +++ b/lib/chef/knife/data_bag_delete.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class DataBagDelete < Knife deps do - require "chef/data_bag" + require_relative "../data_bag" end banner "knife data bag delete BAG [ITEM] (options)" diff --git a/lib/chef/knife/data_bag_edit.rb b/lib/chef/knife/data_bag_edit.rb index 6c7f73ad6c..bd3ec7121f 100644 --- a/lib/chef/knife/data_bag_edit.rb +++ b/lib/chef/knife/data_bag_edit.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/data_bag_secret_options" +require_relative "" +require_relative "data_bag_secret_options" class Chef class Knife @@ -26,8 +26,8 @@ class Chef include DataBagSecretOptions deps do - require "chef/data_bag_item" - require "chef/encrypted_data_bag_item" + require_relative "../data_bag_item" + require_relative "../encrypted_data_bag_item" end banner "knife data bag edit BAG ITEM (options)" diff --git a/lib/chef/knife/data_bag_from_file.rb b/lib/chef/knife/data_bag_from_file.rb index 1cf7a07a36..33d37210fa 100644 --- a/lib/chef/knife/data_bag_from_file.rb +++ b/lib/chef/knife/data_bag_from_file.rb @@ -17,9 +17,9 @@ # limitations under the License. # -require "chef/knife" -require "chef/util/path_helper" -require "chef/knife/data_bag_secret_options" +require_relative "" +require_relative "../util/path_helper" +require_relative "data_bag_secret_options" class Chef class Knife @@ -27,10 +27,10 @@ class Chef include DataBagSecretOptions deps do - require "chef/data_bag" - require "chef/data_bag_item" - require "chef/knife/core/object_loader" - require "chef/encrypted_data_bag_item" + require_relative "../data_bag" + require_relative "../data_bag_item" + require_relative "core/object_loader" + require_relative "../encrypted_data_bag_item" end banner "knife data bag from file BAG FILE|FOLDER [FILE|FOLDER..] (options)" diff --git a/lib/chef/knife/data_bag_list.rb b/lib/chef/knife/data_bag_list.rb index d6f6142136..566aa406a4 100644 --- a/lib/chef/knife/data_bag_list.rb +++ b/lib/chef/knife/data_bag_list.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class DataBagList < Knife deps do - require "chef/data_bag" + require_relative "../data_bag" end banner "knife data bag list (options)" diff --git a/lib/chef/knife/data_bag_secret_options.rb b/lib/chef/knife/data_bag_secret_options.rb index 5f49b5f137..19b0dfca38 100644 --- a/lib/chef/knife/data_bag_secret_options.rb +++ b/lib/chef/knife/data_bag_secret_options.rb @@ -17,8 +17,8 @@ # require "mixlib/cli" -require "chef/config" -require "chef/encrypted_data_bag_item/check_encrypted" +require_relative "../config" +require_relative "../encrypted_data_bag_item/check_encrypted" class Chef class Knife @@ -65,7 +65,7 @@ class Chef def read_secret # Moving the non 'compile-time' requires into here to speed up knife command loading # IE, if we are not running 'knife data bag *' we don't need to load 'chef/encrypted_data_bag_item' - require "chef/encrypted_data_bag_item" + require_relative "../encrypted_data_bag_item" if has_cl_secret? config[:secret] diff --git a/lib/chef/knife/data_bag_show.rb b/lib/chef/knife/data_bag_show.rb index eeebd11832..ef707d6b79 100644 --- a/lib/chef/knife/data_bag_show.rb +++ b/lib/chef/knife/data_bag_show.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/data_bag_secret_options" +require_relative "" +require_relative "data_bag_secret_options" class Chef class Knife @@ -26,8 +26,8 @@ class Chef include DataBagSecretOptions deps do - require "chef/data_bag" - require "chef/encrypted_data_bag_item" + require_relative "../data_bag" + require_relative "../encrypted_data_bag_item" end banner "knife data bag show BAG [ITEM] (options)" diff --git a/lib/chef/knife/delete.rb b/lib/chef/knife/delete.rb index 7d2f4c405f..d1888e127a 100644 --- a/lib/chef/knife/delete.rb +++ b/lib/chef/knife/delete.rb @@ -14,7 +14,7 @@ # limitations under the License. # -require "chef/chef_fs/knife" +require_relative "../chef_fs/knife" class Chef class Knife @@ -24,7 +24,7 @@ class Chef category "path-based" deps do - require "chef/chef_fs/file_system" + require_relative "../chef_fs/file_system" end option :recurse, diff --git a/lib/chef/knife/deps.rb b/lib/chef/knife/deps.rb index 8efa0d0b65..bc4b853879 100644 --- a/lib/chef/knife/deps.rb +++ b/lib/chef/knife/deps.rb @@ -14,7 +14,7 @@ # limitations under the License. # -require "chef/chef_fs/knife" +require_relative "../chef_fs/knife" class Chef class Knife @@ -24,8 +24,8 @@ class Chef category "path-based" deps do - require "chef/chef_fs/file_system" - require "chef/run_list" + require_relative "../chef_fs/file_system" + require_relative "../run_list" end option :recurse, diff --git a/lib/chef/knife/diff.rb b/lib/chef/knife/diff.rb index bd75d31194..3e9336aacc 100644 --- a/lib/chef/knife/diff.rb +++ b/lib/chef/knife/diff.rb @@ -14,7 +14,7 @@ # limitations under the License. # -require "chef/chef_fs/knife" +require_relative "../chef_fs/knife" class Chef class Knife @@ -24,7 +24,7 @@ class Chef category "path-based" deps do - require "chef/chef_fs/command_line" + require_relative "../chef_fs/command_line" end option :recurse, diff --git a/lib/chef/knife/download.rb b/lib/chef/knife/download.rb index 57e0aee3e9..b3cf61430f 100644 --- a/lib/chef/knife/download.rb +++ b/lib/chef/knife/download.rb @@ -14,7 +14,7 @@ # limitations under the License. # -require "chef/chef_fs/knife" +require_relative "../chef_fs/knife" class Chef class Knife @@ -24,7 +24,7 @@ class Chef category "path-based" deps do - require "chef/chef_fs/command_line" + require_relative "../chef_fs/command_line" end option :recurse, diff --git a/lib/chef/knife/edit.rb b/lib/chef/knife/edit.rb index fabc282cc2..406782ef85 100644 --- a/lib/chef/knife/edit.rb +++ b/lib/chef/knife/edit.rb @@ -14,7 +14,7 @@ # limitations under the License. # -require "chef/chef_fs/knife" +require_relative "../chef_fs/knife" class Chef class Knife @@ -24,8 +24,8 @@ class Chef category "path-based" deps do - require "chef/chef_fs/file_system" - require "chef/chef_fs/file_system/exceptions" + require_relative "../chef_fs/file_system" + require_relative "../chef_fs/file_system/exceptions" end option :local, diff --git a/lib/chef/knife/environment_compare.rb b/lib/chef/knife/environment_compare.rb index b5f1c9be7e..22bd373680 100644 --- a/lib/chef/knife/environment_compare.rb +++ b/lib/chef/knife/environment_compare.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class EnvironmentCompare < Knife deps do - require "chef/environment" + require_relative "../environment" end banner "knife environment compare [ENVIRONMENT..] (options)" diff --git a/lib/chef/knife/environment_create.rb b/lib/chef/knife/environment_create.rb index 6d8321b9b7..97de87caa1 100644 --- a/lib/chef/knife/environment_create.rb +++ b/lib/chef/knife/environment_create.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class EnvironmentCreate < Knife deps do - require "chef/environment" + require_relative "../environment" end banner "knife environment create ENVIRONMENT (options)" diff --git a/lib/chef/knife/environment_delete.rb b/lib/chef/knife/environment_delete.rb index 8368ce9dcd..b7f8d0c358 100644 --- a/lib/chef/knife/environment_delete.rb +++ b/lib/chef/knife/environment_delete.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class EnvironmentDelete < Knife deps do - require "chef/environment" + require_relative "../environment" end banner "knife environment delete ENVIRONMENT (options)" diff --git a/lib/chef/knife/environment_edit.rb b/lib/chef/knife/environment_edit.rb index 29f1467626..a6884804d4 100644 --- a/lib/chef/knife/environment_edit.rb +++ b/lib/chef/knife/environment_edit.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class EnvironmentEdit < Knife deps do - require "chef/environment" + require_relative "../environment" end banner "knife environment edit ENVIRONMENT (options)" diff --git a/lib/chef/knife/environment_from_file.rb b/lib/chef/knife/environment_from_file.rb index c533a7351d..6a35e07efe 100644 --- a/lib/chef/knife/environment_from_file.rb +++ b/lib/chef/knife/environment_from_file.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class EnvironmentFromFile < Knife deps do - require "chef/environment" - require "chef/knife/core/object_loader" + require_relative "../environment" + require_relative "core/object_loader" end banner "knife environment from file FILE [FILE..] (options)" diff --git a/lib/chef/knife/environment_list.rb b/lib/chef/knife/environment_list.rb index 6b4b8508fa..01646cd40f 100644 --- a/lib/chef/knife/environment_list.rb +++ b/lib/chef/knife/environment_list.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class EnvironmentList < Knife deps do - require "chef/environment" + require_relative "../environment" end banner "knife environment list (options)" diff --git a/lib/chef/knife/environment_show.rb b/lib/chef/knife/environment_show.rb index 04d17ed1f4..7c5d2a5482 100644 --- a/lib/chef/knife/environment_show.rb +++ b/lib/chef/knife/environment_show.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife @@ -25,7 +25,7 @@ class Chef include Knife::Core::MultiAttributeReturnOption deps do - require "chef/environment" + require_relative "../environment" end banner "knife environment show ENVIRONMENT (options)" diff --git a/lib/chef/knife/exec.rb b/lib/chef/knife/exec.rb index 63598923de..009a13e816 100644 --- a/lib/chef/knife/exec.rb +++ b/lib/chef/knife/exec.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/util/path_helper" +require_relative "" +require_relative "../util/path_helper" class Chef::Knife::Exec < Chef::Knife @@ -35,7 +35,7 @@ class Chef::Knife::Exec < Chef::Knife proc: lambda { |o| o.split(":") } deps do - require "chef/shell/ext" + require_relative "../shell/ext" end def run diff --git a/lib/chef/knife/key_create.rb b/lib/chef/knife/key_create.rb index f278af8b77..a16e07d086 100644 --- a/lib/chef/knife/key_create.rb +++ b/lib/chef/knife/key_create.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/key" -require "chef/json_compat" -require "chef/exceptions" +require_relative "../key" +require_relative "../json_compat" +require_relative "../exceptions" class Chef class Knife diff --git a/lib/chef/knife/key_delete.rb b/lib/chef/knife/key_delete.rb index a798e06475..154fb5abcb 100644 --- a/lib/chef/knife/key_delete.rb +++ b/lib/chef/knife/key_delete.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/key" +require_relative "../key" class Chef class Knife diff --git a/lib/chef/knife/key_edit.rb b/lib/chef/knife/key_edit.rb index 4e36bdfded..c6c67a18ee 100644 --- a/lib/chef/knife/key_edit.rb +++ b/lib/chef/knife/key_edit.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/key" -require "chef/json_compat" -require "chef/exceptions" +require_relative "../key" +require_relative "../json_compat" +require_relative "../exceptions" class Chef class Knife diff --git a/lib/chef/knife/key_list.rb b/lib/chef/knife/key_list.rb index 3078ca44d3..5295238f6f 100644 --- a/lib/chef/knife/key_list.rb +++ b/lib/chef/knife/key_list.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/key" -require "chef/json_compat" -require "chef/exceptions" +require_relative "../key" +require_relative "../json_compat" +require_relative "../exceptions" class Chef class Knife diff --git a/lib/chef/knife/key_show.rb b/lib/chef/knife/key_show.rb index 851db7208b..a208fc04a6 100644 --- a/lib/chef/knife/key_show.rb +++ b/lib/chef/knife/key_show.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/key" -require "chef/json_compat" -require "chef/exceptions" +require_relative "../key" +require_relative "../json_compat" +require_relative "../exceptions" class Chef class Knife diff --git a/lib/chef/knife/list.rb b/lib/chef/knife/list.rb index 10018ff74c..08bb73e489 100644 --- a/lib/chef/knife/list.rb +++ b/lib/chef/knife/list.rb @@ -14,7 +14,7 @@ # limitations under the License. # -require "chef/chef_fs/knife" +require_relative "../chef_fs/knife" class Chef class Knife @@ -24,7 +24,7 @@ class Chef category "path-based" deps do - require "chef/chef_fs/file_system" + require_relative "../chef_fs/file_system" require "tty-screen" end diff --git a/lib/chef/knife/node_bulk_delete.rb b/lib/chef/knife/node_bulk_delete.rb index 2ca63da512..071f4b3478 100644 --- a/lib/chef/knife/node_bulk_delete.rb +++ b/lib/chef/knife/node_bulk_delete.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class NodeBulkDelete < Knife deps do - require "chef/node" - require "chef/json_compat" + require_relative "../node" + require_relative "../json_compat" end banner "knife node bulk delete REGEX (options)" diff --git a/lib/chef/knife/node_create.rb b/lib/chef/knife/node_create.rb index f80ac9e87c..a5bd121f53 100644 --- a/lib/chef/knife/node_create.rb +++ b/lib/chef/knife/node_create.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class NodeCreate < Knife deps do - require "chef/node" - require "chef/json_compat" + require_relative "../node" + require_relative "../json_compat" end banner "knife node create NODE (options)" diff --git a/lib/chef/knife/node_delete.rb b/lib/chef/knife/node_delete.rb index 52b8d122ca..cb2081b865 100644 --- a/lib/chef/knife/node_delete.rb +++ b/lib/chef/knife/node_delete.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class NodeDelete < Knife deps do - require "chef/node" - require "chef/json_compat" + require_relative "../node" + require_relative "../json_compat" end banner "knife node delete [NODE [NODE]] (options)" diff --git a/lib/chef/knife/node_edit.rb b/lib/chef/knife/node_edit.rb index b97302a3da..551db055ea 100644 --- a/lib/chef/knife/node_edit.rb +++ b/lib/chef/knife/node_edit.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife @@ -24,9 +24,9 @@ class Chef class NodeEdit < Knife deps do - require "chef/node" - require "chef/json_compat" - require "chef/knife/core/node_editor" + require_relative "../node" + require_relative "../json_compat" + require_relative "core/node_editor" end banner "knife node edit NODE (options)" diff --git a/lib/chef/knife/node_environment_set.rb b/lib/chef/knife/node_environment_set.rb index ecba01be29..b5f8a6ed7d 100644 --- a/lib/chef/knife/node_environment_set.rb +++ b/lib/chef/knife/node_environment_set.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class NodeEnvironmentSet < Knife deps do - require "chef/node" + require_relative "../node" end banner "knife node environment set NODE ENVIRONMENT" diff --git a/lib/chef/knife/node_from_file.rb b/lib/chef/knife/node_from_file.rb index 61b83edd92..dc8ebff81b 100644 --- a/lib/chef/knife/node_from_file.rb +++ b/lib/chef/knife/node_from_file.rb @@ -16,16 +16,16 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class NodeFromFile < Knife deps do - require "chef/node" - require "chef/json_compat" - require "chef/knife/core/object_loader" + require_relative "../node" + require_relative "../json_compat" + require_relative "core/object_loader" end banner "knife node from file FILE (options)" diff --git a/lib/chef/knife/node_list.rb b/lib/chef/knife/node_list.rb index 651f30862d..9513cbc966 100644 --- a/lib/chef/knife/node_list.rb +++ b/lib/chef/knife/node_list.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class NodeList < Knife deps do - require "chef/node" - require "chef/json_compat" + require_relative "../node" + require_relative "../json_compat" end banner "knife node list (options)" diff --git a/lib/chef/knife/node_policy_set.rb b/lib/chef/knife/node_policy_set.rb index 404446fe0e..191fc06245 100644 --- a/lib/chef/knife/node_policy_set.rb +++ b/lib/chef/knife/node_policy_set.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class NodePolicySet < Knife deps do - require "chef/node" - require "chef/json_compat" + require_relative "../node" + require_relative "../json_compat" end banner "knife node policy set NODE POLICY_GROUP POLICY_NAME (options)" diff --git a/lib/chef/knife/node_run_list_add.rb b/lib/chef/knife/node_run_list_add.rb index eed9343e0a..6fc94422c0 100644 --- a/lib/chef/knife/node_run_list_add.rb +++ b/lib/chef/knife/node_run_list_add.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class NodeRunListAdd < Knife deps do - require "chef/node" - require "chef/json_compat" + require_relative "../node" + require_relative "../json_compat" end banner "knife node run_list add [NODE] [ENTRY [ENTRY]] (options)" diff --git a/lib/chef/knife/node_run_list_remove.rb b/lib/chef/knife/node_run_list_remove.rb index df50818c23..11ca4a4e51 100644 --- a/lib/chef/knife/node_run_list_remove.rb +++ b/lib/chef/knife/node_run_list_remove.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class NodeRunListRemove < Knife deps do - require "chef/node" - require "chef/json_compat" + require_relative "../node" + require_relative "../json_compat" end banner "knife node run_list remove [NODE] [ENTRY [ENTRY]] (options)" diff --git a/lib/chef/knife/node_run_list_set.rb b/lib/chef/knife/node_run_list_set.rb index 2d68c88415..ffe5877bb3 100644 --- a/lib/chef/knife/node_run_list_set.rb +++ b/lib/chef/knife/node_run_list_set.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class NodeRunListSet < Knife deps do - require "chef/node" - require "chef/json_compat" + require_relative "../node" + require_relative "../json_compat" end banner "knife node run_list set NODE ENTRIES (options)" diff --git a/lib/chef/knife/node_show.rb b/lib/chef/knife/node_show.rb index 90cdbdb641..38ab60576d 100644 --- a/lib/chef/knife/node_show.rb +++ b/lib/chef/knife/node_show.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/core/node_presenter" +require_relative "" +require_relative "core/node_presenter" class Chef class Knife @@ -27,8 +27,8 @@ class Chef include Knife::Core::MultiAttributeReturnOption deps do - require "chef/node" - require "chef/json_compat" + require_relative "../node" + require_relative "../json_compat" end banner "knife node show NODE (options)" diff --git a/lib/chef/knife/raw.rb b/lib/chef/knife/raw.rb index a9a757069b..476ab52880 100644 --- a/lib/chef/knife/raw.rb +++ b/lib/chef/knife/raw.rb @@ -14,8 +14,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/http" +require_relative "" +require_relative "../http" class Chef class Knife @@ -23,13 +23,13 @@ class Chef banner "knife raw REQUEST_PATH (options)" deps do - require "chef/json_compat" - require "chef/config" - require "chef/http" - require "chef/http/authenticator" - require "chef/http/cookie_manager" - require "chef/http/decompressor" - require "chef/http/json_output" + require_relative "../json_compat" + require_relative "../config" + require_relative "../http" + require_relative "../http/authenticator" + require_relative "../http/cookie_manager" + require_relative "../http/decompressor" + require_relative "../http/json_output" end option :method, diff --git a/lib/chef/knife/recipe_list.rb b/lib/chef/knife/recipe_list.rb index 8f76e494ad..8f2c6354ad 100644 --- a/lib/chef/knife/recipe_list.rb +++ b/lib/chef/knife/recipe_list.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef::Knife::RecipeList < Chef::Knife banner "knife recipe list [PATTERN]" diff --git a/lib/chef/knife/rehash.rb b/lib/chef/knife/rehash.rb index 79286368f8..8e4bbdd323 100644 --- a/lib/chef/knife/rehash.rb +++ b/lib/chef/knife/rehash.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/core/subcommand_loader" +require_relative "" +require_relative "core/subcommand_loader" class Chef class Knife diff --git a/lib/chef/knife/role_bulk_delete.rb b/lib/chef/knife/role_bulk_delete.rb index 0726454da3..2fdcf9d673 100644 --- a/lib/chef/knife/role_bulk_delete.rb +++ b/lib/chef/knife/role_bulk_delete.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class RoleBulkDelete < Knife deps do - require "chef/role" - require "chef/json_compat" + require_relative "../role" + require_relative "../json_compat" end banner "knife role bulk delete REGEX (options)" diff --git a/lib/chef/knife/role_create.rb b/lib/chef/knife/role_create.rb index f271dddd98..bd6248d120 100644 --- a/lib/chef/knife/role_create.rb +++ b/lib/chef/knife/role_create.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class RoleCreate < Knife deps do - require "chef/role" - require "chef/json_compat" + require_relative "../role" + require_relative "../json_compat" end banner "knife role create ROLE (options)" diff --git a/lib/chef/knife/role_delete.rb b/lib/chef/knife/role_delete.rb index 5c10a05d85..6114804f2e 100644 --- a/lib/chef/knife/role_delete.rb +++ b/lib/chef/knife/role_delete.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class RoleDelete < Knife deps do - require "chef/role" - require "chef/json_compat" + require_relative "../role" + require_relative "../json_compat" end banner "knife role delete ROLE (options)" diff --git a/lib/chef/knife/role_edit.rb b/lib/chef/knife/role_edit.rb index d3697849ad..8e9803a10c 100644 --- a/lib/chef/knife/role_edit.rb +++ b/lib/chef/knife/role_edit.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class RoleEdit < Knife deps do - require "chef/role" - require "chef/json_compat" + require_relative "../role" + require_relative "../json_compat" end banner "knife role edit ROLE (options)" diff --git a/lib/chef/knife/role_env_run_list_add.rb b/lib/chef/knife/role_env_run_list_add.rb index 884f104e65..83e3e1e39d 100644 --- a/lib/chef/knife/role_env_run_list_add.rb +++ b/lib/chef/knife/role_env_run_list_add.rb @@ -17,15 +17,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class RoleEnvRunListAdd < Knife deps do - require "chef/role" - require "chef/json_compat" + require_relative "../role" + require_relative "../json_compat" end banner "knife role env_run_list add [ROLE] [ENVIRONMENT] [ENTRY [ENTRY]] (options)" diff --git a/lib/chef/knife/role_env_run_list_clear.rb b/lib/chef/knife/role_env_run_list_clear.rb index ecc41347eb..c7f90be22a 100644 --- a/lib/chef/knife/role_env_run_list_clear.rb +++ b/lib/chef/knife/role_env_run_list_clear.rb @@ -17,15 +17,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class RoleEnvRunListClear < Knife deps do - require "chef/role" - require "chef/json_compat" + require_relative "../role" + require_relative "../json_compat" end banner "knife role env_run_list clear [ROLE] [ENVIRONMENT] (options)" diff --git a/lib/chef/knife/role_env_run_list_remove.rb b/lib/chef/knife/role_env_run_list_remove.rb index 9b627a00fc..91dd00cceb 100644 --- a/lib/chef/knife/role_env_run_list_remove.rb +++ b/lib/chef/knife/role_env_run_list_remove.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class RoleEnvRunListRemove < Knife deps do - require "chef/role" - require "chef/json_compat" + require_relative "../role" + require_relative "../json_compat" end banner "knife role env_run_list remove [ROLE] [ENVIRONMENT] [ENTRIES] (options)" diff --git a/lib/chef/knife/role_env_run_list_replace.rb b/lib/chef/knife/role_env_run_list_replace.rb index f4e4dfec66..1ca5701bc2 100644 --- a/lib/chef/knife/role_env_run_list_replace.rb +++ b/lib/chef/knife/role_env_run_list_replace.rb @@ -17,15 +17,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class RoleEnvRunListReplace < Knife deps do - require "chef/role" - require "chef/json_compat" + require_relative "../role" + require_relative "../json_compat" end banner "knife role env_run_list replace [ROLE] [ENVIRONMENT] [OLD_ENTRY] [NEW_ENTRY] (options)" diff --git a/lib/chef/knife/role_env_run_list_set.rb b/lib/chef/knife/role_env_run_list_set.rb index fd8afd6652..a15097f851 100644 --- a/lib/chef/knife/role_env_run_list_set.rb +++ b/lib/chef/knife/role_env_run_list_set.rb @@ -17,15 +17,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class RoleEnvRunListSet < Knife deps do - require "chef/role" - require "chef/json_compat" + require_relative "../role" + require_relative "../json_compat" end banner "knife role env_run_list set [ROLE] [ENVIRONMENT] [ENTRIES] (optionss)" diff --git a/lib/chef/knife/role_from_file.rb b/lib/chef/knife/role_from_file.rb index bf21a38fd7..3b04c3e1f6 100644 --- a/lib/chef/knife/role_from_file.rb +++ b/lib/chef/knife/role_from_file.rb @@ -16,16 +16,16 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class RoleFromFile < Knife deps do - require "chef/role" - require "chef/knife/core/object_loader" - require "chef/json_compat" + require_relative "../role" + require_relative "core/object_loader" + require_relative "../json_compat" end banner "knife role from file FILE [FILE..] (options)" diff --git a/lib/chef/knife/role_list.rb b/lib/chef/knife/role_list.rb index 41261e09ee..0445dd343c 100644 --- a/lib/chef/knife/role_list.rb +++ b/lib/chef/knife/role_list.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class RoleList < Knife deps do - require "chef/node" - require "chef/json_compat" + require_relative "../node" + require_relative "../json_compat" end banner "knife role list (options)" diff --git a/lib/chef/knife/role_run_list_add.rb b/lib/chef/knife/role_run_list_add.rb index ad79434c32..01ed32e920 100644 --- a/lib/chef/knife/role_run_list_add.rb +++ b/lib/chef/knife/role_run_list_add.rb @@ -17,15 +17,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class RoleRunListAdd < Knife deps do - require "chef/role" - require "chef/json_compat" + require_relative "../role" + require_relative "../json_compat" end banner "knife role run_list add [ROLE] [ENTRY [ENTRY]] (options)" diff --git a/lib/chef/knife/role_run_list_clear.rb b/lib/chef/knife/role_run_list_clear.rb index a3fde43875..f4ba318f60 100644 --- a/lib/chef/knife/role_run_list_clear.rb +++ b/lib/chef/knife/role_run_list_clear.rb @@ -17,15 +17,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class RoleRunListClear < Knife deps do - require "chef/role" - require "chef/json_compat" + require_relative "../role" + require_relative "../json_compat" end banner "knife role run_list clear [ROLE] (options)" diff --git a/lib/chef/knife/role_run_list_remove.rb b/lib/chef/knife/role_run_list_remove.rb index 39e935605e..b37fd2ebaf 100644 --- a/lib/chef/knife/role_run_list_remove.rb +++ b/lib/chef/knife/role_run_list_remove.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class RoleRunListRemove < Knife deps do - require "chef/role" + require_relative "../role" end banner "knife role run_list remove [ROLE] [ENTRY] (options)" diff --git a/lib/chef/knife/role_run_list_replace.rb b/lib/chef/knife/role_run_list_replace.rb index bb93661548..01334e7658 100644 --- a/lib/chef/knife/role_run_list_replace.rb +++ b/lib/chef/knife/role_run_list_replace.rb @@ -17,15 +17,15 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class RoleRunListReplace < Knife deps do - require "chef/role" - require "chef/json_compat" + require_relative "../role" + require_relative "../json_compat" end banner "knife role run_list replace [ROLE] [OLD_ENTRY] [NEW_ENTRY] (options)" diff --git a/lib/chef/knife/role_run_list_set.rb b/lib/chef/knife/role_run_list_set.rb index d424bad7e6..3bc8ad2d0c 100644 --- a/lib/chef/knife/role_run_list_set.rb +++ b/lib/chef/knife/role_run_list_set.rb @@ -17,14 +17,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class RoleRunListSet < Knife deps do - require "chef/role" + require_relative "../role" end banner "knife role run_list set [ROLE] [ENTRIES] (options)" diff --git a/lib/chef/knife/role_show.rb b/lib/chef/knife/role_show.rb index cad0344eca..bc99a9ea72 100644 --- a/lib/chef/knife/role_show.rb +++ b/lib/chef/knife/role_show.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife @@ -25,7 +25,7 @@ class Chef include Knife::Core::MultiAttributeReturnOption deps do - require "chef/role" + require_relative "../role" end banner "knife role show ROLE (options)" diff --git a/lib/chef/knife/search.rb b/lib/chef/knife/search.rb index 168db6da1a..9f3ce15041 100644 --- a/lib/chef/knife/search.rb +++ b/lib/chef/knife/search.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/core/node_presenter" +require_relative "" +require_relative "core/node_presenter" require "addressable/uri" class Chef @@ -27,10 +27,10 @@ class Chef include Knife::Core::MultiAttributeReturnOption deps do - require "chef/node" - require "chef/environment" - require "chef/api_client" - require "chef/search/query" + require_relative "../node" + require_relative "../environment" + require_relative "../api_client" + require_relative "../search/query" end include Knife::Core::NodeFormattingOptions diff --git a/lib/chef/knife/serve.rb b/lib/chef/knife/serve.rb index 0a731bfa38..dfa7e1522d 100644 --- a/lib/chef/knife/serve.rb +++ b/lib/chef/knife/serve.rb @@ -14,8 +14,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/local_mode" +require_relative "" +require_relative "../local_mode" class Chef class Knife diff --git a/lib/chef/knife/show.rb b/lib/chef/knife/show.rb index 10a1d521e3..0e5ab9d0fe 100644 --- a/lib/chef/knife/show.rb +++ b/lib/chef/knife/show.rb @@ -14,7 +14,7 @@ # limitations under the License. # -require "chef/chef_fs/knife" +require_relative "../chef_fs/knife" class Chef class Knife @@ -24,8 +24,8 @@ class Chef category "path-based" deps do - require "chef/chef_fs/file_system" - require "chef/chef_fs/file_system/exceptions" + require_relative "../chef_fs/file_system" + require_relative "../chef_fs/file_system/exceptions" end option :local, diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb index ab7623a4d8..0f69044461 100644 --- a/lib/chef/knife/ssh.rb +++ b/lib/chef/knife/ssh.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/mixin/shell_out" -require "chef/knife" +require_relative "../mixin/shell_out" +require_relative "" class Chef class Knife @@ -27,9 +27,9 @@ class Chef require "net/ssh" require "net/ssh/multi" require "readline" - require "chef/exceptions" - require "chef/search/query" - require "chef/util/path_helper" + require_relative "../exceptions" + require_relative "../search/query" + require_relative "../util/path_helper" require "mixlib/shellout" end diff --git a/lib/chef/knife/ssl_check.rb b/lib/chef/knife/ssl_check.rb index 6508c5f02d..a952688144 100644 --- a/lib/chef/knife/ssl_check.rb +++ b/lib/chef/knife/ssl_check.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/config" +require_relative "" +require_relative "../config" class Chef class Knife @@ -27,9 +27,9 @@ class Chef require "pp" require "socket" require "uri" - require "chef/http/ssl_policies" + require_relative "../http/ssl_policies" require "openssl" - require "chef/mixin/proxified_socket" + require_relative "../mixin/proxified_socket" include Chef::Mixin::ProxifiedSocket end diff --git a/lib/chef/knife/ssl_fetch.rb b/lib/chef/knife/ssl_fetch.rb index 9e1579a5f8..c0a7df84bd 100644 --- a/lib/chef/knife/ssl_fetch.rb +++ b/lib/chef/knife/ssl_fetch.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/config" +require_relative "" +require_relative "../config" class Chef class Knife @@ -28,7 +28,7 @@ class Chef require "socket" require "uri" require "openssl" - require "chef/mixin/proxified_socket" + require_relative "../mixin/proxified_socket" include Chef::Mixin::ProxifiedSocket end diff --git a/lib/chef/knife/status.rb b/lib/chef/knife/status.rb index 471c47b9f9..f0ed45e4c2 100644 --- a/lib/chef/knife/status.rb +++ b/lib/chef/knife/status.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/core/status_presenter" -require "chef/knife/core/node_presenter" +require_relative "" +require_relative "core/status_presenter" +require_relative "core/node_presenter" class Chef class Knife @@ -26,7 +26,7 @@ class Chef include Knife::Core::NodeFormattingOptions deps do - require "chef/search/query" + require_relative "../search/query" end banner "knife status QUERY (options)" diff --git a/lib/chef/knife/supermarket_download.rb b/lib/chef/knife/supermarket_download.rb index dc0c50ab92..09a08ef722 100644 --- a/lib/chef/knife/supermarket_download.rb +++ b/lib/chef/knife/supermarket_download.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife diff --git a/lib/chef/knife/supermarket_install.rb b/lib/chef/knife/supermarket_install.rb index 5a72e6184d..03b8ce6b2a 100644 --- a/lib/chef/knife/supermarket_install.rb +++ b/lib/chef/knife/supermarket_install.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/exceptions" +require_relative "" +require_relative "../exceptions" class Chef class Knife @@ -26,8 +26,8 @@ class Chef deps do require "shellwords" require "mixlib/archive" - require "chef/knife/core/cookbook_scm_repo" - require "chef/cookbook/metadata" + require_relative "core/cookbook_scm_repo" + require_relative "../cookbook/metadata" end banner "knife supermarket install COOKBOOK [VERSION] (options)" diff --git a/lib/chef/knife/supermarket_list.rb b/lib/chef/knife/supermarket_list.rb index 837379845a..6a76f88cd9 100644 --- a/lib/chef/knife/supermarket_list.rb +++ b/lib/chef/knife/supermarket_list.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife diff --git a/lib/chef/knife/supermarket_search.rb b/lib/chef/knife/supermarket_search.rb index 3dd7f95f2e..7c4da6f05b 100644 --- a/lib/chef/knife/supermarket_search.rb +++ b/lib/chef/knife/supermarket_search.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife diff --git a/lib/chef/knife/supermarket_share.rb b/lib/chef/knife/supermarket_share.rb index f3f6a8ec38..a93086d2f1 100644 --- a/lib/chef/knife/supermarket_share.rb +++ b/lib/chef/knife/supermarket_share.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife @@ -25,10 +25,10 @@ class Chef include Chef::Mixin::ShellOut deps do - require "chef/cookbook_loader" - require "chef/cookbook_uploader" - require "chef/cookbook_site_streaming_uploader" - require "chef/mixin/shell_out" + require_relative "../cookbook_loader" + require_relative "../cookbook_uploader" + require_relative "../cookbook_site_streaming_uploader" + require_relative "../mixin/shell_out" end banner "knife supermarket share COOKBOOK [CATEGORY] (options)" diff --git a/lib/chef/knife/supermarket_show.rb b/lib/chef/knife/supermarket_show.rb index 4fe8ef25fb..ace5b2b76f 100644 --- a/lib/chef/knife/supermarket_show.rb +++ b/lib/chef/knife/supermarket_show.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife diff --git a/lib/chef/knife/supermarket_unshare.rb b/lib/chef/knife/supermarket_unshare.rb index 98b6fa5789..c494ff1382 100644 --- a/lib/chef/knife/supermarket_unshare.rb +++ b/lib/chef/knife/supermarket_unshare.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class SupermarketUnshare < Knife deps do - require "chef/json_compat" + require_relative "../json_compat" end banner "knife supermarket unshare COOKBOOK" diff --git a/lib/chef/knife/tag_create.rb b/lib/chef/knife/tag_create.rb index e8cfe11303..3e596c741d 100644 --- a/lib/chef/knife/tag_create.rb +++ b/lib/chef/knife/tag_create.rb @@ -18,14 +18,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class TagCreate < Knife deps do - require "chef/node" + require_relative "../node" end banner "knife tag create NODE TAG ..." diff --git a/lib/chef/knife/tag_delete.rb b/lib/chef/knife/tag_delete.rb index d00ec2f60b..460478e142 100644 --- a/lib/chef/knife/tag_delete.rb +++ b/lib/chef/knife/tag_delete.rb @@ -18,14 +18,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class TagDelete < Knife deps do - require "chef/node" + require_relative "../node" end banner "knife tag delete NODE TAG ..." diff --git a/lib/chef/knife/tag_list.rb b/lib/chef/knife/tag_list.rb index 2665e53bf4..4823b1023c 100644 --- a/lib/chef/knife/tag_list.rb +++ b/lib/chef/knife/tag_list.rb @@ -18,14 +18,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class TagList < Knife deps do - require "chef/node" + require_relative "../node" end banner "knife tag list NODE" diff --git a/lib/chef/knife/upload.rb b/lib/chef/knife/upload.rb index 25dcd81004..190549d86a 100644 --- a/lib/chef/knife/upload.rb +++ b/lib/chef/knife/upload.rb @@ -14,7 +14,7 @@ # limitations under the License. # -require "chef/chef_fs/knife" +require_relative "../chef_fs/knife" class Chef class Knife @@ -24,7 +24,7 @@ class Chef category "path-based" deps do - require "chef/chef_fs/command_line" + require_relative "../chef_fs/command_line" end option :recurse, diff --git a/lib/chef/knife/user_create.rb b/lib/chef/knife/user_create.rb index 2381ffbdbd..5c7d14e2f8 100644 --- a/lib/chef/knife/user_create.rb +++ b/lib/chef/knife/user_create.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/dist" +require_relative "" +require_relative "../dist" class Chef class Knife @@ -27,7 +27,7 @@ class Chef attr_accessor :user_field deps do - require "chef/user_v1" + require_relative "../user_v1" end option :file, diff --git a/lib/chef/knife/user_delete.rb b/lib/chef/knife/user_delete.rb index 2638d2cce3..efc20a60b6 100644 --- a/lib/chef/knife/user_delete.rb +++ b/lib/chef/knife/user_delete.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class UserDelete < Knife deps do - require "chef/user_v1" + require_relative "../user_v1" end banner "knife user delete USER (options)" diff --git a/lib/chef/knife/user_edit.rb b/lib/chef/knife/user_edit.rb index a039525001..7d0409b642 100644 --- a/lib/chef/knife/user_edit.rb +++ b/lib/chef/knife/user_edit.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class UserEdit < Knife deps do - require "chef/user_v1" + require_relative "../user_v1" end banner "knife user edit USER (options)" diff --git a/lib/chef/knife/user_key_create.rb b/lib/chef/knife/user_key_create.rb index 1cceb886c4..267b198823 100644 --- a/lib/chef/knife/user_key_create.rb +++ b/lib/chef/knife/user_key_create.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/key_create" -require "chef/knife/key_create_base" +require_relative "" +require_relative "key_create" +require_relative "key_create_base" class Chef class Knife diff --git a/lib/chef/knife/user_key_delete.rb b/lib/chef/knife/user_key_delete.rb index 2a0c958ed9..ebb41e2c37 100644 --- a/lib/chef/knife/user_key_delete.rb +++ b/lib/chef/knife/user_key_delete.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/key_delete" +require_relative "" +require_relative "key_delete" class Chef class Knife diff --git a/lib/chef/knife/user_key_edit.rb b/lib/chef/knife/user_key_edit.rb index ca056e3650..5849434249 100644 --- a/lib/chef/knife/user_key_edit.rb +++ b/lib/chef/knife/user_key_edit.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/key_edit" -require "chef/knife/key_edit_base" +require_relative "" +require_relative "key_edit" +require_relative "key_edit_base" class Chef class Knife diff --git a/lib/chef/knife/user_key_list.rb b/lib/chef/knife/user_key_list.rb index 10583f4a3c..b8a1a6f4f1 100644 --- a/lib/chef/knife/user_key_list.rb +++ b/lib/chef/knife/user_key_list.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/key_list" -require "chef/knife/key_list_base" +require_relative "" +require_relative "key_list" +require_relative "key_list_base" class Chef class Knife diff --git a/lib/chef/knife/user_key_show.rb b/lib/chef/knife/user_key_show.rb index b3a6ee73dc..bfc8a10d40 100644 --- a/lib/chef/knife/user_key_show.rb +++ b/lib/chef/knife/user_key_show.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/knife" -require "chef/knife/key_show" +require_relative "" +require_relative "key_show" class Chef class Knife diff --git a/lib/chef/knife/user_list.rb b/lib/chef/knife/user_list.rb index 31758ce117..83efa3a97f 100644 --- a/lib/chef/knife/user_list.rb +++ b/lib/chef/knife/user_list.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class UserList < Knife deps do - require "chef/user_v1" + require_relative "../user_v1" end banner "knife user list (options)" diff --git a/lib/chef/knife/user_reregister.rb b/lib/chef/knife/user_reregister.rb index 7530327131..46d7e76c2a 100644 --- a/lib/chef/knife/user_reregister.rb +++ b/lib/chef/knife/user_reregister.rb @@ -16,14 +16,14 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife class UserReregister < Knife deps do - require "chef/user_v1" + require_relative "../user_v1" end banner "knife user reregister USER (options)" diff --git a/lib/chef/knife/user_show.rb b/lib/chef/knife/user_show.rb index a27549aea7..038f297dc4 100644 --- a/lib/chef/knife/user_show.rb +++ b/lib/chef/knife/user_show.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/knife" +require_relative "" class Chef class Knife @@ -25,7 +25,7 @@ class Chef include Knife::Core::MultiAttributeReturnOption deps do - require "chef/user_v1" + require_relative "../user_v1" end banner "knife user show USER (options)" diff --git a/lib/chef/knife/xargs.rb b/lib/chef/knife/xargs.rb index 603279bcdd..a8ec99920b 100644 --- a/lib/chef/knife/xargs.rb +++ b/lib/chef/knife/xargs.rb @@ -14,7 +14,7 @@ # limitations under the License. # -require "chef/chef_fs/knife" +require_relative "../chef_fs/knife" class Chef class Knife @@ -24,8 +24,8 @@ class Chef category "path-based" deps do - require "chef/chef_fs/file_system" - require "chef/chef_fs/file_system/exceptions" + require_relative "../chef_fs/file_system" + require_relative "../chef_fs/file_system/exceptions" end # TODO modify to remote-only / local-only pattern (more like delete) diff --git a/lib/chef/local_mode.rb b/lib/chef/local_mode.rb index 457144c612..36a771e00d 100644 --- a/lib/chef/local_mode.rb +++ b/lib/chef/local_mode.rb @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/config" +require_relative "config" require "chef/monkey_patches/webrick-utils" if Chef::Platform.windows? class Chef @@ -52,8 +52,8 @@ class Chef destroy_server_connectivity require "chef_zero/server" - require "chef/chef_fs/chef_fs_data_store" - require "chef/chef_fs/config" + require_relative "chef_fs/chef_fs_data_store" + require_relative "chef_fs/config" @chef_fs = Chef::ChefFS::Config.new.local_fs @chef_fs.write_pretty_json = true diff --git a/lib/chef/log.rb b/lib/chef/log.rb index 3f77158579..908a6b2b9c 100644 --- a/lib/chef/log.rb +++ b/lib/chef/log.rb @@ -18,11 +18,11 @@ # limitations under the License. require "logger" -require "chef/monologger" -require "chef/exceptions" +require_relative "monologger" +require_relative "exceptions" require "mixlib/log" require "chef/log/syslog" unless RUBY_PLATFORM =~ /mswin|mingw|windows/ -require "chef/log/winevt" +require_relative "log/winevt" class Chef class Log diff --git a/lib/chef/log/syslog.rb b/lib/chef/log/syslog.rb index d4179d465c..7e63bbb553 100644 --- a/lib/chef/log/syslog.rb +++ b/lib/chef/log/syslog.rb @@ -18,8 +18,8 @@ require "logger" require "syslog-logger" -require "chef/mixin/unformatter" -require "chef/dist" +require_relative "../mixin/unformatter" +require_relative "../dist" class Chef class Log diff --git a/lib/chef/log/winevt.rb b/lib/chef/log/winevt.rb index 7b756e1aab..aff3de7709 100644 --- a/lib/chef/log/winevt.rb +++ b/lib/chef/log/winevt.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/event_loggers/base" -require "chef/platform/query_helpers" -require "chef/mixin/unformatter" +require_relative "../event_loggers/base" +require_relative "../platform/query_helpers" +require_relative "../mixin/unformatter" class Chef class Log diff --git a/lib/chef/mixin/checksum.rb b/lib/chef/mixin/checksum.rb index 2888b205a9..74607da04b 100644 --- a/lib/chef/mixin/checksum.rb +++ b/lib/chef/mixin/checksum.rb @@ -17,7 +17,7 @@ # require "digest/sha2" -require "chef/digester" +require_relative "../digester" class Chef module Mixin diff --git a/lib/chef/mixin/enforce_ownership_and_permissions.rb b/lib/chef/mixin/enforce_ownership_and_permissions.rb index e02c34748f..5e91c81ba6 100644 --- a/lib/chef/mixin/enforce_ownership_and_permissions.rb +++ b/lib/chef/mixin/enforce_ownership_and_permissions.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/file_access_control" +require_relative "../file_access_control" class Chef module Mixin diff --git a/lib/chef/mixin/file_class.rb b/lib/chef/mixin/file_class.rb index 166dd5796a..5c7e690db4 100644 --- a/lib/chef/mixin/file_class.rb +++ b/lib/chef/mixin/file_class.rb @@ -24,7 +24,7 @@ class Chef def file_class @host_os_file ||= if Chef::Platform.windows? - require "chef/win32/file" + require_relative "../win32/file" Chef::ReservedNames::Win32::File else ::File diff --git a/lib/chef/mixin/homebrew_user.rb b/lib/chef/mixin/homebrew_user.rb index b038dfd3b7..9e619c3c47 100644 --- a/lib/chef/mixin/homebrew_user.rb +++ b/lib/chef/mixin/homebrew_user.rb @@ -22,7 +22,7 @@ # This lives here in Chef::Mixin because Chef's namespacing makes it # awkward to use modules elsewhere (e.g., chef/provider/package/homebrew/owner) -require "chef/mixin/shell_out" +require_relative "shell_out" require "etc" class Chef diff --git a/lib/chef/mixin/params_validate.rb b/lib/chef/mixin/params_validate.rb index a71bec6958..0f18eb4f54 100644 --- a/lib/chef/mixin/params_validate.rb +++ b/lib/chef/mixin/params_validate.rb @@ -15,10 +15,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/constants" -require "chef/property" -require "chef/delayed_evaluator" -require "chef/exceptions" +require_relative "../constants" +require_relative "../property" +require_relative "../delayed_evaluator" +require_relative "../exceptions" class Chef module Mixin diff --git a/lib/chef/mixin/powershell_exec.rb b/lib/chef/mixin/powershell_exec.rb index cdd5450fa3..3e811511de 100644 --- a/lib/chef/mixin/powershell_exec.rb +++ b/lib/chef/mixin/powershell_exec.rb @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/powershell" +require_relative "../powershell" # The powershell_exec mixin provides in-process access to PowerShell engine via # a COM interop (installed by the Chef Client installer). diff --git a/lib/chef/mixin/powershell_out.rb b/lib/chef/mixin/powershell_out.rb index f910360d36..3ef4cd84cc 100644 --- a/lib/chef/mixin/powershell_out.rb +++ b/lib/chef/mixin/powershell_out.rb @@ -14,8 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/mixin/shell_out" -require "chef/mixin/windows_architecture_helper" +require_relative "shell_out" +require_relative "windows_architecture_helper" class Chef module Mixin diff --git a/lib/chef/mixin/properties.rb b/lib/chef/mixin/properties.rb index 3c61c88f55..03ee1d66cc 100644 --- a/lib/chef/mixin/properties.rb +++ b/lib/chef/mixin/properties.rb @@ -1,6 +1,6 @@ -require "chef/delayed_evaluator" -require "chef/mixin/params_validate" -require "chef/property" +require_relative "../delayed_evaluator" +require_relative "params_validate" +require_relative "../property" class Chef module Mixin diff --git a/lib/chef/mixin/provides.rb b/lib/chef/mixin/provides.rb index ca045d019e..d088a72d5d 100644 --- a/lib/chef/mixin/provides.rb +++ b/lib/chef/mixin/provides.rb @@ -1,5 +1,5 @@ -require "chef/mixin/descendants_tracker" +require_relative "descendants_tracker" class Chef module Mixin diff --git a/lib/chef/mixin/shell_out.rb b/lib/chef/mixin/shell_out.rb index a96bd1527f..a7272c0bf3 100644 --- a/lib/chef/mixin/shell_out.rb +++ b/lib/chef/mixin/shell_out.rb @@ -16,7 +16,7 @@ # limitations under the License. require "mixlib/shellout" -require "chef/mixin/path_sanity" +require_relative "path_sanity" class Chef module Mixin @@ -184,4 +184,4 @@ class Chef end # Break circular dep -require "chef/config" +require_relative "../config" diff --git a/lib/chef/mixin/train_or_shell.rb b/lib/chef/mixin/train_or_shell.rb index 6a47d52a1d..f1ea98547b 100644 --- a/lib/chef/mixin/train_or_shell.rb +++ b/lib/chef/mixin/train_or_shell.rb @@ -17,9 +17,9 @@ # require "ostruct" -require "chef/mixin/shell_out" -require "chef/mixin/powershell_out" -require "chef/config" +require_relative "shell_out" +require_relative "powershell_out" +require_relative "../config" class Chef module Mixin diff --git a/lib/chef/mixin/which.rb b/lib/chef/mixin/which.rb index ffa324c911..e373a52521 100644 --- a/lib/chef/mixin/which.rb +++ b/lib/chef/mixin/which.rb @@ -18,7 +18,7 @@ class Chef module Mixin module Which - require "chef/chef_class" + require_relative "../chef_class" def which(*cmds, extra_path: nil, &block) where(*cmds, extra_path: extra_path, &block).first || false diff --git a/lib/chef/mixin/windows_architecture_helper.rb b/lib/chef/mixin/windows_architecture_helper.rb index 67c34a85a1..18dfa2010a 100644 --- a/lib/chef/mixin/windows_architecture_helper.rb +++ b/lib/chef/mixin/windows_architecture_helper.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/exceptions" -require "chef/platform/query_helpers" +require_relative "../exceptions" +require_relative "../platform/query_helpers" require "chef/win32/process" if Chef::Platform.windows? require "chef/win32/system" if Chef::Platform.windows? diff --git a/lib/chef/mixin/windows_env_helper.rb b/lib/chef/mixin/windows_env_helper.rb index 610c0cd075..b8c11803fa 100644 --- a/lib/chef/mixin/windows_env_helper.rb +++ b/lib/chef/mixin/windows_env_helper.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/exceptions" -require "chef/mixin/wide_string" -require "chef/platform/query_helpers" +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? diff --git a/lib/chef/mixin/xml_escape.rb b/lib/chef/mixin/xml_escape.rb index b591b09db0..1284a9779a 100644 --- a/lib/chef/mixin/xml_escape.rb +++ b/lib/chef/mixin/xml_escape.rb @@ -46,7 +46,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -require "chef/log" +require_relative "../log" begin require "fast_xs" diff --git a/lib/chef/mixins.rb b/lib/chef/mixins.rb index 2306fb9e89..3974328b8e 100644 --- a/lib/chef/mixins.rb +++ b/lib/chef/mixins.rb @@ -1,12 +1,12 @@ -require "chef/mixin/shell_out" -require "chef/mixin/checksum" -require "chef/mixin/convert_to_class_name" -require "chef/mixin/create_path" -require "chef/mixin/deep_merge" -require "chef/mixin/enforce_ownership_and_permissions" -require "chef/mixin/from_file" -require "chef/mixin/params_validate" -require "chef/mixin/path_sanity" -require "chef/mixin/template" -require "chef/mixin/securable" -require "chef/mixin/xml_escape" +require_relative "mixin/shell_out" +require_relative "mixin/checksum" +require_relative "mixin/convert_to_class_name" +require_relative "mixin/create_path" +require_relative "mixin/deep_merge" +require_relative "mixin/enforce_ownership_and_permissions" +require_relative "mixin/from_file" +require_relative "mixin/params_validate" +require_relative "mixin/path_sanity" +require_relative "mixin/template" +require_relative "mixin/securable" +require_relative "mixin/xml_escape" diff --git a/lib/chef/monkey_patches/win32/registry.rb b/lib/chef/monkey_patches/win32/registry.rb index 26ba31d60f..38dd220727 100644 --- a/lib/chef/monkey_patches/win32/registry.rb +++ b/lib/chef/monkey_patches/win32/registry.rb @@ -15,8 +15,8 @@ # limitations under the License. # -require "chef/win32/api/registry" -require "chef/win32/unicode" +require_relative "../../win32/api/registry" +require_relative "../../win32/unicode" require "win32/registry" module Win32 diff --git a/lib/chef/node.rb b/lib/chef/node.rb index 021cf33eb8..448dfa9ce9 100644 --- a/lib/chef/node.rb +++ b/lib/chef/node.rb @@ -20,22 +20,22 @@ require "forwardable" require "securerandom" -require "chef/config" -require "chef/nil_argument" -require "chef/mixin/params_validate" -require "chef/mixin/from_file" -require "chef/mixin/deep_merge" -require "chef/dsl/include_attribute" -require "chef/dsl/universal" -require "chef/environment" -require "chef/server_api" -require "chef/run_list" -require "chef/node/attribute" -require "chef/mash" -require "chef/json_compat" -require "chef/search/query" -require "chef/whitelist" -require "chef/blacklist" +require_relative "config" +require_relative "nil_argument" +require_relative "mixin/params_validate" +require_relative "mixin/from_file" +require_relative "mixin/deep_merge" +require_relative "dsl/include_attribute" +require_relative "dsl/universal" +require_relative "environment" +require_relative "server_api" +require_relative "run_list" +require_relative "node/attribute" +require_relative "mash" +require_relative "json_compat" +require_relative "search/query" +require_relative "whitelist" +require_relative "blacklist" class Chef class Node diff --git a/lib/chef/node/attribute.rb b/lib/chef/node/attribute.rb index c5731b65a0..eac867899c 100644 --- a/lib/chef/node/attribute.rb +++ b/lib/chef/node/attribute.rb @@ -17,14 +17,14 @@ # limitations under the License. # -require "chef/node/mixin/deep_merge_cache" -require "chef/node/mixin/immutablize_hash" -require "chef/node/mixin/state_tracking" -require "chef/node/immutable_collections" -require "chef/node/attribute_collections" -require "chef/decorator/unchain" -require "chef/mixin/deep_merge" -require "chef/log" +require_relative "mixin/deep_merge_cache" +require_relative "mixin/immutablize_hash" +require_relative "mixin/state_tracking" +require_relative "immutable_collections" +require_relative "attribute_collections" +require_relative "../decorator/unchain" +require_relative "../mixin/deep_merge" +require_relative "../log" class Chef class Node diff --git a/lib/chef/node/attribute_collections.rb b/lib/chef/node/attribute_collections.rb index 382ecfba91..3f19321afa 100644 --- a/lib/chef/node/attribute_collections.rb +++ b/lib/chef/node/attribute_collections.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/node/common_api" -require "chef/node/mixin/state_tracking" -require "chef/node/mixin/immutablize_array" -require "chef/node/mixin/immutablize_hash" -require "chef/node/mixin/mashy_array" +require_relative "common_api" +require_relative "mixin/state_tracking" +require_relative "mixin/immutablize_array" +require_relative "mixin/immutablize_hash" +require_relative "mixin/mashy_array" class Chef class Node diff --git a/lib/chef/node/immutable_collections.rb b/lib/chef/node/immutable_collections.rb index c12ee33268..994d5c37e4 100644 --- a/lib/chef/node/immutable_collections.rb +++ b/lib/chef/node/immutable_collections.rb @@ -15,10 +15,10 @@ # limitations under the License. # -require "chef/node/common_api" -require "chef/node/mixin/state_tracking" -require "chef/node/mixin/immutablize_array" -require "chef/node/mixin/immutablize_hash" +require_relative "common_api" +require_relative "mixin/state_tracking" +require_relative "mixin/immutablize_array" +require_relative "mixin/immutablize_hash" class Chef class Node diff --git a/lib/chef/org.rb b/lib/chef/org.rb index 28702bd314..d482ca504f 100644 --- a/lib/chef/org.rb +++ b/lib/chef/org.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/json_compat" -require "chef/mixin/params_validate" -require "chef/server_api" +require_relative "json_compat" +require_relative "mixin/params_validate" +require_relative "server_api" class Chef class Org diff --git a/lib/chef/platform.rb b/lib/chef/platform.rb index 165715267b..3991ff6110 100644 --- a/lib/chef/platform.rb +++ b/lib/chef/platform.rb @@ -17,8 +17,8 @@ # # Order of these headers is important: query helpers is needed by many things -require "chef/platform/query_helpers" -require "chef/platform/provider_mapping" +require_relative "platform/query_helpers" +require_relative "platform/provider_mapping" class Chef class Platform diff --git a/lib/chef/platform/priority_map.rb b/lib/chef/platform/priority_map.rb index c36d00ea5c..08b1a2a9fc 100644 --- a/lib/chef/platform/priority_map.rb +++ b/lib/chef/platform/priority_map.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/node_map" +require_relative "../node_map" class Chef class Platform diff --git a/lib/chef/platform/provider_handler_map.rb b/lib/chef/platform/provider_handler_map.rb index 4f87a36d1d..46b9d29086 100644 --- a/lib/chef/platform/provider_handler_map.rb +++ b/lib/chef/platform/provider_handler_map.rb @@ -17,7 +17,7 @@ # require "singleton" -require "chef/node_map" +require_relative "../node_map" class Chef class Platform diff --git a/lib/chef/platform/provider_mapping.rb b/lib/chef/platform/provider_mapping.rb index 5dbe0bdab4..57c6c913c2 100644 --- a/lib/chef/platform/provider_mapping.rb +++ b/lib/chef/platform/provider_mapping.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/log" -require "chef/exceptions" -require "chef/mixin/params_validate" -require "chef/version_constraint/platform" -require "chef/provider" +require_relative "../log" +require_relative "../exceptions" +require_relative "../mixin/params_validate" +require_relative "../version_constraint/platform" +require_relative "../provider" class Chef class Platform diff --git a/lib/chef/platform/provider_priority_map.rb b/lib/chef/platform/provider_priority_map.rb index 0c8a728618..c530cebe72 100644 --- a/lib/chef/platform/provider_priority_map.rb +++ b/lib/chef/platform/provider_priority_map.rb @@ -1,5 +1,5 @@ require "singleton" -require "chef/platform/priority_map" +require_relative "priority_map" class Chef class Platform diff --git a/lib/chef/platform/query_helpers.rb b/lib/chef/platform/query_helpers.rb index b49010efc0..a0bc162ef3 100644 --- a/lib/chef/platform/query_helpers.rb +++ b/lib/chef/platform/query_helpers.rb @@ -82,7 +82,7 @@ class Chef end def dsc_refresh_mode_disabled?(node) - require "chef/util/powershell/cmdlet" + require_relative "../util/powershell/cmdlet" cmdlet = Chef::Util::Powershell::Cmdlet.new(node, "Get-DscLocalConfigurationManager", :object) metadata = cmdlet.run!.return_value metadata["RefreshMode"] == "Disabled" diff --git a/lib/chef/platform/rebooter.rb b/lib/chef/platform/rebooter.rb index 1551836bca..71ef74508b 100644 --- a/lib/chef/platform/rebooter.rb +++ b/lib/chef/platform/rebooter.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/dsl/reboot_pending" -require "chef/log" -require "chef/platform" -require "chef/application/exit_code" -require "chef/mixin/shell_out" +require_relative "../dsl/reboot_pending" +require_relative "../log" +require_relative "" +require_relative "../application/exit_code" +require_relative "../mixin/shell_out" class Chef class Platform diff --git a/lib/chef/platform/resource_handler_map.rb b/lib/chef/platform/resource_handler_map.rb index 0aab04212f..1c3ae5e2c7 100644 --- a/lib/chef/platform/resource_handler_map.rb +++ b/lib/chef/platform/resource_handler_map.rb @@ -17,7 +17,7 @@ # require "singleton" -require "chef/node_map" +require_relative "../node_map" class Chef class Platform diff --git a/lib/chef/platform/resource_priority_map.rb b/lib/chef/platform/resource_priority_map.rb index 1871dcd5c6..692ba2c988 100644 --- a/lib/chef/platform/resource_priority_map.rb +++ b/lib/chef/platform/resource_priority_map.rb @@ -1,5 +1,5 @@ require "singleton" -require "chef/platform/priority_map" +require_relative "priority_map" class Chef class Platform diff --git a/lib/chef/platform/service_helpers.rb b/lib/chef/platform/service_helpers.rb index 02d293449c..c469b3fe62 100644 --- a/lib/chef/platform/service_helpers.rb +++ b/lib/chef/platform/service_helpers.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/chef_class" +require_relative "../chef_class" class Chef class Platform diff --git a/lib/chef/policy_builder.rb b/lib/chef/policy_builder.rb index 56533e9a60..316e12771e 100644 --- a/lib/chef/policy_builder.rb +++ b/lib/chef/policy_builder.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/policy_builder/expand_node_object" -require "chef/policy_builder/policyfile" -require "chef/policy_builder/dynamic" +require_relative "policy_builder/expand_node_object" +require_relative "policy_builder/policyfile" +require_relative "policy_builder/dynamic" class Chef diff --git a/lib/chef/policy_builder/dynamic.rb b/lib/chef/policy_builder/dynamic.rb index 2c49f41656..aa46360043 100644 --- a/lib/chef/policy_builder/dynamic.rb +++ b/lib/chef/policy_builder/dynamic.rb @@ -18,11 +18,11 @@ require "forwardable" -require "chef/log" -require "chef/run_context" -require "chef/config" -require "chef/node" -require "chef/exceptions" +require_relative "../log" +require_relative "../run_context" +require_relative "../config" +require_relative "../node" +require_relative "../exceptions" class Chef module PolicyBuilder diff --git a/lib/chef/policy_builder/expand_node_object.rb b/lib/chef/policy_builder/expand_node_object.rb index eea5a37edd..5230105ac1 100644 --- a/lib/chef/policy_builder/expand_node_object.rb +++ b/lib/chef/policy_builder/expand_node_object.rb @@ -19,12 +19,12 @@ # limitations under the License. # -require "chef/log" -require "chef/server_api" -require "chef/run_context" -require "chef/config" -require "chef/node" -require "chef/chef_class" +require_relative "../log" +require_relative "../server_api" +require_relative "../run_context" +require_relative "../config" +require_relative "../node" +require_relative "../chef_class" class Chef module PolicyBuilder diff --git a/lib/chef/policy_builder/policyfile.rb b/lib/chef/policy_builder/policyfile.rb index 421d2ca8ec..cb120a0a03 100644 --- a/lib/chef/policy_builder/policyfile.rb +++ b/lib/chef/policy_builder/policyfile.rb @@ -19,12 +19,12 @@ # limitations under the License. # -require "chef/log" -require "chef/run_context" -require "chef/config" -require "chef/node" -require "chef/server_api" -require "chef/dist" +require_relative "../log" +require_relative "../run_context" +require_relative "../config" +require_relative "../node" +require_relative "../server_api" +require_relative "../dist" class Chef module PolicyBuilder diff --git a/lib/chef/powershell.rb b/lib/chef/powershell.rb index 1a72d5fc58..c6d8369943 100644 --- a/lib/chef/powershell.rb +++ b/lib/chef/powershell.rb @@ -16,7 +16,7 @@ # limitations under the License. require "ffi" -require "chef/json_compat" +require_relative "json_compat" class Chef class PowerShell diff --git a/lib/chef/property.rb b/lib/chef/property.rb index aee3080dc0..c26146a96b 100644 --- a/lib/chef/property.rb +++ b/lib/chef/property.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/exceptions" -require "chef/delayed_evaluator" -require "chef/chef_class" -require "chef/log" +require_relative "exceptions" +require_relative "delayed_evaluator" +require_relative "chef_class" +require_relative "log" class Chef # diff --git a/lib/chef/provider.rb b/lib/chef/provider.rb index fb4ac9f659..fdcaa54710 100644 --- a/lib/chef/provider.rb +++ b/lib/chef/provider.rb @@ -17,21 +17,21 @@ # limitations under the License. # -require "chef/mixin/from_file" -require "chef/mixin/convert_to_class_name" -require "chef/mixin/enforce_ownership_and_permissions" -require "chef/mixin/why_run" -require "chef/mixin/shell_out" -require "chef/mixin/provides" -require "chef/dsl/core" -require "chef/platform/service_helpers" -require "chef/node_map" +require_relative "mixin/from_file" +require_relative "mixin/convert_to_class_name" +require_relative "mixin/enforce_ownership_and_permissions" +require_relative "mixin/why_run" +require_relative "mixin/shell_out" +require_relative "mixin/provides" +require_relative "dsl/core" +require_relative "platform/service_helpers" +require_relative "node_map" require "forwardable" class Chef class Provider - require "chef/mixin/why_run" - require "chef/mixin/provides" + require_relative "mixin/why_run" + require_relative "mixin/provides" attr_accessor :new_resource attr_accessor :current_resource @@ -413,7 +413,7 @@ class Chef end # Requiring things at the bottom breaks cycles -require "chef/chef_class" -require "chef/mixin/why_run" -require "chef/resource_collection" -require "chef/runner" +require_relative "chef_class" +require_relative "mixin/why_run" +require_relative "resource_collection" +require_relative "runner" diff --git a/lib/chef/provider/apt_preference.rb b/lib/chef/provider/apt_preference.rb index 416a1c0d1d..3d07438561 100644 --- a/lib/chef/provider/apt_preference.rb +++ b/lib/chef/provider/apt_preference.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/provider" -require "chef/dsl/declare_resource" -require "chef/provider/noop" -require "chef/log" +require_relative "" +require_relative "../dsl/declare_resource" +require_relative "noop" +require_relative "../log" class Chef class Provider diff --git a/lib/chef/provider/apt_repository.rb b/lib/chef/provider/apt_repository.rb index 75c7112fb8..bba0b45038 100644 --- a/lib/chef/provider/apt_repository.rb +++ b/lib/chef/provider/apt_repository.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/resource" -require "chef/dsl/declare_resource" -require "chef/mixin/shell_out" -require "chef/http/simple" -require "chef/provider/noop" +require_relative "../resource" +require_relative "../dsl/declare_resource" +require_relative "../mixin/shell_out" +require_relative "../http/simple" +require_relative "noop" require "tmpdir" class Chef diff --git a/lib/chef/provider/apt_update.rb b/lib/chef/provider/apt_update.rb index eeafcba58b..925b378ea1 100644 --- a/lib/chef/provider/apt_update.rb +++ b/lib/chef/provider/apt_update.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/provider" -require "chef/provider/noop" -require "chef/dsl/declare_resource" +require_relative "" +require_relative "noop" +require_relative "../dsl/declare_resource" class Chef class Provider diff --git a/lib/chef/provider/batch.rb b/lib/chef/provider/batch.rb index dae1513a51..21dc8f84dd 100644 --- a/lib/chef/provider/batch.rb +++ b/lib/chef/provider/batch.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/windows_script" +require_relative "windows_script" class Chef class Provider diff --git a/lib/chef/provider/cookbook_file.rb b/lib/chef/provider/cookbook_file.rb index 92383fd5fa..b8ec86cd92 100644 --- a/lib/chef/provider/cookbook_file.rb +++ b/lib/chef/provider/cookbook_file.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/file" +require_relative "file" class Chef class Provider diff --git a/lib/chef/provider/cookbook_file/content.rb b/lib/chef/provider/cookbook_file/content.rb index 82e2cf4390..873f3bb394 100644 --- a/lib/chef/provider/cookbook_file/content.rb +++ b/lib/chef/provider/cookbook_file/content.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/file_content_management/content_base" -require "chef/file_content_management/tempfile" +require_relative "../../file_content_management/content_base" +require_relative "../../file_content_management/tempfile" class Chef class Provider diff --git a/lib/chef/provider/cron.rb b/lib/chef/provider/cron.rb index 00c04a73aa..009ce42fe5 100644 --- a/lib/chef/provider/cron.rb +++ b/lib/chef/provider/cron.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/log" -require "chef/provider" +require_relative "../log" +require_relative "" class Chef class Provider diff --git a/lib/chef/provider/cron/aix.rb b/lib/chef/provider/cron/aix.rb index 015c1f2096..5d58e21bca 100644 --- a/lib/chef/provider/cron/aix.rb +++ b/lib/chef/provider/cron/aix.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/cron/unix" +require_relative "unix" class Chef class Provider diff --git a/lib/chef/provider/cron/solaris.rb b/lib/chef/provider/cron/solaris.rb index 58d6637674..0355077c5a 100644 --- a/lib/chef/provider/cron/solaris.rb +++ b/lib/chef/provider/cron/solaris.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/cron/unix" +require_relative "unix" # Just to create an alias so 'Chef::Provider::Cron::Solaris' is exposed and accessible to existing consumers of class. Chef::Provider::Cron::Solaris = Chef::Provider::Cron::Unix diff --git a/lib/chef/provider/cron/unix.rb b/lib/chef/provider/cron/unix.rb index 6539ccd7ca..7575ff866f 100644 --- a/lib/chef/provider/cron/unix.rb +++ b/lib/chef/provider/cron/unix.rb @@ -18,9 +18,9 @@ # limitations under the License. # -require "chef/log" -require "chef/provider" -require "chef/provider/cron" +require_relative "../../log" +require_relative ".." +require_relative "" class Chef class Provider diff --git a/lib/chef/provider/directory.rb b/lib/chef/provider/directory.rb index 3e816d5a06..9a1d29021e 100644 --- a/lib/chef/provider/directory.rb +++ b/lib/chef/provider/directory.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/config" -require "chef/log" -require "chef/resource/directory" -require "chef/provider" -require "chef/provider/file" +require_relative "../config" +require_relative "../log" +require_relative "../resource/directory" +require_relative "" +require_relative "file" require "fileutils" class Chef diff --git a/lib/chef/provider/dsc_resource.rb b/lib/chef/provider/dsc_resource.rb index 864373f902..b7785a6660 100644 --- a/lib/chef/provider/dsc_resource.rb +++ b/lib/chef/provider/dsc_resource.rb @@ -15,10 +15,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require "chef/util/powershell/cmdlet" -require "chef/util/dsc/local_configuration_manager" -require "chef/mixin/powershell_type_coercions" -require "chef/util/dsc/resource_store" +require_relative "../util/powershell/cmdlet" +require_relative "../util/dsc/local_configuration_manager" +require_relative "../mixin/powershell_type_coercions" +require_relative "../util/dsc/resource_store" class Chef class Provider diff --git a/lib/chef/provider/dsc_script.rb b/lib/chef/provider/dsc_script.rb index 4a44a9ea23..d7ac9689ef 100644 --- a/lib/chef/provider/dsc_script.rb +++ b/lib/chef/provider/dsc_script.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/util/powershell/cmdlet" -require "chef/util/dsc/configuration_generator" -require "chef/util/dsc/local_configuration_manager" -require "chef/util/path_helper" +require_relative "../util/powershell/cmdlet" +require_relative "../util/dsc/configuration_generator" +require_relative "../util/dsc/local_configuration_manager" +require_relative "../util/path_helper" class Chef class Provider diff --git a/lib/chef/provider/execute.rb b/lib/chef/provider/execute.rb index 2d84ac317b..933519766f 100644 --- a/lib/chef/provider/execute.rb +++ b/lib/chef/provider/execute.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/log" -require "chef/provider" +require_relative "../log" +require_relative "" require "forwardable" -require "chef/mixin/train_or_shell" +require_relative "../mixin/train_or_shell" class Chef class Provider diff --git a/lib/chef/provider/file.rb b/lib/chef/provider/file.rb index 02da092418..6c8582c05b 100644 --- a/lib/chef/provider/file.rb +++ b/lib/chef/provider/file.rb @@ -17,21 +17,21 @@ # limitations under the License. # -require "chef/config" -require "chef/log" -require "chef/resource/file" -require "chef/provider" +require_relative "../config" +require_relative "../log" +require_relative "../resource/file" +require_relative "" require "etc" require "fileutils" -require "chef/scan_access_control" -require "chef/mixin/checksum" -require "chef/mixin/file_class" -require "chef/mixin/enforce_ownership_and_permissions" -require "chef/util/backup" -require "chef/util/diff" -require "chef/util/selinux" -require "chef/file_content_management/deploy" -require "chef/dist" +require_relative "../scan_access_control" +require_relative "../mixin/checksum" +require_relative "../mixin/file_class" +require_relative "../mixin/enforce_ownership_and_permissions" +require_relative "../util/backup" +require_relative "../util/diff" +require_relative "../util/selinux" +require_relative "../file_content_management/deploy" +require_relative "../dist" # The Tao of File Providers: # - the content provider must always return a tempfile that we can delete/mv diff --git a/lib/chef/provider/file/content.rb b/lib/chef/provider/file/content.rb index 1b60e10fea..5ab27d3ec6 100644 --- a/lib/chef/provider/file/content.rb +++ b/lib/chef/provider/file/content.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/file_content_management/content_base" -require "chef/file_content_management/tempfile" +require_relative "../../file_content_management/content_base" +require_relative "../../file_content_management/tempfile" class Chef class Provider diff --git a/lib/chef/provider/git.rb b/lib/chef/provider/git.rb index b1657b1c77..5696637de8 100644 --- a/lib/chef/provider/git.rb +++ b/lib/chef/provider/git.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/exceptions" -require "chef/log" -require "chef/provider" +require_relative "../exceptions" +require_relative "../log" +require_relative "" require "fileutils" class Chef diff --git a/lib/chef/provider/group.rb b/lib/chef/provider/group.rb index 51e4f280fe..d1d58a8bd5 100644 --- a/lib/chef/provider/group.rb +++ b/lib/chef/provider/group.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/provider" -require "chef/mixin/shell_out" +require_relative "" +require_relative "../mixin/shell_out" require "etc" class Chef diff --git a/lib/chef/provider/group/aix.rb b/lib/chef/provider/group/aix.rb index 7da07b8006..72bfc76d97 100644 --- a/lib/chef/provider/group/aix.rb +++ b/lib/chef/provider/group/aix.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/group/groupadd" +require_relative "groupadd" class Chef class Provider diff --git a/lib/chef/provider/group/gpasswd.rb b/lib/chef/provider/group/gpasswd.rb index a5d6a378c0..5d769befa4 100644 --- a/lib/chef/provider/group/gpasswd.rb +++ b/lib/chef/provider/group/gpasswd.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/group/groupadd" +require_relative "groupadd" class Chef class Provider diff --git a/lib/chef/provider/group/solaris.rb b/lib/chef/provider/group/solaris.rb index 4d913fba30..75768297db 100644 --- a/lib/chef/provider/group/solaris.rb +++ b/lib/chef/provider/group/solaris.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/group/groupadd" +require_relative "groupadd" class Chef class Provider diff --git a/lib/chef/provider/group/suse.rb b/lib/chef/provider/group/suse.rb index 3f4300278f..15360808c9 100644 --- a/lib/chef/provider/group/suse.rb +++ b/lib/chef/provider/group/suse.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/group/groupadd" +require_relative "groupadd" require "etc" class Chef diff --git a/lib/chef/provider/group/usermod.rb b/lib/chef/provider/group/usermod.rb index 06e05ff54d..79a774a4c3 100644 --- a/lib/chef/provider/group/usermod.rb +++ b/lib/chef/provider/group/usermod.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/group/groupadd" +require_relative "groupadd" class Chef class Provider diff --git a/lib/chef/provider/group/windows.rb b/lib/chef/provider/group/windows.rb index 6981c7126e..fc4d7df96b 100644 --- a/lib/chef/provider/group/windows.rb +++ b/lib/chef/provider/group/windows.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/provider/user" +require_relative "../user" if RUBY_PLATFORM =~ /mswin|mingw32|windows/ - require "chef/util/windows/net_group" + require_relative "../../util/windows/net_group" end class Chef diff --git a/lib/chef/provider/http_request.rb b/lib/chef/provider/http_request.rb index e8aad1e896..98f73e79c4 100644 --- a/lib/chef/provider/http_request.rb +++ b/lib/chef/provider/http_request.rb @@ -17,7 +17,7 @@ # require "tempfile" -require "chef/http/simple" +require_relative "../http/simple" class Chef class Provider diff --git a/lib/chef/provider/ifconfig.rb b/lib/chef/provider/ifconfig.rb index 070a4686ba..023bdb3e0e 100644 --- a/lib/chef/provider/ifconfig.rb +++ b/lib/chef/provider/ifconfig.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/log" -require "chef/mixin/shell_out" -require "chef/provider" -require "chef/resource/file" -require "chef/exceptions" +require_relative "../log" +require_relative "../mixin/shell_out" +require_relative "" +require_relative "../resource/file" +require_relative "../exceptions" require "erb" class Chef diff --git a/lib/chef/provider/ifconfig/aix.rb b/lib/chef/provider/ifconfig/aix.rb index 1fd172097a..e3a46c9a3a 100644 --- a/lib/chef/provider/ifconfig/aix.rb +++ b/lib/chef/provider/ifconfig/aix.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/ifconfig" +require_relative "" class Chef class Provider diff --git a/lib/chef/provider/ifconfig/debian.rb b/lib/chef/provider/ifconfig/debian.rb index e610bab5df..94ef10af63 100644 --- a/lib/chef/provider/ifconfig/debian.rb +++ b/lib/chef/provider/ifconfig/debian.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/provider/ifconfig" -require "chef/util/file_edit" +require_relative "" +require_relative "../../util/file_edit" class Chef class Provider diff --git a/lib/chef/provider/ifconfig/redhat.rb b/lib/chef/provider/ifconfig/redhat.rb index 70d78bcfe9..402cd91580 100644 --- a/lib/chef/provider/ifconfig/redhat.rb +++ b/lib/chef/provider/ifconfig/redhat.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/ifconfig" +require_relative "" class Chef class Provider diff --git a/lib/chef/provider/launchd.rb b/lib/chef/provider/launchd.rb index 0bac995247..5028d1e3b1 100644 --- a/lib/chef/provider/launchd.rb +++ b/lib/chef/provider/launchd.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/provider" -require "chef/resource/file" -require "chef/resource/cookbook_file" -require "chef/resource/macosx_service" +require_relative "" +require_relative "../resource/file" +require_relative "../resource/cookbook_file" +require_relative "../resource/macosx_service" require "plist" require "forwardable" diff --git a/lib/chef/provider/link.rb b/lib/chef/provider/link.rb index 783d52d09a..8fcd83d092 100644 --- a/lib/chef/provider/link.rb +++ b/lib/chef/provider/link.rb @@ -16,13 +16,13 @@ # limitations under the License. # -require "chef/config" -require "chef/log" -require "chef/mixin/file_class" -require "chef/resource/link" -require "chef/provider" -require "chef/scan_access_control" -require "chef/util/path_helper" +require_relative "../config" +require_relative "../log" +require_relative "../mixin/file_class" +require_relative "../resource/link" +require_relative "" +require_relative "../scan_access_control" +require_relative "../util/path_helper" class Chef class Provider diff --git a/lib/chef/provider/lwrp_base.rb b/lib/chef/provider/lwrp_base.rb index 70f2af6539..17fd3e29d0 100644 --- a/lib/chef/provider/lwrp_base.rb +++ b/lib/chef/provider/lwrp_base.rb @@ -18,9 +18,9 @@ # limitations under the License. # -require "chef/provider" -require "chef/dsl/recipe" -require "chef/dsl/include_recipe" +require_relative "" +require_relative "../dsl/recipe" +require_relative "../dsl/include_recipe" class Chef class Provider diff --git a/lib/chef/provider/mdadm.rb b/lib/chef/provider/mdadm.rb index 10e814a79b..3a9935a2ea 100644 --- a/lib/chef/provider/mdadm.rb +++ b/lib/chef/provider/mdadm.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/log" -require "chef/provider" +require_relative "../log" +require_relative "" class Chef class Provider diff --git a/lib/chef/provider/mount.rb b/lib/chef/provider/mount.rb index 994d67939b..7e7330dd6f 100644 --- a/lib/chef/provider/mount.rb +++ b/lib/chef/provider/mount.rb @@ -17,9 +17,9 @@ # limitations under the License. # -require "chef/log" -require "chef/mixin/shell_out" -require "chef/provider" +require_relative "../log" +require_relative "../mixin/shell_out" +require_relative "" class Chef class Provider diff --git a/lib/chef/provider/mount/aix.rb b/lib/chef/provider/mount/aix.rb index 2d7fc1d9c3..015802f49e 100644 --- a/lib/chef/provider/mount/aix.rb +++ b/lib/chef/provider/mount/aix.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/provider/mount" +require_relative "" class Chef class Provider diff --git a/lib/chef/provider/mount/mount.rb b/lib/chef/provider/mount/mount.rb index 7852c8dfdf..01b27a05aa 100644 --- a/lib/chef/provider/mount/mount.rb +++ b/lib/chef/provider/mount/mount.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/provider/mount" -require "chef/log" +require_relative "" +require_relative "../../log" class Chef class Provider diff --git a/lib/chef/provider/mount/solaris.rb b/lib/chef/provider/mount/solaris.rb index 48936c8057..1664f7d2b0 100644 --- a/lib/chef/provider/mount/solaris.rb +++ b/lib/chef/provider/mount/solaris.rb @@ -18,8 +18,8 @@ # limitations under the License. # -require "chef/provider/mount" -require "chef/log" +require_relative "" +require_relative "../../log" require "forwardable" class Chef diff --git a/lib/chef/provider/mount/windows.rb b/lib/chef/provider/mount/windows.rb index 1650d1e43a..2db5e36df4 100644 --- a/lib/chef/provider/mount/windows.rb +++ b/lib/chef/provider/mount/windows.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/provider/mount" +require_relative "" if RUBY_PLATFORM =~ /mswin|mingw32|windows/ - require "chef/util/windows/net_use" - require "chef/util/windows/volume" + require_relative "../../util/windows/net_use" + require_relative "../../util/windows/volume" end class Chef diff --git a/lib/chef/provider/osx_profile.rb b/lib/chef/provider/osx_profile.rb index 7a2f8ced20..3ef60b915b 100644 --- a/lib/chef/provider/osx_profile.rb +++ b/lib/chef/provider/osx_profile.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/log" -require "chef/provider" -require "chef/resource" -require "chef/resource/file" +require_relative "../log" +require_relative "" +require_relative "../resource" +require_relative "../resource/file" require "uuidtools" class Chef diff --git a/lib/chef/provider/package.rb b/lib/chef/provider/package.rb index d0fb216604..29c3a55a42 100644 --- a/lib/chef/provider/package.rb +++ b/lib/chef/provider/package.rb @@ -16,12 +16,12 @@ # limitations under the License. # -require "chef/mixin/shell_out" -require "chef/mixin/subclass_directive" -require "chef/log" -require "chef/file_cache" -require "chef/platform" -require "chef/decorator/lazy_array" +require_relative "../mixin/shell_out" +require_relative "../mixin/subclass_directive" +require_relative "../log" +require_relative "../file_cache" +require_relative "../platform" +require_relative "../decorator/lazy_array" require "shellwords" class Chef diff --git a/lib/chef/provider/package/apt.rb b/lib/chef/provider/package/apt.rb index 75c7935805..b712524e0e 100644 --- a/lib/chef/provider/package/apt.rb +++ b/lib/chef/provider/package/apt.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/provider/package" -require "chef/provider/package/deb" -require "chef/resource/apt_package" +require_relative "" +require_relative "deb" +require_relative "../../resource/apt_package" class Chef class Provider diff --git a/lib/chef/provider/package/bff.rb b/lib/chef/provider/package/bff.rb index 652fad447b..23a197c60d 100644 --- a/lib/chef/provider/package/bff.rb +++ b/lib/chef/provider/package/bff.rb @@ -16,9 +16,9 @@ # limitations under the License. # # -require "chef/provider/package" -require "chef/resource/package" -require "chef/mixin/get_source_from_package" +require_relative "" +require_relative "../../resource/package" +require_relative "../../mixin/get_source_from_package" class Chef class Provider diff --git a/lib/chef/provider/package/cab.rb b/lib/chef/provider/package/cab.rb index cfc629b9ef..c7fad85b30 100644 --- a/lib/chef/provider/package/cab.rb +++ b/lib/chef/provider/package/cab.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/provider/package" -require "chef/resource/cab_package" -require "chef/mixin/shell_out" -require "chef/mixin/uris" -require "chef/mixin/checksum" +require_relative "" +require_relative "../../resource/cab_package" +require_relative "../../mixin/shell_out" +require_relative "../../mixin/uris" +require_relative "../../mixin/checksum" class Chef class Provider diff --git a/lib/chef/provider/package/chocolatey.rb b/lib/chef/provider/package/chocolatey.rb index 773587dc2e..150c76c53d 100644 --- a/lib/chef/provider/package/chocolatey.rb +++ b/lib/chef/provider/package/chocolatey.rb @@ -15,9 +15,9 @@ # limitations under the License. # -require "chef/provider/package" -require "chef/resource/chocolatey_package" -require "chef/mixin/powershell_out" +require_relative "" +require_relative "../../resource/chocolatey_package" +require_relative "../../mixin/powershell_out" class Chef class Provider diff --git a/lib/chef/provider/package/deb.rb b/lib/chef/provider/package/deb.rb index 439127e18a..9bb49401a1 100644 --- a/lib/chef/provider/package/deb.rb +++ b/lib/chef/provider/package/deb.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/package" +require_relative "" class Chef class Provider diff --git a/lib/chef/provider/package/dnf.rb b/lib/chef/provider/package/dnf.rb index 76e9be8083..181b784e6a 100644 --- a/lib/chef/provider/package/dnf.rb +++ b/lib/chef/provider/package/dnf.rb @@ -15,13 +15,13 @@ # limitations under the License. # -require "chef/provider/package" -require "chef/resource/dnf_package" -require "chef/mixin/which" -require "chef/mixin/shell_out" -require "chef/mixin/get_source_from_package" -require "chef/provider/package/dnf/python_helper" -require "chef/provider/package/dnf/version" +require_relative "" +require_relative "../../resource/dnf_package" +require_relative "../../mixin/which" +require_relative "../../mixin/shell_out" +require_relative "../../mixin/get_source_from_package" +require_relative "dnf/python_helper" +require_relative "dnf/version" class Chef class Provider diff --git a/lib/chef/provider/package/dnf/python_helper.rb b/lib/chef/provider/package/dnf/python_helper.rb index 7cb4047f53..9a5db7d0ef 100644 --- a/lib/chef/provider/package/dnf/python_helper.rb +++ b/lib/chef/provider/package/dnf/python_helper.rb @@ -15,9 +15,9 @@ # limitations under the License. # -require "chef/mixin/which" -require "chef/mixin/shell_out" -require "chef/provider/package/dnf/version" +require_relative "../../../mixin/which" +require_relative "../../../mixin/shell_out" +require_relative "version" require "timeout" class Chef diff --git a/lib/chef/provider/package/dpkg.rb b/lib/chef/provider/package/dpkg.rb index 25878797c1..f504894c86 100644 --- a/lib/chef/provider/package/dpkg.rb +++ b/lib/chef/provider/package/dpkg.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/provider/package" -require "chef/provider/package/deb" -require "chef/resource/package" +require_relative "" +require_relative "deb" +require_relative "../../resource/package" class Chef class Provider diff --git a/lib/chef/provider/package/freebsd/base.rb b/lib/chef/provider/package/freebsd/base.rb index bf704a5cae..a01825e2ef 100644 --- a/lib/chef/provider/package/freebsd/base.rb +++ b/lib/chef/provider/package/freebsd/base.rb @@ -19,9 +19,9 @@ # limitations under the License. # -require "chef/resource/package" -require "chef/provider/package" -require "chef/mixin/get_source_from_package" +require_relative "../../../resource/package" +require_relative ".." +require_relative "../../../mixin/get_source_from_package" class Chef class Provider diff --git a/lib/chef/provider/package/freebsd/pkgng.rb b/lib/chef/provider/package/freebsd/pkgng.rb index 250baf0fac..a3d70ad9cd 100644 --- a/lib/chef/provider/package/freebsd/pkgng.rb +++ b/lib/chef/provider/package/freebsd/pkgng.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/package/freebsd/base" +require_relative "base" class Chef class Provider diff --git a/lib/chef/provider/package/freebsd/port.rb b/lib/chef/provider/package/freebsd/port.rb index e3174f7d8d..fabc736800 100644 --- a/lib/chef/provider/package/freebsd/port.rb +++ b/lib/chef/provider/package/freebsd/port.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/package/freebsd/base" +require_relative "base" class Chef class Provider diff --git a/lib/chef/provider/package/homebrew.rb b/lib/chef/provider/package/homebrew.rb index 1a7407486b..7fa27b9bb8 100644 --- a/lib/chef/provider/package/homebrew.rb +++ b/lib/chef/provider/package/homebrew.rb @@ -19,7 +19,7 @@ # require "etc" -require "chef/mixin/homebrew_user" +require_relative "../../mixin/homebrew_user" class Chef class Provider diff --git a/lib/chef/provider/package/ips.rb b/lib/chef/provider/package/ips.rb index f7fdb95e4d..8d8c2dcb7e 100644 --- a/lib/chef/provider/package/ips.rb +++ b/lib/chef/provider/package/ips.rb @@ -18,8 +18,8 @@ # require "open3" -require "chef/provider/package" -require "chef/resource/package" +require_relative "" +require_relative "../../resource/package" class Chef class Provider diff --git a/lib/chef/provider/package/msu.rb b/lib/chef/provider/package/msu.rb index 9dbea31c82..04cca39bf5 100644 --- a/lib/chef/provider/package/msu.rb +++ b/lib/chef/provider/package/msu.rb @@ -20,13 +20,13 @@ # The contents of msu file are extracted, which contains one or more cab files. # The extracted cab files are installed using Chef::Resource::Package::CabPackage # Reference: https://support.microsoft.com/en-in/kb/934307 -require "chef/provider/package" -require "chef/resource/msu_package" -require "chef/mixin/shell_out" -require "chef/provider/package/cab" -require "chef/util/path_helper" -require "chef/mixin/uris" -require "chef/mixin/checksum" +require_relative "" +require_relative "../../resource/msu_package" +require_relative "../../mixin/shell_out" +require_relative "cab" +require_relative "../../util/path_helper" +require_relative "../../mixin/uris" +require_relative "../../mixin/checksum" class Chef class Provider diff --git a/lib/chef/provider/package/openbsd.rb b/lib/chef/provider/package/openbsd.rb index 0332423e7c..641a3999e2 100644 --- a/lib/chef/provider/package/openbsd.rb +++ b/lib/chef/provider/package/openbsd.rb @@ -20,10 +20,10 @@ # limitations under the License. # -require "chef/resource/package" -require "chef/provider/package" -require "chef/mixin/get_source_from_package" -require "chef/exceptions" +require_relative "../../resource/package" +require_relative "" +require_relative "../../mixin/get_source_from_package" +require_relative "../../exceptions" class Chef class Provider diff --git a/lib/chef/provider/package/pacman.rb b/lib/chef/provider/package/pacman.rb index 4a3b795700..fccfdca95a 100644 --- a/lib/chef/provider/package/pacman.rb +++ b/lib/chef/provider/package/pacman.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/provider/package" -require "chef/resource/package" +require_relative "" +require_relative "../../resource/package" class Chef class Provider diff --git a/lib/chef/provider/package/paludis.rb b/lib/chef/provider/package/paludis.rb index 3550b155d5..9af02cf46d 100644 --- a/lib/chef/provider/package/paludis.rb +++ b/lib/chef/provider/package/paludis.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/provider/package" -require "chef/resource/package" +require_relative "" +require_relative "../../resource/package" class Chef class Provider diff --git a/lib/chef/provider/package/portage.rb b/lib/chef/provider/package/portage.rb index d9fc801225..39e546e3ef 100644 --- a/lib/chef/provider/package/portage.rb +++ b/lib/chef/provider/package/portage.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/provider/package" -require "chef/resource/portage_package" -require "chef/util/path_helper" +require_relative "" +require_relative "../../resource/portage_package" +require_relative "../../util/path_helper" class Chef class Provider diff --git a/lib/chef/provider/package/powershell.rb b/lib/chef/provider/package/powershell.rb index 9af1344138..5d338e97c2 100644 --- a/lib/chef/provider/package/powershell.rb +++ b/lib/chef/provider/package/powershell.rb @@ -15,9 +15,9 @@ # limitations under the License. # -require "chef/provider/package" -require "chef/resource/powershell_package" -require "chef/mixin/powershell_out" +require_relative "" +require_relative "../../resource/powershell_package" +require_relative "../../mixin/powershell_out" class Chef class Provider diff --git a/lib/chef/provider/package/rpm.rb b/lib/chef/provider/package/rpm.rb index 3d070cee17..75dd95151b 100644 --- a/lib/chef/provider/package/rpm.rb +++ b/lib/chef/provider/package/rpm.rb @@ -15,10 +15,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require "chef/provider/package" -require "chef/resource/package" -require "chef/mixin/get_source_from_package" -require "chef/provider/package/yum/rpm_utils" +require_relative "" +require_relative "../../resource/package" +require_relative "../../mixin/get_source_from_package" +require_relative "yum/rpm_utils" class Chef class Provider diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb index dc882e426c..55339cbdbb 100644 --- a/lib/chef/provider/package/rubygems.rb +++ b/lib/chef/provider/package/rubygems.rb @@ -18,10 +18,10 @@ # require "uri" -require "chef/provider/package" -require "chef/resource/package" -require "chef/mixin/get_source_from_package" -require "chef/mixin/which" +require_relative "" +require_relative "../../resource/package" +require_relative "../../mixin/get_source_from_package" +require_relative "../../mixin/which" # Class methods on Gem are defined in rubygems require "rubygems" diff --git a/lib/chef/provider/package/smartos.rb b/lib/chef/provider/package/smartos.rb index 4623196c13..2b6e1265aa 100644 --- a/lib/chef/provider/package/smartos.rb +++ b/lib/chef/provider/package/smartos.rb @@ -19,9 +19,9 @@ # limitations under the License. # -require "chef/provider/package" -require "chef/resource/package" -require "chef/mixin/get_source_from_package" +require_relative "" +require_relative "../../resource/package" +require_relative "../../mixin/get_source_from_package" class Chef class Provider diff --git a/lib/chef/provider/package/snap.rb b/lib/chef/provider/package/snap.rb index 691cfcd62e..73692966b8 100644 --- a/lib/chef/provider/package/snap.rb +++ b/lib/chef/provider/package/snap.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/provider/package" -require "chef/resource/snap_package" -require "chef/mixin/shell_out" +require_relative "" +require_relative "../../resource/snap_package" +require_relative "../../mixin/shell_out" require "socket" require "json" diff --git a/lib/chef/provider/package/solaris.rb b/lib/chef/provider/package/solaris.rb index 01958df1ee..d9e00bd989 100644 --- a/lib/chef/provider/package/solaris.rb +++ b/lib/chef/provider/package/solaris.rb @@ -15,9 +15,9 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require "chef/provider/package" -require "chef/resource/package" -require "chef/mixin/get_source_from_package" +require_relative "" +require_relative "../../resource/package" +require_relative "../../mixin/get_source_from_package" class Chef class Provider diff --git a/lib/chef/provider/package/windows.rb b/lib/chef/provider/package/windows.rb index cb8b5de151..56d0fb2e88 100644 --- a/lib/chef/provider/package/windows.rb +++ b/lib/chef/provider/package/windows.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/mixin/uris" -require "chef/resource/windows_package" -require "chef/provider/package" -require "chef/util/path_helper" -require "chef/mixin/checksum" +require_relative "../../mixin/uris" +require_relative "../../resource/windows_package" +require_relative "" +require_relative "../../util/path_helper" +require_relative "../../mixin/checksum" class Chef class Provider @@ -78,11 +78,11 @@ class Chef case installer_type when :msi logger.trace("#{new_resource} is MSI") - require "chef/provider/package/windows/msi" + require_relative "windows/msi" Chef::Provider::Package::Windows::MSI.new(resource_for_provider, uninstall_registry_entries) else logger.trace("#{new_resource} is EXE with type '#{installer_type}'") - require "chef/provider/package/windows/exe" + require_relative "windows/exe" Chef::Provider::Package::Windows::Exe.new(resource_for_provider, installer_type, uninstall_registry_entries) end end diff --git a/lib/chef/provider/package/windows/exe.rb b/lib/chef/provider/package/windows/exe.rb index e43cd02b08..7663bf0ad4 100644 --- a/lib/chef/provider/package/windows/exe.rb +++ b/lib/chef/provider/package/windows/exe.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/mixin/shell_out" +require_relative "../../../mixin/shell_out" class Chef class Provider diff --git a/lib/chef/provider/package/windows/msi.rb b/lib/chef/provider/package/windows/msi.rb index 51afcab2a2..464e15ada8 100644 --- a/lib/chef/provider/package/windows/msi.rb +++ b/lib/chef/provider/package/windows/msi.rb @@ -19,7 +19,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 "chef/mixin/shell_out" +require_relative "../../../mixin/shell_out" class Chef class Provider diff --git a/lib/chef/provider/package/yum.rb b/lib/chef/provider/package/yum.rb index ad045c77e6..e8fbd6fb1d 100644 --- a/lib/chef/provider/package/yum.rb +++ b/lib/chef/provider/package/yum.rb @@ -15,15 +15,15 @@ # limitations under the License. # -require "chef/provider/package" -require "chef/resource/yum_package" -require "chef/mixin/which" -require "chef/mixin/shell_out" -require "chef/mixin/get_source_from_package" -require "chef/provider/package/yum/python_helper" -require "chef/provider/package/yum/version" +require_relative "" +require_relative "../../resource/yum_package" +require_relative "../../mixin/which" +require_relative "../../mixin/shell_out" +require_relative "../../mixin/get_source_from_package" +require_relative "yum/python_helper" +require_relative "yum/version" # the stubs in the YumCache class are still an external API -require "chef/provider/package/yum/yum_cache" +require_relative "yum/yum_cache" class Chef class Provider diff --git a/lib/chef/provider/package/yum/python_helper.rb b/lib/chef/provider/package/yum/python_helper.rb index 6ae9cc911a..4641980be7 100644 --- a/lib/chef/provider/package/yum/python_helper.rb +++ b/lib/chef/provider/package/yum/python_helper.rb @@ -15,9 +15,9 @@ # limitations under the License. # -require "chef/mixin/which" -require "chef/mixin/shell_out" -require "chef/provider/package/yum/version" +require_relative "../../../mixin/which" +require_relative "../../../mixin/shell_out" +require_relative "version" require "singleton" require "timeout" diff --git a/lib/chef/provider/package/yum/rpm_utils.rb b/lib/chef/provider/package/yum/rpm_utils.rb index 22c0ff807b..89c03d1206 100644 --- a/lib/chef/provider/package/yum/rpm_utils.rb +++ b/lib/chef/provider/package/yum/rpm_utils.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/package" +require_relative ".." # # BUGGY AND DEPRECATED: This ruby code is known to not match the python implementation for version comparisons. diff --git a/lib/chef/provider/package/yum/yum_cache.rb b/lib/chef/provider/package/yum/yum_cache.rb index fa0930109f..7af639d35a 100644 --- a/lib/chef/provider/package/yum/yum_cache.rb +++ b/lib/chef/provider/package/yum/yum_cache.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/provider/package/yum/python_helper" -require "chef/provider/package" +require_relative "python_helper" +require_relative ".." require "singleton" # diff --git a/lib/chef/provider/package/zypper.rb b/lib/chef/provider/package/zypper.rb index 2a333c4f5f..b40c52c737 100644 --- a/lib/chef/provider/package/zypper.rb +++ b/lib/chef/provider/package/zypper.rb @@ -19,8 +19,8 @@ # limitations under the License. # -require "chef/provider/package" -require "chef/resource/zypper_package" +require_relative "" +require_relative "../../resource/zypper_package" class Chef class Provider diff --git a/lib/chef/provider/powershell_script.rb b/lib/chef/provider/powershell_script.rb index 7430fabfec..418948e614 100644 --- a/lib/chef/provider/powershell_script.rb +++ b/lib/chef/provider/powershell_script.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/platform/query_helpers" -require "chef/provider/windows_script" +require_relative "../platform/query_helpers" +require_relative "windows_script" class Chef class Provider diff --git a/lib/chef/provider/reboot.rb b/lib/chef/provider/reboot.rb index dd07e7448d..fac82cdf8f 100644 --- a/lib/chef/provider/reboot.rb +++ b/lib/chef/provider/reboot.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/log" -require "chef/provider" +require_relative "../log" +require_relative "" class Chef class Provider diff --git a/lib/chef/provider/registry_key.rb b/lib/chef/provider/registry_key.rb index 6b226cc991..39679ff119 100644 --- a/lib/chef/provider/registry_key.rb +++ b/lib/chef/provider/registry_key.rb @@ -17,15 +17,15 @@ # limitations under the License. # -require "chef/config" -require "chef/log" -require "chef/resource/file" -require "chef/mixin/checksum" -require "chef/provider" +require_relative "../config" +require_relative "../log" +require_relative "../resource/file" +require_relative "../mixin/checksum" +require_relative "" require "etc" require "fileutils" -require "chef/scan_access_control" -require "chef/win32/registry" +require_relative "../scan_access_control" +require_relative "../win32/registry" class Chef diff --git a/lib/chef/provider/remote_directory.rb b/lib/chef/provider/remote_directory.rb index 94de68c557..13088b3706 100644 --- a/lib/chef/provider/remote_directory.rb +++ b/lib/chef/provider/remote_directory.rb @@ -16,13 +16,13 @@ # limitations under the License. # -require "chef/provider/directory" -require "chef/resource/file" -require "chef/resource/directory" -require "chef/resource/cookbook_file" -require "chef/mixin/file_class" -require "chef/platform/query_helpers" -require "chef/util/path_helper" +require_relative "directory" +require_relative "../resource/file" +require_relative "../resource/directory" +require_relative "../resource/cookbook_file" +require_relative "../mixin/file_class" +require_relative "../platform/query_helpers" +require_relative "../util/path_helper" require "forwardable" diff --git a/lib/chef/provider/remote_file.rb b/lib/chef/provider/remote_file.rb index d2de3d0b5f..ba384ea3ba 100644 --- a/lib/chef/provider/remote_file.rb +++ b/lib/chef/provider/remote_file.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/provider/file" +require_relative "file" class Chef class Provider diff --git a/lib/chef/provider/remote_file/cache_control_data.rb b/lib/chef/provider/remote_file/cache_control_data.rb index 5c59d112db..974b229a45 100644 --- a/lib/chef/provider/remote_file/cache_control_data.rb +++ b/lib/chef/provider/remote_file/cache_control_data.rb @@ -20,10 +20,10 @@ # require "stringio" -require "chef/file_cache" -require "chef/json_compat" -require "chef/digester" -require "chef/exceptions" +require_relative "../../file_cache" +require_relative "../../json_compat" +require_relative "../../digester" +require_relative "../../exceptions" class Chef class Provider diff --git a/lib/chef/provider/remote_file/content.rb b/lib/chef/provider/remote_file/content.rb index b5f42749e7..3e1af01f22 100644 --- a/lib/chef/provider/remote_file/content.rb +++ b/lib/chef/provider/remote_file/content.rb @@ -19,8 +19,8 @@ require "uri" require "tempfile" -require "chef/file_content_management/content_base" -require "chef/mixin/uris" +require_relative "../../file_content_management/content_base" +require_relative "../../mixin/uris" class Chef class Provider diff --git a/lib/chef/provider/remote_file/ftp.rb b/lib/chef/provider/remote_file/ftp.rb index b382c20c31..a43209c693 100644 --- a/lib/chef/provider/remote_file/ftp.rb +++ b/lib/chef/provider/remote_file/ftp.rb @@ -19,8 +19,8 @@ require "uri" require "tempfile" require "net/ftp" -require "chef/provider/remote_file" -require "chef/file_content_management/tempfile" +require_relative "" +require_relative "../../file_content_management/tempfile" class Chef class Provider diff --git a/lib/chef/provider/remote_file/http.rb b/lib/chef/provider/remote_file/http.rb index 2122142608..6e1e1a479f 100644 --- a/lib/chef/provider/remote_file/http.rb +++ b/lib/chef/provider/remote_file/http.rb @@ -17,10 +17,10 @@ # limitations under the License. # -require "chef/http/simple" -require "chef/digester" -require "chef/provider/remote_file" -require "chef/provider/remote_file/cache_control_data" +require_relative "../../http/simple" +require_relative "../../digester" +require_relative "" +require_relative "cache_control_data" class Chef class Provider diff --git a/lib/chef/provider/remote_file/local_file.rb b/lib/chef/provider/remote_file/local_file.rb index 0719e5dbf7..e51cfb0782 100644 --- a/lib/chef/provider/remote_file/local_file.rb +++ b/lib/chef/provider/remote_file/local_file.rb @@ -18,7 +18,7 @@ require "uri" require "tempfile" -require "chef/provider/remote_file" +require_relative "" class Chef class Provider diff --git a/lib/chef/provider/remote_file/network_file.rb b/lib/chef/provider/remote_file/network_file.rb index ffd2d0bbce..933429d9b6 100644 --- a/lib/chef/provider/remote_file/network_file.rb +++ b/lib/chef/provider/remote_file/network_file.rb @@ -18,8 +18,8 @@ require "uri" require "tempfile" -require "chef/provider/remote_file" -require "chef/mixin/user_context" +require_relative "" +require_relative "../../mixin/user_context" class Chef class Provider diff --git a/lib/chef/provider/remote_file/sftp.rb b/lib/chef/provider/remote_file/sftp.rb index 66540fea8c..adc646d09a 100644 --- a/lib/chef/provider/remote_file/sftp.rb +++ b/lib/chef/provider/remote_file/sftp.rb @@ -19,8 +19,8 @@ require "uri" require "tempfile" require "net/sftp" -require "chef/provider/remote_file" -require "chef/file_content_management/tempfile" +require_relative "" +require_relative "../../file_content_management/tempfile" class Chef class Provider diff --git a/lib/chef/provider/route.rb b/lib/chef/provider/route.rb index e20102e2f3..9917a12c20 100644 --- a/lib/chef/provider/route.rb +++ b/lib/chef/provider/route.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/log" -require "chef/provider" +require_relative "../log" +require_relative "" require "ipaddr" class Chef diff --git a/lib/chef/provider/script.rb b/lib/chef/provider/script.rb index b54965be45..7c55cff167 100644 --- a/lib/chef/provider/script.rb +++ b/lib/chef/provider/script.rb @@ -17,7 +17,7 @@ # require "tempfile" -require "chef/provider/execute" +require_relative "execute" require "chef/win32/security" if Chef::Platform.windows? require "forwardable" diff --git a/lib/chef/provider/service.rb b/lib/chef/provider/service.rb index c116d321f1..0ffcdbd7d1 100644 --- a/lib/chef/provider/service.rb +++ b/lib/chef/provider/service.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/provider" +require_relative "" class Chef class Provider @@ -232,15 +232,15 @@ class Chef # Linux # - require "chef/chef_class" - require "chef/provider/service/systemd" - require "chef/provider/service/insserv" - require "chef/provider/service/redhat" - require "chef/provider/service/arch" - require "chef/provider/service/gentoo" - require "chef/provider/service/upstart" - require "chef/provider/service/debian" - require "chef/provider/service/invokercd" + require_relative "../chef_class" + require_relative "service/systemd" + require_relative "service/insserv" + require_relative "service/redhat" + require_relative "service/arch" + require_relative "service/gentoo" + require_relative "service/upstart" + require_relative "service/debian" + require_relative "service/invokercd" Chef.set_provider_priority_array :service, [ Systemd, Arch ], platform_family: "arch" Chef.set_provider_priority_array :service, [ Systemd, Gentoo ], platform_family: "gentoo" diff --git a/lib/chef/provider/service/aix.rb b/lib/chef/provider/service/aix.rb index 10ea06152b..6c56beb5b6 100644 --- a/lib/chef/provider/service/aix.rb +++ b/lib/chef/provider/service/aix.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/service" +require_relative "" class Chef class Provider diff --git a/lib/chef/provider/service/aixinit.rb b/lib/chef/provider/service/aixinit.rb index 43e6b3ac1b..6469b6389c 100644 --- a/lib/chef/provider/service/aixinit.rb +++ b/lib/chef/provider/service/aixinit.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/service/init" +require_relative "init" class Chef class Provider diff --git a/lib/chef/provider/service/arch.rb b/lib/chef/provider/service/arch.rb index e34227036a..fd1b54a302 100644 --- a/lib/chef/provider/service/arch.rb +++ b/lib/chef/provider/service/arch.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/service/init" +require_relative "init" class Chef::Provider::Service::Arch < Chef::Provider::Service::Init diff --git a/lib/chef/provider/service/debian.rb b/lib/chef/provider/service/debian.rb index b6a938a7e8..059b9777d9 100644 --- a/lib/chef/provider/service/debian.rb +++ b/lib/chef/provider/service/debian.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/service/init" +require_relative "init" class Chef class Provider diff --git a/lib/chef/provider/service/freebsd.rb b/lib/chef/provider/service/freebsd.rb index 83aa42903a..ee0cad53f3 100644 --- a/lib/chef/provider/service/freebsd.rb +++ b/lib/chef/provider/service/freebsd.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/resource/service" -require "chef/provider/service/init" +require_relative "../../resource/service" +require_relative "init" class Chef class Provider diff --git a/lib/chef/provider/service/gentoo.rb b/lib/chef/provider/service/gentoo.rb index 69b3d20a3f..88616c4947 100644 --- a/lib/chef/provider/service/gentoo.rb +++ b/lib/chef/provider/service/gentoo.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/provider/service/init" -require "chef/util/path_helper" +require_relative "init" +require_relative "../../util/path_helper" class Chef::Provider::Service::Gentoo < Chef::Provider::Service::Init diff --git a/lib/chef/provider/service/init.rb b/lib/chef/provider/service/init.rb index 6d150513cc..3911ae3216 100644 --- a/lib/chef/provider/service/init.rb +++ b/lib/chef/provider/service/init.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/provider/service/simple" -require "chef/platform/service_helpers" +require_relative "simple" +require_relative "../../platform/service_helpers" class Chef class Provider diff --git a/lib/chef/provider/service/insserv.rb b/lib/chef/provider/service/insserv.rb index a8e841f8b3..b61ec8d686 100644 --- a/lib/chef/provider/service/insserv.rb +++ b/lib/chef/provider/service/insserv.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/provider/service/init" -require "chef/util/path_helper" +require_relative "init" +require_relative "../../util/path_helper" class Chef class Provider diff --git a/lib/chef/provider/service/invokercd.rb b/lib/chef/provider/service/invokercd.rb index 9477afec48..a6e744ba8e 100644 --- a/lib/chef/provider/service/invokercd.rb +++ b/lib/chef/provider/service/invokercd.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/service/init" +require_relative "init" class Chef class Provider diff --git a/lib/chef/provider/service/macosx.rb b/lib/chef/provider/service/macosx.rb index 2a01b742c7..0e8a29ce32 100644 --- a/lib/chef/provider/service/macosx.rb +++ b/lib/chef/provider/service/macosx.rb @@ -18,10 +18,10 @@ require "etc" require "rexml/document" -require "chef/resource/service" -require "chef/resource/macosx_service" -require "chef/provider/service/simple" -require "chef/util/path_helper" +require_relative "../../resource/service" +require_relative "../../resource/macosx_service" +require_relative "simple" +require_relative "../../util/path_helper" class Chef class Provider diff --git a/lib/chef/provider/service/openbsd.rb b/lib/chef/provider/service/openbsd.rb index 34e05df504..3f28e69ce3 100644 --- a/lib/chef/provider/service/openbsd.rb +++ b/lib/chef/provider/service/openbsd.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/mixin/shell_out" -require "chef/provider/service/init" -require "chef/resource/service" +require_relative "../../mixin/shell_out" +require_relative "init" +require_relative "../../resource/service" class Chef class Provider diff --git a/lib/chef/provider/service/redhat.rb b/lib/chef/provider/service/redhat.rb index 9e8ff30216..f3c081534c 100644 --- a/lib/chef/provider/service/redhat.rb +++ b/lib/chef/provider/service/redhat.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/service/init" +require_relative "init" class Chef class Provider diff --git a/lib/chef/provider/service/simple.rb b/lib/chef/provider/service/simple.rb index 9bfcbb1410..3348cf05cc 100644 --- a/lib/chef/provider/service/simple.rb +++ b/lib/chef/provider/service/simple.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/provider/service" -require "chef/resource/service" +require_relative "" +require_relative "../../resource/service" class Chef class Provider diff --git a/lib/chef/provider/service/solaris.rb b/lib/chef/provider/service/solaris.rb index 51105bd06f..6979064e56 100644 --- a/lib/chef/provider/service/solaris.rb +++ b/lib/chef/provider/service/solaris.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/provider/service" -require "chef/resource/service" +require_relative "" +require_relative "../../resource/service" class Chef class Provider diff --git a/lib/chef/provider/service/systemd.rb b/lib/chef/provider/service/systemd.rb index 6d5bc338c7..e15eab23bd 100644 --- a/lib/chef/provider/service/systemd.rb +++ b/lib/chef/provider/service/systemd.rb @@ -17,9 +17,9 @@ # limitations under the License. # -require "chef/resource/service" -require "chef/provider/service/simple" -require "chef/mixin/which" +require_relative "../../resource/service" +require_relative "simple" +require_relative "../../mixin/which" require "shellwords" class Chef::Provider::Service::Systemd < Chef::Provider::Service::Simple diff --git a/lib/chef/provider/service/upstart.rb b/lib/chef/provider/service/upstart.rb index 96ed16dc8f..f4ca45f8ea 100644 --- a/lib/chef/provider/service/upstart.rb +++ b/lib/chef/provider/service/upstart.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/resource/service" -require "chef/provider/service/simple" -require "chef/util/file_edit" +require_relative "../../resource/service" +require_relative "simple" +require_relative "../../util/file_edit" class Chef class Provider diff --git a/lib/chef/provider/service/windows.rb b/lib/chef/provider/service/windows.rb index 4759e34153..d4f649ae28 100644 --- a/lib/chef/provider/service/windows.rb +++ b/lib/chef/provider/service/windows.rb @@ -18,10 +18,10 @@ # limitations under the License. # -require "chef/provider/service/simple" -require "chef/win32_service_constants" +require_relative "simple" +require_relative "../../win32_service_constants" if RUBY_PLATFORM =~ /mswin|mingw32|windows/ - require "chef/win32/error" + require_relative "../../win32/error" require "win32/service" end diff --git a/lib/chef/provider/subversion.rb b/lib/chef/provider/subversion.rb index adea6a6428..67aec8d510 100644 --- a/lib/chef/provider/subversion.rb +++ b/lib/chef/provider/subversion.rb @@ -18,8 +18,8 @@ # TODO subversion and git should both extend from a base SCM provider. -require "chef/log" -require "chef/provider" +require_relative "../log" +require_relative "" require "chef-config/mixin/fuzzy_hostname_matcher" require "fileutils" diff --git a/lib/chef/provider/systemd_unit.rb b/lib/chef/provider/systemd_unit.rb index 328540764c..96068c1575 100644 --- a/lib/chef/provider/systemd_unit.rb +++ b/lib/chef/provider/systemd_unit.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/provider" -require "chef/mixin/which" -require "chef/mixin/shell_out" -require "chef/resource/file" -require "chef/resource/file/verification/systemd_unit" +require_relative "" +require_relative "../mixin/which" +require_relative "../mixin/shell_out" +require_relative "../resource/file" +require_relative "../resource/file/verification/systemd_unit" require "iniparse" require "shellwords" diff --git a/lib/chef/provider/template.rb b/lib/chef/provider/template.rb index 05cdbdbf62..4aab1697f2 100644 --- a/lib/chef/provider/template.rb +++ b/lib/chef/provider/template.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/provider/template_finder" -require "chef/provider/file" +require_relative "template_finder" +require_relative "file" class Chef class Provider diff --git a/lib/chef/provider/template/content.rb b/lib/chef/provider/template/content.rb index 9ac5a89b3e..6a9da01127 100644 --- a/lib/chef/provider/template/content.rb +++ b/lib/chef/provider/template/content.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/mixin/template" -require "chef/file_content_management/content_base" +require_relative "../../mixin/template" +require_relative "../../file_content_management/content_base" class Chef class Provider diff --git a/lib/chef/provider/user.rb b/lib/chef/provider/user.rb index 7145045785..d6c3b34f41 100644 --- a/lib/chef/provider/user.rb +++ b/lib/chef/provider/user.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider" +require_relative "" require "etc" class Chef diff --git a/lib/chef/provider/user/aix.rb b/lib/chef/provider/user/aix.rb index aca0511e41..be926d6789 100644 --- a/lib/chef/provider/user/aix.rb +++ b/lib/chef/provider/user/aix.rb @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/provider/user" +require_relative "" class Chef class Provider diff --git a/lib/chef/provider/user/dscl.rb b/lib/chef/provider/user/dscl.rb index 12be6ffb7e..26268160f2 100644 --- a/lib/chef/provider/user/dscl.rb +++ b/lib/chef/provider/user/dscl.rb @@ -16,12 +16,12 @@ # limitations under the License. # -require "chef/mixin/shell_out" -require "chef/provider/user" -require "chef/resource/user/dscl_user" +require_relative "../../mixin/shell_out" +require_relative "" +require_relative "../../resource/user/dscl_user" require "openssl" require "plist" -require "chef/util/path_helper" +require_relative "../../util/path_helper" class Chef class Provider diff --git a/lib/chef/provider/user/linux.rb b/lib/chef/provider/user/linux.rb index 7d3a3c1163..40d40320f1 100644 --- a/lib/chef/provider/user/linux.rb +++ b/lib/chef/provider/user/linux.rb @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/provider/user" +require_relative "" class Chef class Provider diff --git a/lib/chef/provider/user/pw.rb b/lib/chef/provider/user/pw.rb index 42d44bab51..483161c136 100644 --- a/lib/chef/provider/user/pw.rb +++ b/lib/chef/provider/user/pw.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/provider/user" +require_relative "" class Chef class Provider diff --git a/lib/chef/provider/user/solaris.rb b/lib/chef/provider/user/solaris.rb index 2c3222534d..2278e745ad 100644 --- a/lib/chef/provider/user/solaris.rb +++ b/lib/chef/provider/user/solaris.rb @@ -18,7 +18,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/provider/user" +require_relative "" class Chef class Provider diff --git a/lib/chef/provider/user/windows.rb b/lib/chef/provider/user/windows.rb index 6cb9cbdb19..59cb17c6b3 100644 --- a/lib/chef/provider/user/windows.rb +++ b/lib/chef/provider/user/windows.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/provider/user" -require "chef/exceptions" +require_relative "" +require_relative "../../exceptions" require "chef/util/windows/net_user" if Chef::Platform.windows? class Chef diff --git a/lib/chef/provider/windows_env.rb b/lib/chef/provider/windows_env.rb index e5af49fa8f..3f61884c68 100644 --- a/lib/chef/provider/windows_env.rb +++ b/lib/chef/provider/windows_env.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/provider" -require "chef/resource/windows_env" -require "chef/mixin/windows_env_helper" +require_relative "" +require_relative "../resource/windows_env" +require_relative "../mixin/windows_env_helper" class Chef class Provider diff --git a/lib/chef/provider/windows_path.rb b/lib/chef/provider/windows_path.rb index 1c78e20606..e0c686d025 100644 --- a/lib/chef/provider/windows_path.rb +++ b/lib/chef/provider/windows_path.rb @@ -17,8 +17,8 @@ # require "chef/mixin/windows_env_helper" if Chef::Platform.windows? -require "chef/mixin/wide_string" -require "chef/exceptions" +require_relative "../mixin/wide_string" +require_relative "../exceptions" class Chef class Provider diff --git a/lib/chef/provider/windows_script.rb b/lib/chef/provider/windows_script.rb index 3b0202790c..56651a23a6 100644 --- a/lib/chef/provider/windows_script.rb +++ b/lib/chef/provider/windows_script.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/provider/script" -require "chef/mixin/windows_architecture_helper" +require_relative "script" +require_relative "../mixin/windows_architecture_helper" class Chef class Provider diff --git a/lib/chef/provider/windows_task.rb b/lib/chef/provider/windows_task.rb index 34c64199bf..adf4f6a0f9 100644 --- a/lib/chef/provider/windows_task.rb +++ b/lib/chef/provider/windows_task.rb @@ -16,12 +16,12 @@ # limitations under the License. # -require "chef/mixin/shell_out" +require_relative "../mixin/shell_out" require "rexml/document" require "iso8601" if Chef::Platform.windows? -require "chef/mixin/powershell_out" -require "chef/provider" -require "chef/util/path_helper" +require_relative "../mixin/powershell_out" +require_relative "" +require_relative "../util/path_helper" require "win32/taskscheduler" if Chef::Platform.windows? class Chef diff --git a/lib/chef/provider/yum_repository.rb b/lib/chef/provider/yum_repository.rb index 20a7a8e3d2..f70ec2bbd9 100644 --- a/lib/chef/provider/yum_repository.rb +++ b/lib/chef/provider/yum_repository.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/resource" -require "chef/dsl/declare_resource" -require "chef/mixin/which" -require "chef/provider/noop" +require_relative "../resource" +require_relative "../dsl/declare_resource" +require_relative "../mixin/which" +require_relative "noop" class Chef class Provider diff --git a/lib/chef/provider/zypper_repository.rb b/lib/chef/provider/zypper_repository.rb index 369d23a396..49c880a8d0 100644 --- a/lib/chef/provider/zypper_repository.rb +++ b/lib/chef/provider/zypper_repository.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/resource" -require "chef/dsl/declare_resource" -require "chef/provider/noop" -require "chef/mixin/shell_out" +require_relative "../resource" +require_relative "../dsl/declare_resource" +require_relative "noop" +require_relative "../mixin/shell_out" require "shellwords" class Chef diff --git a/lib/chef/provider_resolver.rb b/lib/chef/provider_resolver.rb index c7779e52a7..b0dd0d9376 100644 --- a/lib/chef/provider_resolver.rb +++ b/lib/chef/provider_resolver.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/exceptions" -require "chef/platform/priority_map" +require_relative "exceptions" +require_relative "platform/priority_map" class Chef # diff --git a/lib/chef/providers.rb b/lib/chef/providers.rb index 4603be7746..85f2cddaf9 100644 --- a/lib/chef/providers.rb +++ b/lib/chef/providers.rb @@ -16,132 +16,132 @@ # limitations under the License. # -require "chef/provider/apt_update" -require "chef/provider/apt_preference" -require "chef/provider/apt_repository" -require "chef/provider/batch" -require "chef/provider/cookbook_file" -require "chef/provider/cron" -require "chef/provider/cron/solaris" -require "chef/provider/cron/aix" -require "chef/provider/directory" -require "chef/provider/dsc_script" -require "chef/provider/dsc_resource" -require "chef/provider/execute" -require "chef/provider/file" -require "chef/provider/git" -require "chef/provider/group" -require "chef/provider/http_request" -require "chef/provider/ifconfig" -require "chef/provider/launchd" -require "chef/provider/link" -require "chef/provider/log" -require "chef/provider/ohai" -require "chef/provider/mdadm" -require "chef/provider/mount" -require "chef/provider/noop" -require "chef/provider/package" -require "chef/provider/powershell_script" -require "chef/provider/osx_profile" -require "chef/provider/reboot" -require "chef/provider/remote_directory" -require "chef/provider/remote_file" -require "chef/provider/route" -require "chef/provider/ruby_block" -require "chef/provider/script" -require "chef/provider/service" -require "chef/provider/subversion" -require "chef/provider/systemd_unit" -require "chef/provider/template" -require "chef/provider/user" -require "chef/provider/whyrun_safe_ruby_block" -require "chef/provider/windows_env" -require "chef/provider/yum_repository" -require "chef/provider/windows_task" -require "chef/provider/zypper_repository" -require "chef/provider/windows_path" +require_relative "provider/apt_update" +require_relative "provider/apt_preference" +require_relative "provider/apt_repository" +require_relative "provider/batch" +require_relative "provider/cookbook_file" +require_relative "provider/cron" +require_relative "provider/cron/solaris" +require_relative "provider/cron/aix" +require_relative "provider/directory" +require_relative "provider/dsc_script" +require_relative "provider/dsc_resource" +require_relative "provider/execute" +require_relative "provider/file" +require_relative "provider/git" +require_relative "provider/group" +require_relative "provider/http_request" +require_relative "provider/ifconfig" +require_relative "provider/launchd" +require_relative "provider/link" +require_relative "provider/log" +require_relative "provider/ohai" +require_relative "provider/mdadm" +require_relative "provider/mount" +require_relative "provider/noop" +require_relative "provider/package" +require_relative "provider/powershell_script" +require_relative "provider/osx_profile" +require_relative "provider/reboot" +require_relative "provider/remote_directory" +require_relative "provider/remote_file" +require_relative "provider/route" +require_relative "provider/ruby_block" +require_relative "provider/script" +require_relative "provider/service" +require_relative "provider/subversion" +require_relative "provider/systemd_unit" +require_relative "provider/template" +require_relative "provider/user" +require_relative "provider/whyrun_safe_ruby_block" +require_relative "provider/windows_env" +require_relative "provider/yum_repository" +require_relative "provider/windows_task" +require_relative "provider/zypper_repository" +require_relative "provider/windows_path" -require "chef/provider/package/apt" -require "chef/provider/package/chocolatey" -require "chef/provider/package/dpkg" -require "chef/provider/package/dnf" -require "chef/provider/package/freebsd/port" -require "chef/provider/package/freebsd/pkgng" -require "chef/provider/package/homebrew" -require "chef/provider/package/ips" -require "chef/provider/package/macports" -require "chef/provider/package/openbsd" -require "chef/provider/package/pacman" -require "chef/provider/package/portage" -require "chef/provider/package/paludis" -require "chef/provider/package/rpm" -require "chef/provider/package/rubygems" -require "chef/provider/package/yum" -require "chef/provider/package/zypper" -require "chef/provider/package/solaris" -require "chef/provider/package/smartos" -require "chef/provider/package/bff" -require "chef/provider/package/cab" -require "chef/provider/package/powershell" -require "chef/provider/package/msu" -require "chef/provider/package/snap" +require_relative "provider/package/apt" +require_relative "provider/package/chocolatey" +require_relative "provider/package/dpkg" +require_relative "provider/package/dnf" +require_relative "provider/package/freebsd/port" +require_relative "provider/package/freebsd/pkgng" +require_relative "provider/package/homebrew" +require_relative "provider/package/ips" +require_relative "provider/package/macports" +require_relative "provider/package/openbsd" +require_relative "provider/package/pacman" +require_relative "provider/package/portage" +require_relative "provider/package/paludis" +require_relative "provider/package/rpm" +require_relative "provider/package/rubygems" +require_relative "provider/package/yum" +require_relative "provider/package/zypper" +require_relative "provider/package/solaris" +require_relative "provider/package/smartos" +require_relative "provider/package/bff" +require_relative "provider/package/cab" +require_relative "provider/package/powershell" +require_relative "provider/package/msu" +require_relative "provider/package/snap" -require "chef/provider/service/arch" -require "chef/provider/service/freebsd" -require "chef/provider/service/gentoo" -require "chef/provider/service/init" -require "chef/provider/service/invokercd" -require "chef/provider/service/debian" -require "chef/provider/service/openbsd" -require "chef/provider/service/redhat" -require "chef/provider/service/insserv" -require "chef/provider/service/simple" -require "chef/provider/service/systemd" -require "chef/provider/service/upstart" -require "chef/provider/service/windows" -require "chef/provider/service/solaris" -require "chef/provider/service/macosx" -require "chef/provider/service/aixinit" -require "chef/provider/service/aix" +require_relative "provider/service/arch" +require_relative "provider/service/freebsd" +require_relative "provider/service/gentoo" +require_relative "provider/service/init" +require_relative "provider/service/invokercd" +require_relative "provider/service/debian" +require_relative "provider/service/openbsd" +require_relative "provider/service/redhat" +require_relative "provider/service/insserv" +require_relative "provider/service/simple" +require_relative "provider/service/systemd" +require_relative "provider/service/upstart" +require_relative "provider/service/windows" +require_relative "provider/service/solaris" +require_relative "provider/service/macosx" +require_relative "provider/service/aixinit" +require_relative "provider/service/aix" -require "chef/provider/user/aix" -require "chef/provider/user/dscl" -require "chef/provider/user/linux" -require "chef/provider/user/pw" -require "chef/provider/user/solaris" -require "chef/provider/user/windows" +require_relative "provider/user/aix" +require_relative "provider/user/dscl" +require_relative "provider/user/linux" +require_relative "provider/user/pw" +require_relative "provider/user/solaris" +require_relative "provider/user/windows" -require "chef/provider/group/aix" -require "chef/provider/group/dscl" -require "chef/provider/group/gpasswd" -require "chef/provider/group/groupadd" -require "chef/provider/group/groupmod" -require "chef/provider/group/pw" -require "chef/provider/group/solaris" -require "chef/provider/group/suse" -require "chef/provider/group/usermod" -require "chef/provider/group/windows" +require_relative "provider/group/aix" +require_relative "provider/group/dscl" +require_relative "provider/group/gpasswd" +require_relative "provider/group/groupadd" +require_relative "provider/group/groupmod" +require_relative "provider/group/pw" +require_relative "provider/group/solaris" +require_relative "provider/group/suse" +require_relative "provider/group/usermod" +require_relative "provider/group/windows" -require "chef/provider/mount/mount" -require "chef/provider/mount/aix" -require "chef/provider/mount/solaris" -require "chef/provider/mount/windows" +require_relative "provider/mount/mount" +require_relative "provider/mount/aix" +require_relative "provider/mount/solaris" +require_relative "provider/mount/windows" -require "chef/provider/remote_file/ftp" -require "chef/provider/remote_file/sftp" -require "chef/provider/remote_file/http" -require "chef/provider/remote_file/local_file" -require "chef/provider/remote_file/network_file" -require "chef/provider/remote_file/fetcher" +require_relative "provider/remote_file/ftp" +require_relative "provider/remote_file/sftp" +require_relative "provider/remote_file/http" +require_relative "provider/remote_file/local_file" +require_relative "provider/remote_file/network_file" +require_relative "provider/remote_file/fetcher" -require "chef/provider/lwrp_base" -require "chef/provider/registry_key" +require_relative "provider/lwrp_base" +require_relative "provider/registry_key" -require "chef/provider/file/content" -require "chef/provider/remote_file/content" -require "chef/provider/cookbook_file/content" -require "chef/provider/template/content" +require_relative "provider/file/content" +require_relative "provider/remote_file/content" +require_relative "provider/cookbook_file/content" +require_relative "provider/template/content" -require "chef/provider/ifconfig/redhat" -require "chef/provider/ifconfig/debian" -require "chef/provider/ifconfig/aix" +require_relative "provider/ifconfig/redhat" +require_relative "provider/ifconfig/debian" +require_relative "provider/ifconfig/aix" diff --git a/lib/chef/recipe.rb b/lib/chef/recipe.rb index 209b7faa74..6bfc74d900 100644 --- a/lib/chef/recipe.rb +++ b/lib/chef/recipe.rb @@ -17,9 +17,9 @@ # limitations under the License. # -require "chef/dsl/recipe" -require "chef/mixin/from_file" -require "chef/mixin/deprecation" +require_relative "dsl/recipe" +require_relative "mixin/from_file" +require_relative "mixin/deprecation" class Chef # == Chef::Recipe diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb index fb21ae1064..41fda3e665 100644 --- a/lib/chef/resource.rb +++ b/lib/chef/resource.rb @@ -18,32 +18,32 @@ # limitations under the License. # -require "chef/exceptions" -require "chef/dsl/data_query" -require "chef/dsl/registry_helper" -require "chef/dsl/reboot_pending" -require "chef/dsl/resources" -require "chef/dsl/declare_resource" -require "chef/json_compat" -require "chef/mixin/convert_to_class_name" -require "chef/guard_interpreter/resource_guard_interpreter" -require "chef/resource/conditional" -require "chef/resource/conditional_action_not_nothing" -require "chef/resource/action_class" -require "chef/resource_collection" -require "chef/node_map" -require "chef/node" -require "chef/platform" -require "chef/resource/resource_notification" -require "chef/provider_resolver" -require "chef/resource_resolver" -require "chef/provider" +require_relative "exceptions" +require_relative "dsl/data_query" +require_relative "dsl/registry_helper" +require_relative "dsl/reboot_pending" +require_relative "dsl/resources" +require_relative "dsl/declare_resource" +require_relative "json_compat" +require_relative "mixin/convert_to_class_name" +require_relative "guard_interpreter/resource_guard_interpreter" +require_relative "resource/conditional" +require_relative "resource/conditional_action_not_nothing" +require_relative "resource/action_class" +require_relative "resource_collection" +require_relative "node_map" +require_relative "node" +require_relative "platform" +require_relative "resource/resource_notification" +require_relative "provider_resolver" +require_relative "resource_resolver" +require_relative "provider" require "set" -require "chef/mixin/deprecation" -require "chef/mixin/properties" -require "chef/mixin/provides" -require "chef/dsl/universal" +require_relative "mixin/deprecation" +require_relative "mixin/properties" +require_relative "mixin/provides" +require_relative "dsl/universal" class Chef class Resource @@ -1589,4 +1589,4 @@ class Chef end # Requiring things at the bottom breaks cycles -require "chef/chef_class" +require_relative "chef_class" diff --git a/lib/chef/resource/action_class.rb b/lib/chef/resource/action_class.rb index 1c25e3278e..03756062ef 100644 --- a/lib/chef/resource/action_class.rb +++ b/lib/chef/resource/action_class.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/provider" -require "chef/exceptions" -require "chef/dsl/recipe" +require_relative "../provider" +require_relative "../exceptions" +require_relative "../dsl/recipe" class Chef class Resource diff --git a/lib/chef/resource/apt_package.rb b/lib/chef/resource/apt_package.rb index 4ee636062d..c142c142ce 100644 --- a/lib/chef/resource/apt_package.rb +++ b/lib/chef/resource/apt_package.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource/package" +require_relative "package" class Chef class Resource diff --git a/lib/chef/resource/apt_preference.rb b/lib/chef/resource/apt_preference.rb index caa0f01305..3a2299a510 100644 --- a/lib/chef/resource/apt_preference.rb +++ b/lib/chef/resource/apt_preference.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/apt_repository.rb b/lib/chef/resource/apt_repository.rb index 145b515a41..c62cdfb61c 100644 --- a/lib/chef/resource/apt_repository.rb +++ b/lib/chef/resource/apt_repository.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/apt_update.rb b/lib/chef/resource/apt_update.rb index 680806bc26..203e1e2468 100644 --- a/lib/chef/resource/apt_update.rb +++ b/lib/chef/resource/apt_update.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/archive_file.rb b/lib/chef/resource/archive_file.rb index f6adfda083..67105df1f3 100644 --- a/lib/chef/resource/archive_file.rb +++ b/lib/chef/resource/archive_file.rb @@ -18,7 +18,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/bash.rb b/lib/chef/resource/bash.rb index 22a84f4134..0e11dcb8b1 100644 --- a/lib/chef/resource/bash.rb +++ b/lib/chef/resource/bash.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/resource/script" -require "chef/provider/script" +require_relative "script" +require_relative "../provider/script" class Chef class Resource diff --git a/lib/chef/resource/batch.rb b/lib/chef/resource/batch.rb index e3bff8145c..fc8c892a3b 100644 --- a/lib/chef/resource/batch.rb +++ b/lib/chef/resource/batch.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource/windows_script" +require_relative "windows_script" class Chef class Resource diff --git a/lib/chef/resource/bff_package.rb b/lib/chef/resource/bff_package.rb index 8750cb0b2b..819d0a8eb8 100644 --- a/lib/chef/resource/bff_package.rb +++ b/lib/chef/resource/bff_package.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource/package" +require_relative "package" class Chef class Resource diff --git a/lib/chef/resource/breakpoint.rb b/lib/chef/resource/breakpoint.rb index 820ac70c09..be81814cba 100644 --- a/lib/chef/resource/breakpoint.rb +++ b/lib/chef/resource/breakpoint.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/resource" -require "chef/dist" +require_relative "" +require_relative "../dist" class Chef class Resource diff --git a/lib/chef/resource/build_essential.rb b/lib/chef/resource/build_essential.rb index e9cb656ca6..f5f98c459a 100644 --- a/lib/chef/resource/build_essential.rb +++ b/lib/chef/resource/build_essential.rb @@ -14,7 +14,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/cab_package.rb b/lib/chef/resource/cab_package.rb index 501a0dfa26..1c1907801c 100644 --- a/lib/chef/resource/cab_package.rb +++ b/lib/chef/resource/cab_package.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/resource/package" -require "chef/mixin/uris" +require_relative "package" +require_relative "../mixin/uris" class Chef class Resource diff --git a/lib/chef/resource/chef_gem.rb b/lib/chef/resource/chef_gem.rb index 7655d6651c..2410a316fd 100644 --- a/lib/chef/resource/chef_gem.rb +++ b/lib/chef/resource/chef_gem.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/resource/package" -require "chef/resource/gem_package" -require "chef/dist" +require_relative "package" +require_relative "gem_package" +require_relative "../dist" class Chef class Resource diff --git a/lib/chef/resource/chef_handler.rb b/lib/chef/resource/chef_handler.rb index 2bac109697..87d2d5323f 100644 --- a/lib/chef/resource/chef_handler.rb +++ b/lib/chef/resource/chef_handler.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/chocolatey_package.rb b/lib/chef/resource/chocolatey_package.rb index c7d5a8a680..04e5f3602c 100644 --- a/lib/chef/resource/chocolatey_package.rb +++ b/lib/chef/resource/chocolatey_package.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource/package" +require_relative "package" class Chef class Resource diff --git a/lib/chef/resource/conditional.rb b/lib/chef/resource/conditional.rb index 452718cae8..c35099e7e8 100644 --- a/lib/chef/resource/conditional.rb +++ b/lib/chef/resource/conditional.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/mixin/shell_out" -require "chef/guard_interpreter" +require_relative "../mixin/shell_out" +require_relative "../guard_interpreter" class Chef class Resource diff --git a/lib/chef/resource/cookbook_file.rb b/lib/chef/resource/cookbook_file.rb index bee4a5f3f4..68f1e810df 100644 --- a/lib/chef/resource/cookbook_file.rb +++ b/lib/chef/resource/cookbook_file.rb @@ -18,10 +18,10 @@ # limitations under the License. # -require "chef/resource/file" -require "chef/provider/cookbook_file" -require "chef/mixin/securable" -require "chef/dist" +require_relative "file" +require_relative "../provider/cookbook_file" +require_relative "../mixin/securable" +require_relative "../dist" class Chef class Resource diff --git a/lib/chef/resource/cron.rb b/lib/chef/resource/cron.rb index 7e9f3022a7..5025965a44 100644 --- a/lib/chef/resource/cron.rb +++ b/lib/chef/resource/cron.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" require "chef/provider/cron" # do not remove. we actually need this below class Chef diff --git a/lib/chef/resource/cron_access.rb b/lib/chef/resource/cron_access.rb index 5785eddbe5..1f63b42eab 100644 --- a/lib/chef/resource/cron_access.rb +++ b/lib/chef/resource/cron_access.rb @@ -18,7 +18,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/cron_d.rb b/lib/chef/resource/cron_d.rb index f42318b574..edd152c182 100644 --- a/lib/chef/resource/cron_d.rb +++ b/lib/chef/resource/cron_d.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" require "shellwords" class Chef diff --git a/lib/chef/resource/csh.rb b/lib/chef/resource/csh.rb index 0938a19cb1..c3b03e846e 100644 --- a/lib/chef/resource/csh.rb +++ b/lib/chef/resource/csh.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/resource/script" -require "chef/provider/script" +require_relative "script" +require_relative "../provider/script" class Chef class Resource diff --git a/lib/chef/resource/directory.rb b/lib/chef/resource/directory.rb index f2e1aef254..882be9b752 100644 --- a/lib/chef/resource/directory.rb +++ b/lib/chef/resource/directory.rb @@ -18,8 +18,8 @@ # limitations under the License. # -require "chef/resource" -require "chef/mixin/securable" +require_relative "" +require_relative "../mixin/securable" class Chef class Resource diff --git a/lib/chef/resource/dmg_package.rb b/lib/chef/resource/dmg_package.rb index 97329042a6..1d30d2db88 100644 --- a/lib/chef/resource/dmg_package.rb +++ b/lib/chef/resource/dmg_package.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/dnf_package.rb b/lib/chef/resource/dnf_package.rb index 6590c6c003..616d79a337 100644 --- a/lib/chef/resource/dnf_package.rb +++ b/lib/chef/resource/dnf_package.rb @@ -15,10 +15,10 @@ # limitations under the License. # -require "chef/resource/package" -require "chef/mixin/which" -require "chef/mixin/shell_out" -require "chef/dist" +require_relative "package" +require_relative "../mixin/which" +require_relative "../mixin/shell_out" +require_relative "../dist" class Chef class Resource diff --git a/lib/chef/resource/dpkg_package.rb b/lib/chef/resource/dpkg_package.rb index f5b9e5f14a..2072ad8cfc 100644 --- a/lib/chef/resource/dpkg_package.rb +++ b/lib/chef/resource/dpkg_package.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource/package" +require_relative "package" class Chef class Resource diff --git a/lib/chef/resource/dsc_resource.rb b/lib/chef/resource/dsc_resource.rb index 06c4103bc3..a378b6f685 100644 --- a/lib/chef/resource/dsc_resource.rb +++ b/lib/chef/resource/dsc_resource.rb @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require "chef/dsl/powershell" +require_relative "../dsl/powershell" class Chef class Resource diff --git a/lib/chef/resource/dsc_script.rb b/lib/chef/resource/dsc_script.rb index d98c74ccc3..92afd4efd4 100644 --- a/lib/chef/resource/dsc_script.rb +++ b/lib/chef/resource/dsc_script.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/resource" -require "chef/exceptions" -require "chef/dsl/powershell" +require_relative "" +require_relative "../exceptions" +require_relative "../dsl/powershell" class Chef class Resource diff --git a/lib/chef/resource/execute.rb b/lib/chef/resource/execute.rb index 295cf357cb..dea652a0e6 100644 --- a/lib/chef/resource/execute.rb +++ b/lib/chef/resource/execute.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/resource" -require "chef/dist" +require_relative "" +require_relative "../dist" class Chef class Resource diff --git a/lib/chef/resource/file.rb b/lib/chef/resource/file.rb index 1875846d79..84d60accb2 100644 --- a/lib/chef/resource/file.rb +++ b/lib/chef/resource/file.rb @@ -17,12 +17,12 @@ # limitations under the License. # -require "chef/resource" -require "chef/platform/query_helpers" -require "chef/mixin/securable" -require "chef/resource/file/verification" +require_relative "" +require_relative "../platform/query_helpers" +require_relative "../mixin/securable" +require_relative "file/verification" require "pathname" -require "chef/dist" +require_relative "../dist" class Chef class Resource diff --git a/lib/chef/resource/file/verification.rb b/lib/chef/resource/file/verification.rb index ae4f9043b2..c0739a6d44 100644 --- a/lib/chef/resource/file/verification.rb +++ b/lib/chef/resource/file/verification.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/exceptions" -require "chef/guard_interpreter" -require "chef/mixin/descendants_tracker" +require_relative "../../exceptions" +require_relative "../../guard_interpreter" +require_relative "../../mixin/descendants_tracker" class Chef class Resource diff --git a/lib/chef/resource/file/verification/systemd_unit.rb b/lib/chef/resource/file/verification/systemd_unit.rb index b492b32d39..7e4090b5ac 100644 --- a/lib/chef/resource/file/verification/systemd_unit.rb +++ b/lib/chef/resource/file/verification/systemd_unit.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/mixin/which" +require_relative "../../../mixin/which" class Chef class Resource diff --git a/lib/chef/resource/freebsd_package.rb b/lib/chef/resource/freebsd_package.rb index 0f92d7c229..dccb1e1a4f 100644 --- a/lib/chef/resource/freebsd_package.rb +++ b/lib/chef/resource/freebsd_package.rb @@ -18,10 +18,10 @@ # limitations under the License. # -require "chef/resource/package" -require "chef/provider/package/freebsd/port" -require "chef/provider/package/freebsd/pkgng" -require "chef/mixin/shell_out" +require_relative "package" +require_relative "../provider/package/freebsd/port" +require_relative "../provider/package/freebsd/pkgng" +require_relative "../mixin/shell_out" class Chef class Resource diff --git a/lib/chef/resource/gem_package.rb b/lib/chef/resource/gem_package.rb index e057cbd485..e736920811 100644 --- a/lib/chef/resource/gem_package.rb +++ b/lib/chef/resource/gem_package.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/resource/package" -require "chef/dist" +require_relative "package" +require_relative "../dist" class Chef class Resource diff --git a/lib/chef/resource/git.rb b/lib/chef/resource/git.rb index d0a78adc0e..95c5aa346a 100644 --- a/lib/chef/resource/git.rb +++ b/lib/chef/resource/git.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource/scm" +require_relative "scm" class Chef class Resource diff --git a/lib/chef/resource/homebrew_cask.rb b/lib/chef/resource/homebrew_cask.rb index 1f5a9afa81..d017a97355 100644 --- a/lib/chef/resource/homebrew_cask.rb +++ b/lib/chef/resource/homebrew_cask.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/resource" -require "chef/mixin/homebrew_user" +require_relative "" +require_relative "../mixin/homebrew_user" class Chef class Resource diff --git a/lib/chef/resource/homebrew_package.rb b/lib/chef/resource/homebrew_package.rb index 930e25d820..50bbfb0847 100644 --- a/lib/chef/resource/homebrew_package.rb +++ b/lib/chef/resource/homebrew_package.rb @@ -18,9 +18,9 @@ # limitations under the License. # -require "chef/provider/package" -require "chef/resource/package" -require "chef/dist" +require_relative "../provider/package" +require_relative "package" +require_relative "../dist" class Chef class Resource diff --git a/lib/chef/resource/homebrew_tap.rb b/lib/chef/resource/homebrew_tap.rb index bbcc0b1463..0de7771cf5 100644 --- a/lib/chef/resource/homebrew_tap.rb +++ b/lib/chef/resource/homebrew_tap.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/resource" -require "chef/mixin/homebrew_user" +require_relative "" +require_relative "../mixin/homebrew_user" class Chef class Resource diff --git a/lib/chef/resource/hostname.rb b/lib/chef/resource/hostname.rb index d0bf9b9a4b..46e047dfa0 100644 --- a/lib/chef/resource/hostname.rb +++ b/lib/chef/resource/hostname.rb @@ -12,7 +12,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/http_request.rb b/lib/chef/resource/http_request.rb index 455d032819..ef9884fcd7 100644 --- a/lib/chef/resource/http_request.rb +++ b/lib/chef/resource/http_request.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/ifconfig.rb b/lib/chef/resource/ifconfig.rb index 7ca90eb935..d9dfd18831 100644 --- a/lib/chef/resource/ifconfig.rb +++ b/lib/chef/resource/ifconfig.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/ips_package.rb b/lib/chef/resource/ips_package.rb index ff154e8bd8..495cb2bc5a 100644 --- a/lib/chef/resource/ips_package.rb +++ b/lib/chef/resource/ips_package.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/resource/package" -require "chef/provider/package/ips" +require_relative "package" +require_relative "../provider/package/ips" class Chef class Resource diff --git a/lib/chef/resource/kernel_module.rb b/lib/chef/resource/kernel_module.rb index 39c792cf3b..48c4958af5 100644 --- a/lib/chef/resource/kernel_module.rb +++ b/lib/chef/resource/kernel_module.rb @@ -6,7 +6,7 @@ # Copyright 2016-2018, Shopify Inc. # Copyright 2018, Chef Software, Inc. -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/ksh.rb b/lib/chef/resource/ksh.rb index f0bc277d17..a150efe330 100644 --- a/lib/chef/resource/ksh.rb +++ b/lib/chef/resource/ksh.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource/script" +require_relative "script" class Chef class Resource diff --git a/lib/chef/resource/launchd.rb b/lib/chef/resource/launchd.rb index df01675de1..2dea1da733 100644 --- a/lib/chef/resource/launchd.rb +++ b/lib/chef/resource/launchd.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/link.rb b/lib/chef/resource/link.rb index adb8e10533..a58728d8a5 100644 --- a/lib/chef/resource/link.rb +++ b/lib/chef/resource/link.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/resource" -require "chef/mixin/securable" +require_relative "" +require_relative "../mixin/securable" class Chef class Resource @@ -78,7 +78,7 @@ class Chef # sure we are not on such a platform. def verify_links_supported! if Chef::Platform.windows? - require "chef/win32/file" + require_relative "../win32/file" begin Chef::ReservedNames::Win32::File.verify_links_supported! rescue Chef::Exceptions::Win32APIFunctionNotImplemented => e diff --git a/lib/chef/resource/locale.rb b/lib/chef/resource/locale.rb index 52170e8765..083cf2b900 100644 --- a/lib/chef/resource/locale.rb +++ b/lib/chef/resource/locale.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/log.rb b/lib/chef/resource/log.rb index b97b5c9e66..d38644778d 100644 --- a/lib/chef/resource/log.rb +++ b/lib/chef/resource/log.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/lwrp_base.rb b/lib/chef/resource/lwrp_base.rb index ed8a3b205d..9d60c7cce3 100644 --- a/lib/chef/resource/lwrp_base.rb +++ b/lib/chef/resource/lwrp_base.rb @@ -18,13 +18,13 @@ # limitations under the License. # -require "chef/resource" -require "chef/resource_resolver" -require "chef/node" -require "chef/log" -require "chef/exceptions" -require "chef/mixin/convert_to_class_name" -require "chef/mixin/from_file" +require_relative "" +require_relative "../resource_resolver" +require_relative "../node" +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 class Chef diff --git a/lib/chef/resource/macos_userdefaults.rb b/lib/chef/resource/macos_userdefaults.rb index 5eed3f8648..401fa38947 100644 --- a/lib/chef/resource/macos_userdefaults.rb +++ b/lib/chef/resource/macos_userdefaults.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/macosx_service.rb b/lib/chef/resource/macosx_service.rb index 37681ca930..f6b463e61b 100644 --- a/lib/chef/resource/macosx_service.rb +++ b/lib/chef/resource/macosx_service.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource/service" +require_relative "service" class Chef class Resource diff --git a/lib/chef/resource/macports_package.rb b/lib/chef/resource/macports_package.rb index 254d7e7c5f..a1eff28051 100644 --- a/lib/chef/resource/macports_package.rb +++ b/lib/chef/resource/macports_package.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource/package" +require_relative "package" class Chef class Resource diff --git a/lib/chef/resource/mdadm.rb b/lib/chef/resource/mdadm.rb index 382573791e..5160449f93 100644 --- a/lib/chef/resource/mdadm.rb +++ b/lib/chef/resource/mdadm.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/mount.rb b/lib/chef/resource/mount.rb index 4c20a62cf8..bf636e2b55 100644 --- a/lib/chef/resource/mount.rb +++ b/lib/chef/resource/mount.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/msu_package.rb b/lib/chef/resource/msu_package.rb index 9fd39491c9..628af49184 100644 --- a/lib/chef/resource/msu_package.rb +++ b/lib/chef/resource/msu_package.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/resource/package" -require "chef/mixin/uris" +require_relative "package" +require_relative "../mixin/uris" class Chef class Resource diff --git a/lib/chef/resource/ohai.rb b/lib/chef/resource/ohai.rb index 59f2967a2f..538f7f56cb 100644 --- a/lib/chef/resource/ohai.rb +++ b/lib/chef/resource/ohai.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/resource" -require "chef/dist" +require_relative "" +require_relative "../dist" class Chef class Resource diff --git a/lib/chef/resource/ohai_hint.rb b/lib/chef/resource/ohai_hint.rb index e8de5f602a..2c6c91ff4f 100644 --- a/lib/chef/resource/ohai_hint.rb +++ b/lib/chef/resource/ohai_hint.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/openbsd_package.rb b/lib/chef/resource/openbsd_package.rb index 85109de9e8..b1321970b9 100644 --- a/lib/chef/resource/openbsd_package.rb +++ b/lib/chef/resource/openbsd_package.rb @@ -19,9 +19,9 @@ # limitations under the License. # -require "chef/resource/package" -require "chef/provider/package/openbsd" -require "chef/mixin/shell_out" +require_relative "package" +require_relative "../provider/package/openbsd" +require_relative "../mixin/shell_out" class Chef class Resource diff --git a/lib/chef/resource/openssl_dhparam.rb b/lib/chef/resource/openssl_dhparam.rb index 05347ec494..a4f5a6d12b 100644 --- a/lib/chef/resource/openssl_dhparam.rb +++ b/lib/chef/resource/openssl_dhparam.rb @@ -15,12 +15,12 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource class OpensslDhparam < Chef::Resource - require "chef/mixin/openssl_helper" + require_relative "../mixin/openssl_helper" include Chef::Mixin::OpenSSLHelper resource_name :openssl_dhparam diff --git a/lib/chef/resource/openssl_ec_private_key.rb b/lib/chef/resource/openssl_ec_private_key.rb index dc8cd060d6..46a8541fb7 100644 --- a/lib/chef/resource/openssl_ec_private_key.rb +++ b/lib/chef/resource/openssl_ec_private_key.rb @@ -16,12 +16,12 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource class OpensslEcPrivateKey < Chef::Resource - require "chef/mixin/openssl_helper" + require_relative "../mixin/openssl_helper" include Chef::Mixin::OpenSSLHelper resource_name :openssl_ec_private_key diff --git a/lib/chef/resource/openssl_ec_public_key.rb b/lib/chef/resource/openssl_ec_public_key.rb index fad7fd9713..9a06f82082 100644 --- a/lib/chef/resource/openssl_ec_public_key.rb +++ b/lib/chef/resource/openssl_ec_public_key.rb @@ -16,12 +16,12 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource class OpensslEcPublicKey < Chef::Resource - require "chef/mixin/openssl_helper" + require_relative "../mixin/openssl_helper" include Chef::Mixin::OpenSSLHelper resource_name :openssl_ec_public_key diff --git a/lib/chef/resource/openssl_rsa_private_key.rb b/lib/chef/resource/openssl_rsa_private_key.rb index fb19e8ff99..7e46d3e757 100644 --- a/lib/chef/resource/openssl_rsa_private_key.rb +++ b/lib/chef/resource/openssl_rsa_private_key.rb @@ -15,12 +15,12 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource class OpensslRsaPrivateKey < Chef::Resource - require "chef/mixin/openssl_helper" + require_relative "../mixin/openssl_helper" include Chef::Mixin::OpenSSLHelper resource_name :openssl_rsa_private_key diff --git a/lib/chef/resource/openssl_rsa_public_key.rb b/lib/chef/resource/openssl_rsa_public_key.rb index be7f25030f..21e5e8810d 100644 --- a/lib/chef/resource/openssl_rsa_public_key.rb +++ b/lib/chef/resource/openssl_rsa_public_key.rb @@ -15,12 +15,12 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource class OpensslRsaPublicKey < Chef::Resource - require "chef/mixin/openssl_helper" + require_relative "../mixin/openssl_helper" include Chef::Mixin::OpenSSLHelper resource_name :openssl_rsa_public_key diff --git a/lib/chef/resource/openssl_x509_certificate.rb b/lib/chef/resource/openssl_x509_certificate.rb index 71a1f8d6d7..15c57b7662 100644 --- a/lib/chef/resource/openssl_x509_certificate.rb +++ b/lib/chef/resource/openssl_x509_certificate.rb @@ -16,12 +16,12 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource class OpensslX509Certificate < Chef::Resource - require "chef/mixin/openssl_helper" + require_relative "../mixin/openssl_helper" include Chef::Mixin::OpenSSLHelper resource_name :openssl_x509_certificate diff --git a/lib/chef/resource/openssl_x509_crl.rb b/lib/chef/resource/openssl_x509_crl.rb index c6a2918320..dff8be02c6 100644 --- a/lib/chef/resource/openssl_x509_crl.rb +++ b/lib/chef/resource/openssl_x509_crl.rb @@ -16,12 +16,12 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource class OpensslX509Crl < Chef::Resource - require "chef/mixin/openssl_helper" + require_relative "../mixin/openssl_helper" include Chef::Mixin::OpenSSLHelper resource_name :openssl_x509_crl diff --git a/lib/chef/resource/openssl_x509_request.rb b/lib/chef/resource/openssl_x509_request.rb index affc761723..0cb0e5a58f 100644 --- a/lib/chef/resource/openssl_x509_request.rb +++ b/lib/chef/resource/openssl_x509_request.rb @@ -16,12 +16,12 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource class OpensslX509Request < Chef::Resource - require "chef/mixin/openssl_helper" + require_relative "../mixin/openssl_helper" include Chef::Mixin::OpenSSLHelper resource_name :openssl_x509_request diff --git a/lib/chef/resource/osx_profile.rb b/lib/chef/resource/osx_profile.rb index 90166cc338..cfd319cf59 100644 --- a/lib/chef/resource/osx_profile.rb +++ b/lib/chef/resource/osx_profile.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/package.rb b/lib/chef/resource/package.rb index 67b01402a7..b459e23646 100644 --- a/lib/chef/resource/package.rb +++ b/lib/chef/resource/package.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/pacman_package.rb b/lib/chef/resource/pacman_package.rb index 4661b6f07d..71177a42aa 100644 --- a/lib/chef/resource/pacman_package.rb +++ b/lib/chef/resource/pacman_package.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource/package" +require_relative "package" class Chef class Resource diff --git a/lib/chef/resource/paludis_package.rb b/lib/chef/resource/paludis_package.rb index f7f9187826..88d4be6894 100644 --- a/lib/chef/resource/paludis_package.rb +++ b/lib/chef/resource/paludis_package.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/resource/package" -require "chef/provider/package/paludis" +require_relative "package" +require_relative "../provider/package/paludis" class Chef class Resource diff --git a/lib/chef/resource/perl.rb b/lib/chef/resource/perl.rb index f3079eb40e..58e21c4915 100644 --- a/lib/chef/resource/perl.rb +++ b/lib/chef/resource/perl.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/resource/script" -require "chef/provider/script" +require_relative "script" +require_relative "../provider/script" class Chef class Resource diff --git a/lib/chef/resource/portage_package.rb b/lib/chef/resource/portage_package.rb index 5e954581c7..b7b434804b 100644 --- a/lib/chef/resource/portage_package.rb +++ b/lib/chef/resource/portage_package.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource/package" +require_relative "package" class Chef class Resource diff --git a/lib/chef/resource/powershell_package.rb b/lib/chef/resource/powershell_package.rb index 28dabc82b0..53be107ebc 100644 --- a/lib/chef/resource/powershell_package.rb +++ b/lib/chef/resource/powershell_package.rb @@ -15,8 +15,8 @@ # limitations under the License. # -require "chef/resource/package" -require "chef/mixin/uris" +require_relative "package" +require_relative "../mixin/uris" class Chef class Resource diff --git a/lib/chef/resource/powershell_package_source.rb b/lib/chef/resource/powershell_package_source.rb index 061b9e632d..cbacc685d6 100644 --- a/lib/chef/resource/powershell_package_source.rb +++ b/lib/chef/resource/powershell_package_source.rb @@ -15,8 +15,8 @@ # limitations under the License. # -require "chef/resource" -require "chef/json_compat" +require_relative "" +require_relative "../json_compat" class Chef class Resource diff --git a/lib/chef/resource/powershell_script.rb b/lib/chef/resource/powershell_script.rb index 53290c54f8..6cb1453376 100644 --- a/lib/chef/resource/powershell_script.rb +++ b/lib/chef/resource/powershell_script.rb @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require "chef/resource/windows_script" +require_relative "windows_script" class Chef class Resource diff --git a/lib/chef/resource/python.rb b/lib/chef/resource/python.rb index f6c259b858..b1e059a66f 100644 --- a/lib/chef/resource/python.rb +++ b/lib/chef/resource/python.rb @@ -15,8 +15,8 @@ # limitations under the License. # -require "chef/resource/script" -require "chef/provider/script" +require_relative "script" +require_relative "../provider/script" class Chef class Resource diff --git a/lib/chef/resource/reboot.rb b/lib/chef/resource/reboot.rb index b9f748978f..68a328ece2 100644 --- a/lib/chef/resource/reboot.rb +++ b/lib/chef/resource/reboot.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/registry_key.rb b/lib/chef/resource/registry_key.rb index 30233ddc8b..1a60097c14 100644 --- a/lib/chef/resource/registry_key.rb +++ b/lib/chef/resource/registry_key.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/resource" -require "chef/digester" +require_relative "" +require_relative "../digester" class Chef class Resource diff --git a/lib/chef/resource/remote_directory.rb b/lib/chef/resource/remote_directory.rb index dd7077b9ae..50c183fbc5 100644 --- a/lib/chef/resource/remote_directory.rb +++ b/lib/chef/resource/remote_directory.rb @@ -17,9 +17,9 @@ # limitations under the License. # -require "chef/resource/directory" -require "chef/provider/remote_directory" -require "chef/mixin/securable" +require_relative "directory" +require_relative "../provider/remote_directory" +require_relative "../mixin/securable" class Chef class Resource diff --git a/lib/chef/resource/remote_file.rb b/lib/chef/resource/remote_file.rb index 3607a3cbc5..b6566aa619 100644 --- a/lib/chef/resource/remote_file.rb +++ b/lib/chef/resource/remote_file.rb @@ -18,10 +18,10 @@ # require "uri" -require "chef/resource/file" -require "chef/provider/remote_file" -require "chef/mixin/securable" -require "chef/mixin/uris" +require_relative "file" +require_relative "../provider/remote_file" +require_relative "../mixin/securable" +require_relative "../mixin/uris" class Chef class Resource diff --git a/lib/chef/resource/resource_notification.rb b/lib/chef/resource/resource_notification.rb index a3475e3301..3c5a3f0be9 100644 --- a/lib/chef/resource/resource_notification.rb +++ b/lib/chef/resource/resource_notification.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/rhsm_errata.rb b/lib/chef/resource/rhsm_errata.rb index e37278de79..4609342a2a 100644 --- a/lib/chef/resource/rhsm_errata.rb +++ b/lib/chef/resource/rhsm_errata.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/rhsm_errata_level.rb b/lib/chef/resource/rhsm_errata_level.rb index 1e82ee73aa..bfa9d395f6 100644 --- a/lib/chef/resource/rhsm_errata_level.rb +++ b/lib/chef/resource/rhsm_errata_level.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/rhsm_register.rb b/lib/chef/resource/rhsm_register.rb index 4e10e3a03d..6a898cd702 100644 --- a/lib/chef/resource/rhsm_register.rb +++ b/lib/chef/resource/rhsm_register.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" require "shellwords" class Chef diff --git a/lib/chef/resource/rhsm_repo.rb b/lib/chef/resource/rhsm_repo.rb index 943abc3331..7bcd1778b0 100644 --- a/lib/chef/resource/rhsm_repo.rb +++ b/lib/chef/resource/rhsm_repo.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/rhsm_subscription.rb b/lib/chef/resource/rhsm_subscription.rb index 52f4c41653..242d5d8c81 100644 --- a/lib/chef/resource/rhsm_subscription.rb +++ b/lib/chef/resource/rhsm_subscription.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/route.rb b/lib/chef/resource/route.rb index 45a1266fd7..164ba4dfce 100644 --- a/lib/chef/resource/route.rb +++ b/lib/chef/resource/route.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/rpm_package.rb b/lib/chef/resource/rpm_package.rb index cf408cd094..3a171057e5 100644 --- a/lib/chef/resource/rpm_package.rb +++ b/lib/chef/resource/rpm_package.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource/package" +require_relative "package" class Chef class Resource diff --git a/lib/chef/resource/ruby.rb b/lib/chef/resource/ruby.rb index b5f36bb0e9..63bdd12630 100644 --- a/lib/chef/resource/ruby.rb +++ b/lib/chef/resource/ruby.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/resource/script" -require "chef/provider/script" +require_relative "script" +require_relative "../provider/script" class Chef class Resource diff --git a/lib/chef/resource/ruby_block.rb b/lib/chef/resource/ruby_block.rb index 0ec6647fd8..bfba0a6bde 100644 --- a/lib/chef/resource/ruby_block.rb +++ b/lib/chef/resource/ruby_block.rb @@ -17,9 +17,9 @@ # limitations under the License. # -require "chef/resource" -require "chef/provider/ruby_block" -require "chef/dist" +require_relative "" +require_relative "../provider/ruby_block" +require_relative "../dist" class Chef class Resource diff --git a/lib/chef/resource/scm.rb b/lib/chef/resource/scm.rb index fb0e70ad44..a485dd1a25 100644 --- a/lib/chef/resource/scm.rb +++ b/lib/chef/resource/scm.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/script.rb b/lib/chef/resource/script.rb index 0d7e6a10d5..6d40061f8f 100644 --- a/lib/chef/resource/script.rb +++ b/lib/chef/resource/script.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/resource/execute" +require_relative "execute" class Chef class Resource diff --git a/lib/chef/resource/service.rb b/lib/chef/resource/service.rb index 20bf9ecc65..93e19b7420 100644 --- a/lib/chef/resource/service.rb +++ b/lib/chef/resource/service.rb @@ -17,9 +17,9 @@ # limitations under the License. # -require "chef/resource" +require_relative "" require "shellwords" -require "chef/dist" +require_relative "../dist" class Chef class Resource diff --git a/lib/chef/resource/smartos_package.rb b/lib/chef/resource/smartos_package.rb index d9ef55c50f..510e1ccc7b 100644 --- a/lib/chef/resource/smartos_package.rb +++ b/lib/chef/resource/smartos_package.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource/package" +require_relative "package" class Chef class Resource diff --git a/lib/chef/resource/snap_package.rb b/lib/chef/resource/snap_package.rb index 080b604d28..a8be77d5ce 100644 --- a/lib/chef/resource/snap_package.rb +++ b/lib/chef/resource/snap_package.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource/package" +require_relative "package" class Chef class Resource diff --git a/lib/chef/resource/solaris_package.rb b/lib/chef/resource/solaris_package.rb index 435a6ecc44..163621ec5b 100644 --- a/lib/chef/resource/solaris_package.rb +++ b/lib/chef/resource/solaris_package.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/resource/package" +require_relative "package" class Chef class Resource diff --git a/lib/chef/resource/ssh_known_hosts_entry.rb b/lib/chef/resource/ssh_known_hosts_entry.rb index c986e1127d..be11a1ede5 100644 --- a/lib/chef/resource/ssh_known_hosts_entry.rb +++ b/lib/chef/resource/ssh_known_hosts_entry.rb @@ -17,7 +17,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/subversion.rb b/lib/chef/resource/subversion.rb index 4febb9353c..c60f03710f 100644 --- a/lib/chef/resource/subversion.rb +++ b/lib/chef/resource/subversion.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/resource/scm" -require "chef/dist" +require_relative "scm" +require_relative "../dist" class Chef class Resource diff --git a/lib/chef/resource/sudo.rb b/lib/chef/resource/sudo.rb index 74dd9d1a55..18a03f2046 100644 --- a/lib/chef/resource/sudo.rb +++ b/lib/chef/resource/sudo.rb @@ -19,7 +19,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/swap_file.rb b/lib/chef/resource/swap_file.rb index 93c3f0906b..d865d4410f 100644 --- a/lib/chef/resource/swap_file.rb +++ b/lib/chef/resource/swap_file.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/sysctl.rb b/lib/chef/resource/sysctl.rb index 08f4bf716c..4fb6971ece 100644 --- a/lib/chef/resource/sysctl.rb +++ b/lib/chef/resource/sysctl.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/systemd_unit.rb b/lib/chef/resource/systemd_unit.rb index 89bc30b9d1..7e5e127552 100644 --- a/lib/chef/resource/systemd_unit.rb +++ b/lib/chef/resource/systemd_unit.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" require "iniparse" class Chef diff --git a/lib/chef/resource/template.rb b/lib/chef/resource/template.rb index b08bf0b8fb..7ca22f5b63 100644 --- a/lib/chef/resource/template.rb +++ b/lib/chef/resource/template.rb @@ -18,9 +18,9 @@ # limitations under the License. # -require "chef/resource/file" -require "chef/mixin/securable" -require "chef/dist" +require_relative "file" +require_relative "../mixin/securable" +require_relative "../dist" class Chef class Resource diff --git a/lib/chef/resource/timezone.rb b/lib/chef/resource/timezone.rb index 6ad7f5a521..ace0502f03 100644 --- a/lib/chef/resource/timezone.rb +++ b/lib/chef/resource/timezone.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/user.rb b/lib/chef/resource/user.rb index bef1f5f620..b4b23cba4f 100644 --- a/lib/chef/resource/user.rb +++ b/lib/chef/resource/user.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/user/aix_user.rb b/lib/chef/resource/user/aix_user.rb index d5f1829b63..426687e720 100644 --- a/lib/chef/resource/user/aix_user.rb +++ b/lib/chef/resource/user/aix_user.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource/user" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/user/dscl_user.rb b/lib/chef/resource/user/dscl_user.rb index 0afc504c1d..22faf273b7 100644 --- a/lib/chef/resource/user/dscl_user.rb +++ b/lib/chef/resource/user/dscl_user.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource/user" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/user/linux_user.rb b/lib/chef/resource/user/linux_user.rb index 056a421197..6873ab0b8c 100644 --- a/lib/chef/resource/user/linux_user.rb +++ b/lib/chef/resource/user/linux_user.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource/user" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/user/pw_user.rb b/lib/chef/resource/user/pw_user.rb index 3672943f5c..f903e3fdf5 100644 --- a/lib/chef/resource/user/pw_user.rb +++ b/lib/chef/resource/user/pw_user.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource/user" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/user/solaris_user.rb b/lib/chef/resource/user/solaris_user.rb index cca90e6743..1cf9d1f875 100644 --- a/lib/chef/resource/user/solaris_user.rb +++ b/lib/chef/resource/user/solaris_user.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource/user" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/user/windows_user.rb b/lib/chef/resource/user/windows_user.rb index e10ef3881c..9c20029598 100644 --- a/lib/chef/resource/user/windows_user.rb +++ b/lib/chef/resource/user/windows_user.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource/user" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/windows_ad_join.rb b/lib/chef/resource/windows_ad_join.rb index 3b0ae343a9..d75d6570b2 100644 --- a/lib/chef/resource/windows_ad_join.rb +++ b/lib/chef/resource/windows_ad_join.rb @@ -15,8 +15,8 @@ # limitations under the License. # -require "chef/resource" -require "chef/mixin/powershell_out" +require_relative "" +require_relative "../mixin/powershell_out" class Chef class Resource diff --git a/lib/chef/resource/windows_auto_run.rb b/lib/chef/resource/windows_auto_run.rb index 34f3443323..924109c699 100644 --- a/lib/chef/resource/windows_auto_run.rb +++ b/lib/chef/resource/windows_auto_run.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/windows_certificate.rb b/lib/chef/resource/windows_certificate.rb index c530d3b67d..de28e0b984 100644 --- a/lib/chef/resource/windows_certificate.rb +++ b/lib/chef/resource/windows_certificate.rb @@ -17,11 +17,11 @@ # limitations under the License. # -require "chef/util/path_helper" -require "chef/resource" +require_relative "../util/path_helper" +require_relative "" require "win32-certstore" if Chef::Platform.windows? require "openssl" -require "chef/dist" +require_relative "../dist" class Chef class Resource diff --git a/lib/chef/resource/windows_dfs_folder.rb b/lib/chef/resource/windows_dfs_folder.rb index fb6ddf8ef5..40fcd9d718 100644 --- a/lib/chef/resource/windows_dfs_folder.rb +++ b/lib/chef/resource/windows_dfs_folder.rb @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/windows_dfs_namespace.rb b/lib/chef/resource/windows_dfs_namespace.rb index fe168f25ce..bd2fffdd9a 100644 --- a/lib/chef/resource/windows_dfs_namespace.rb +++ b/lib/chef/resource/windows_dfs_namespace.rb @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/windows_dfs_server.rb b/lib/chef/resource/windows_dfs_server.rb index a36263baa5..e9ed8a08b6 100644 --- a/lib/chef/resource/windows_dfs_server.rb +++ b/lib/chef/resource/windows_dfs_server.rb @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/windows_dns_record.rb b/lib/chef/resource/windows_dns_record.rb index 89ea2f74f3..03c5fab6b6 100644 --- a/lib/chef/resource/windows_dns_record.rb +++ b/lib/chef/resource/windows_dns_record.rb @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/windows_dns_zone.rb b/lib/chef/resource/windows_dns_zone.rb index 391d05757a..883e0939a2 100644 --- a/lib/chef/resource/windows_dns_zone.rb +++ b/lib/chef/resource/windows_dns_zone.rb @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/windows_env.rb b/lib/chef/resource/windows_env.rb index f67013965b..32ed92f70b 100644 --- a/lib/chef/resource/windows_env.rb +++ b/lib/chef/resource/windows_env.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/windows_feature.rb b/lib/chef/resource/windows_feature.rb index 6641242148..6f23133954 100644 --- a/lib/chef/resource/windows_feature.rb +++ b/lib/chef/resource/windows_feature.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/windows_feature_dism.rb b/lib/chef/resource/windows_feature_dism.rb index b6bd4ccb8a..e43bd32f81 100644 --- a/lib/chef/resource/windows_feature_dism.rb +++ b/lib/chef/resource/windows_feature_dism.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/resource" -require "chef/platform/query_helpers" +require_relative "" +require_relative "../platform/query_helpers" class Chef class Resource diff --git a/lib/chef/resource/windows_feature_powershell.rb b/lib/chef/resource/windows_feature_powershell.rb index a0d4c1ae64..bc486218b2 100644 --- a/lib/chef/resource/windows_feature_powershell.rb +++ b/lib/chef/resource/windows_feature_powershell.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/mixin/powershell_out" -require "chef/json_compat" -require "chef/resource" -require "chef/platform/query_helpers" +require_relative "../mixin/powershell_out" +require_relative "../json_compat" +require_relative "" +require_relative "../platform/query_helpers" class Chef class Resource diff --git a/lib/chef/resource/windows_firewall_rule.rb b/lib/chef/resource/windows_firewall_rule.rb index 0096a89123..3dbc5d6b0f 100644 --- a/lib/chef/resource/windows_firewall_rule.rb +++ b/lib/chef/resource/windows_firewall_rule.rb @@ -19,7 +19,7 @@ # limitations under the License. # -require "chef/json_compat" +require_relative "../json_compat" class Chef class Resource diff --git a/lib/chef/resource/windows_font.rb b/lib/chef/resource/windows_font.rb index 5657bce390..aa7caa6847 100644 --- a/lib/chef/resource/windows_font.rb +++ b/lib/chef/resource/windows_font.rb @@ -15,12 +15,12 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource class WindowsFont < Chef::Resource - require "chef/util/path_helper" + require_relative "../util/path_helper" resource_name :windows_font provides(:windows_font) { true } diff --git a/lib/chef/resource/windows_package.rb b/lib/chef/resource/windows_package.rb index 9bfa51b9fd..46409265b3 100644 --- a/lib/chef/resource/windows_package.rb +++ b/lib/chef/resource/windows_package.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/mixin/uris" -require "chef/resource/package" -require "chef/provider/package/windows" +require_relative "../mixin/uris" +require_relative "package" +require_relative "../provider/package/windows" require "chef/win32/error" if RUBY_PLATFORM =~ /mswin|mingw|windows/ class Chef diff --git a/lib/chef/resource/windows_pagefile.rb b/lib/chef/resource/windows_pagefile.rb index a41e598bd9..3b5d077a3c 100644 --- a/lib/chef/resource/windows_pagefile.rb +++ b/lib/chef/resource/windows_pagefile.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/windows_path.rb b/lib/chef/resource/windows_path.rb index e0af92f551..ceaa9f95a2 100644 --- a/lib/chef/resource/windows_path.rb +++ b/lib/chef/resource/windows_path.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/windows_printer.rb b/lib/chef/resource/windows_printer.rb index b5c963c85b..e5ca7e2187 100644 --- a/lib/chef/resource/windows_printer.rb +++ b/lib/chef/resource/windows_printer.rb @@ -17,7 +17,7 @@ # See here for more info: # http://msdn.microsoft.com/en-us/library/windows/desktop/aa394492(v=vs.85).aspx -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/windows_printer_port.rb b/lib/chef/resource/windows_printer_port.rb index 799a37a651..4a47c22443 100644 --- a/lib/chef/resource/windows_printer_port.rb +++ b/lib/chef/resource/windows_printer_port.rb @@ -17,7 +17,7 @@ # See here for more info: # http://msdn.microsoft.com/en-us/library/windows/desktop/aa394492(v=vs.85).aspx -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/windows_script.rb b/lib/chef/resource/windows_script.rb index fe3e37989d..3177a32090 100644 --- a/lib/chef/resource/windows_script.rb +++ b/lib/chef/resource/windows_script.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/platform/query_helpers" -require "chef/resource/script" -require "chef/mixin/windows_architecture_helper" +require_relative "../platform/query_helpers" +require_relative "script" +require_relative "../mixin/windows_architecture_helper" class Chef class Resource diff --git a/lib/chef/resource/windows_service.rb b/lib/chef/resource/windows_service.rb index 33805ed482..6853d539ab 100644 --- a/lib/chef/resource/windows_service.rb +++ b/lib/chef/resource/windows_service.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/resource/service" -require "chef/win32_service_constants" +require_relative "service" +require_relative "../win32_service_constants" class Chef class Resource diff --git a/lib/chef/resource/windows_share.rb b/lib/chef/resource/windows_share.rb index 52ed6120f8..4e59bad407 100644 --- a/lib/chef/resource/windows_share.rb +++ b/lib/chef/resource/windows_share.rb @@ -19,9 +19,9 @@ # limitations under the License. # -require "chef/resource" -require "chef/json_compat" -require "chef/util/path_helper" +require_relative "" +require_relative "../json_compat" +require_relative "../util/path_helper" class Chef class Resource diff --git a/lib/chef/resource/windows_shortcut.rb b/lib/chef/resource/windows_shortcut.rb index 34e080283b..5031fc23c8 100644 --- a/lib/chef/resource/windows_shortcut.rb +++ b/lib/chef/resource/windows_shortcut.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/windows_task.rb b/lib/chef/resource/windows_task.rb index c60515a0ee..952767ff03 100644 --- a/lib/chef/resource/windows_task.rb +++ b/lib/chef/resource/windows_task.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" require "chef/win32/security" if Chef::Platform.windows? class Chef diff --git a/lib/chef/resource/windows_uac.rb b/lib/chef/resource/windows_uac.rb index d41bcf7d4d..707ac65391 100644 --- a/lib/chef/resource/windows_uac.rb +++ b/lib/chef/resource/windows_uac.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/windows_workgroup.rb b/lib/chef/resource/windows_workgroup.rb index 6bf6e96d18..d1f9729c76 100644 --- a/lib/chef/resource/windows_workgroup.rb +++ b/lib/chef/resource/windows_workgroup.rb @@ -15,8 +15,8 @@ # limitations under the License. # -require "chef/resource" -require "chef/mixin/powershell_out" +require_relative "" +require_relative "../mixin/powershell_out" class Chef class Resource diff --git a/lib/chef/resource/yum_package.rb b/lib/chef/resource/yum_package.rb index 8f088371ed..85efab633b 100644 --- a/lib/chef/resource/yum_package.rb +++ b/lib/chef/resource/yum_package.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/resource/package" -require "chef/dist" +require_relative "package" +require_relative "../dist" class Chef class Resource diff --git a/lib/chef/resource/yum_repository.rb b/lib/chef/resource/yum_repository.rb index 0a9747c266..fd99a2b3ba 100644 --- a/lib/chef/resource/yum_repository.rb +++ b/lib/chef/resource/yum_repository.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource/zypper_package.rb b/lib/chef/resource/zypper_package.rb index c8d776cebb..f3b19846dc 100644 --- a/lib/chef/resource/zypper_package.rb +++ b/lib/chef/resource/zypper_package.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource/package" +require_relative "package" class Chef class Resource diff --git a/lib/chef/resource/zypper_repository.rb b/lib/chef/resource/zypper_repository.rb index d1683d5fd0..59bc81465d 100644 --- a/lib/chef/resource/zypper_repository.rb +++ b/lib/chef/resource/zypper_repository.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/resource" +require_relative "" class Chef class Resource diff --git a/lib/chef/resource_builder.rb b/lib/chef/resource_builder.rb index 43a2495cba..d4d20e01ed 100644 --- a/lib/chef/resource_builder.rb +++ b/lib/chef/resource_builder.rb @@ -87,6 +87,6 @@ class Chef end end -require "chef/exceptions" -require "chef/resource" -require "chef/log" +require_relative "exceptions" +require_relative "resource" +require_relative "log" diff --git a/lib/chef/resource_collection.rb b/lib/chef/resource_collection.rb index e450f4f19e..a1f97a7d12 100644 --- a/lib/chef/resource_collection.rb +++ b/lib/chef/resource_collection.rb @@ -17,10 +17,10 @@ # limitations under the License. # -require "chef/resource_collection/resource_set" -require "chef/resource_collection/resource_list" -require "chef/resource_collection/resource_collection_serialization" -require "chef/log" +require_relative "resource_collection/resource_set" +require_relative "resource_collection/resource_list" +require_relative "resource_collection/resource_collection_serialization" +require_relative "log" require "forwardable" ## diff --git a/lib/chef/resource_collection/resource_collection_serialization.rb b/lib/chef/resource_collection/resource_collection_serialization.rb index d3133bae39..3008625912 100644 --- a/lib/chef/resource_collection/resource_collection_serialization.rb +++ b/lib/chef/resource_collection/resource_collection_serialization.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/json_compat" +require_relative "../json_compat" class Chef class ResourceCollection diff --git a/lib/chef/resource_collection/resource_list.rb b/lib/chef/resource_collection/resource_list.rb index 3c993d6e55..861bc302c5 100644 --- a/lib/chef/resource_collection/resource_list.rb +++ b/lib/chef/resource_collection/resource_list.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/resource" -require "chef/resource_collection/stepable_iterator" -require "chef/resource_collection/resource_collection_serialization" +require_relative "../resource" +require_relative "stepable_iterator" +require_relative "resource_collection_serialization" require "forwardable" # This class keeps the list of all known Resources in the order they are to be executed in. It also keeps a pointer diff --git a/lib/chef/resource_collection/resource_set.rb b/lib/chef/resource_collection/resource_set.rb index 637ba48030..62c18d07b0 100644 --- a/lib/chef/resource_collection/resource_set.rb +++ b/lib/chef/resource_collection/resource_set.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/resource" -require "chef/resource_collection/resource_collection_serialization" +require_relative "../resource" +require_relative "resource_collection_serialization" class Chef class ResourceCollection diff --git a/lib/chef/resource_definition.rb b/lib/chef/resource_definition.rb index af22a5389e..6c0f76c169 100644 --- a/lib/chef/resource_definition.rb +++ b/lib/chef/resource_definition.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/mixin/from_file" -require "chef/mixin/params_validate" +require_relative "mixin/from_file" +require_relative "mixin/params_validate" class Chef class ResourceDefinition diff --git a/lib/chef/resource_definition_list.rb b/lib/chef/resource_definition_list.rb index 22751249e4..0dbc115ada 100644 --- a/lib/chef/resource_definition_list.rb +++ b/lib/chef/resource_definition_list.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/mixin/from_file" -require "chef/resource_definition" +require_relative "mixin/from_file" +require_relative "resource_definition" class Chef class ResourceDefinitionList diff --git a/lib/chef/resource_inspector.rb b/lib/chef/resource_inspector.rb index ac65e55e99..940440de7c 100644 --- a/lib/chef/resource_inspector.rb +++ b/lib/chef/resource_inspector.rb @@ -14,14 +14,14 @@ # limitations under the License. # -require "chef/cookbook_loader" -require "chef/cookbook/file_vendor" -require "chef/cookbook/file_system_file_vendor" -require "chef/resource/lwrp_base" -require "chef/run_context" -require "chef/node" -require "chef/resources" -require "chef/json_compat" +require_relative "cookbook_loader" +require_relative "cookbook/file_vendor" +require_relative "cookbook/file_system_file_vendor" +require_relative "resource/lwrp_base" +require_relative "run_context" +require_relative "node" +require_relative "resources" +require_relative "json_compat" module ResourceInspector def self.get_default(default) diff --git a/lib/chef/resource_reporter.rb b/lib/chef/resource_reporter.rb index 01e4073549..8375a3623a 100644 --- a/lib/chef/resource_reporter.rb +++ b/lib/chef/resource_reporter.rb @@ -21,7 +21,7 @@ require "uri" require "securerandom" -require "chef/event_dispatch/base" +require_relative "event_dispatch/base" class Chef class ResourceReporter < EventDispatch::Base diff --git a/lib/chef/resource_resolver.rb b/lib/chef/resource_resolver.rb index 779377c042..410f7f0076 100644 --- a/lib/chef/resource_resolver.rb +++ b/lib/chef/resource_resolver.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/exceptions" -require "chef/platform/resource_priority_map" -require "chef/mixin/convert_to_class_name" +require_relative "exceptions" +require_relative "platform/resource_priority_map" +require_relative "mixin/convert_to_class_name" class Chef class ResourceResolver diff --git a/lib/chef/resources.rb b/lib/chef/resources.rb index 59cae3558a..11003e304c 100644 --- a/lib/chef/resources.rb +++ b/lib/chef/resources.rb @@ -16,140 +16,140 @@ # limitations under the License. # -require "chef/resource/apt_package" -require "chef/resource/apt_preference" -require "chef/resource/apt_repository" -require "chef/resource/apt_update" -require "chef/resource/archive_file" -require "chef/resource/bash" -require "chef/resource/batch" -require "chef/resource/breakpoint" -require "chef/resource/build_essential" -require "chef/resource/cookbook_file" -require "chef/resource/chef_gem" -require "chef/resource/chef_handler" -require "chef/resource/chocolatey_config" -require "chef/resource/chocolatey_package" -require "chef/resource/chocolatey_source" -require "chef/resource/cron" -require "chef/resource/cron_access" -require "chef/resource/cron_d" -require "chef/resource/csh" -require "chef/resource/directory" -require "chef/resource/dmg_package" -require "chef/resource/dpkg_package" -require "chef/resource/dnf_package" -require "chef/resource/dsc_script" -require "chef/resource/dsc_resource" -require "chef/resource/execute" -require "chef/resource/file" -require "chef/resource/freebsd_package" -require "chef/resource/ips_package" -require "chef/resource/gem_package" -require "chef/resource/git" -require "chef/resource/group" -require "chef/resource/http_request" -require "chef/resource/hostname" -require "chef/resource/homebrew_cask" -require "chef/resource/homebrew_package" -require "chef/resource/homebrew_tap" -require "chef/resource/ifconfig" -require "chef/resource/kernel_module" -require "chef/resource/ksh" -require "chef/resource/launchd" -require "chef/resource/link" -require "chef/resource/locale" -require "chef/resource/log" -require "chef/resource/macports_package" -require "chef/resource/macos_userdefaults" -require "chef/resource/mdadm" -require "chef/resource/mount" -require "chef/resource/ohai" -require "chef/resource/ohai_hint" -require "chef/resource/openbsd_package" -require "chef/resource/openssl_dhparam" -require "chef/resource/openssl_ec_private_key" -require "chef/resource/openssl_ec_public_key" -require "chef/resource/openssl_rsa_private_key" -require "chef/resource/openssl_rsa_public_key" -require "chef/resource/openssl_x509_certificate" -require "chef/resource/openssl_x509_crl" -require "chef/resource/openssl_x509_request" -require "chef/resource/package" -require "chef/resource/pacman_package" -require "chef/resource/paludis_package" -require "chef/resource/perl" -require "chef/resource/portage_package" -require "chef/resource/powershell_package_source" -require "chef/resource/powershell_script" -require "chef/resource/osx_profile" -require "chef/resource/python" -require "chef/resource/reboot" -require "chef/resource/registry_key" -require "chef/resource/remote_directory" -require "chef/resource/remote_file" -require "chef/resource/rhsm_errata_level" -require "chef/resource/rhsm_errata" -require "chef/resource/rhsm_register" -require "chef/resource/rhsm_repo" -require "chef/resource/rhsm_subscription" -require "chef/resource/rpm_package" -require "chef/resource/snap_package" -require "chef/resource/solaris_package" -require "chef/resource/route" -require "chef/resource/ruby" -require "chef/resource/ruby_block" -require "chef/resource/scm" -require "chef/resource/script" -require "chef/resource/service" -require "chef/resource/sudo" -require "chef/resource/sysctl" -require "chef/resource/swap_file" -require "chef/resource/systemd_unit" -require "chef/resource/ssh_known_hosts_entry" -require "chef/resource/windows_service" -require "chef/resource/subversion" -require "chef/resource/smartos_package" -require "chef/resource/template" -require "chef/resource/user" -require "chef/resource/user/aix_user" -require "chef/resource/user/dscl_user" -require "chef/resource/user/linux_user" -require "chef/resource/user/pw_user" -require "chef/resource/user/solaris_user" -require "chef/resource/user/windows_user" -require "chef/resource/whyrun_safe_ruby_block" -require "chef/resource/windows_env" -require "chef/resource/windows_package" -require "chef/resource/yum_package" -require "chef/resource/yum_repository" -require "chef/resource/lwrp_base" -require "chef/resource/bff_package" -require "chef/resource/zypper_package" -require "chef/resource/zypper_repository" -require "chef/resource/cab_package" -require "chef/resource/powershell_package" -require "chef/resource/msu_package" -require "chef/resource/windows_ad_join" -require "chef/resource/windows_auto_run" -require "chef/resource/windows_certificate" -require "chef/resource/windows_dfs_folder" -require "chef/resource/windows_dfs_namespace" -require "chef/resource/windows_dfs_server" -require "chef/resource/windows_dns_record" -require "chef/resource/windows_dns_zone" -require "chef/resource/windows_feature" -require "chef/resource/windows_feature_dism" -require "chef/resource/windows_feature_powershell" -require "chef/resource/windows_firewall_rule" -require "chef/resource/windows_font" -require "chef/resource/windows_pagefile" -require "chef/resource/windows_path" -require "chef/resource/windows_printer" -require "chef/resource/windows_printer_port" -require "chef/resource/windows_share" -require "chef/resource/windows_shortcut" -require "chef/resource/windows_task" -require "chef/resource/windows_uac" -require "chef/resource/windows_workgroup" -require "chef/resource/timezone" +require_relative "resource/apt_package" +require_relative "resource/apt_preference" +require_relative "resource/apt_repository" +require_relative "resource/apt_update" +require_relative "resource/archive_file" +require_relative "resource/bash" +require_relative "resource/batch" +require_relative "resource/breakpoint" +require_relative "resource/build_essential" +require_relative "resource/cookbook_file" +require_relative "resource/chef_gem" +require_relative "resource/chef_handler" +require_relative "resource/chocolatey_config" +require_relative "resource/chocolatey_package" +require_relative "resource/chocolatey_source" +require_relative "resource/cron" +require_relative "resource/cron_access" +require_relative "resource/cron_d" +require_relative "resource/csh" +require_relative "resource/directory" +require_relative "resource/dmg_package" +require_relative "resource/dpkg_package" +require_relative "resource/dnf_package" +require_relative "resource/dsc_script" +require_relative "resource/dsc_resource" +require_relative "resource/execute" +require_relative "resource/file" +require_relative "resource/freebsd_package" +require_relative "resource/ips_package" +require_relative "resource/gem_package" +require_relative "resource/git" +require_relative "resource/group" +require_relative "resource/http_request" +require_relative "resource/hostname" +require_relative "resource/homebrew_cask" +require_relative "resource/homebrew_package" +require_relative "resource/homebrew_tap" +require_relative "resource/ifconfig" +require_relative "resource/kernel_module" +require_relative "resource/ksh" +require_relative "resource/launchd" +require_relative "resource/link" +require_relative "resource/locale" +require_relative "resource/log" +require_relative "resource/macports_package" +require_relative "resource/macos_userdefaults" +require_relative "resource/mdadm" +require_relative "resource/mount" +require_relative "resource/ohai" +require_relative "resource/ohai_hint" +require_relative "resource/openbsd_package" +require_relative "resource/openssl_dhparam" +require_relative "resource/openssl_ec_private_key" +require_relative "resource/openssl_ec_public_key" +require_relative "resource/openssl_rsa_private_key" +require_relative "resource/openssl_rsa_public_key" +require_relative "resource/openssl_x509_certificate" +require_relative "resource/openssl_x509_crl" +require_relative "resource/openssl_x509_request" +require_relative "resource/package" +require_relative "resource/pacman_package" +require_relative "resource/paludis_package" +require_relative "resource/perl" +require_relative "resource/portage_package" +require_relative "resource/powershell_package_source" +require_relative "resource/powershell_script" +require_relative "resource/osx_profile" +require_relative "resource/python" +require_relative "resource/reboot" +require_relative "resource/registry_key" +require_relative "resource/remote_directory" +require_relative "resource/remote_file" +require_relative "resource/rhsm_errata_level" +require_relative "resource/rhsm_errata" +require_relative "resource/rhsm_register" +require_relative "resource/rhsm_repo" +require_relative "resource/rhsm_subscription" +require_relative "resource/rpm_package" +require_relative "resource/snap_package" +require_relative "resource/solaris_package" +require_relative "resource/route" +require_relative "resource/ruby" +require_relative "resource/ruby_block" +require_relative "resource/scm" +require_relative "resource/script" +require_relative "resource/service" +require_relative "resource/sudo" +require_relative "resource/sysctl" +require_relative "resource/swap_file" +require_relative "resource/systemd_unit" +require_relative "resource/ssh_known_hosts_entry" +require_relative "resource/windows_service" +require_relative "resource/subversion" +require_relative "resource/smartos_package" +require_relative "resource/template" +require_relative "resource/user" +require_relative "resource/user/aix_user" +require_relative "resource/user/dscl_user" +require_relative "resource/user/linux_user" +require_relative "resource/user/pw_user" +require_relative "resource/user/solaris_user" +require_relative "resource/user/windows_user" +require_relative "resource/whyrun_safe_ruby_block" +require_relative "resource/windows_env" +require_relative "resource/windows_package" +require_relative "resource/yum_package" +require_relative "resource/yum_repository" +require_relative "resource/lwrp_base" +require_relative "resource/bff_package" +require_relative "resource/zypper_package" +require_relative "resource/zypper_repository" +require_relative "resource/cab_package" +require_relative "resource/powershell_package" +require_relative "resource/msu_package" +require_relative "resource/windows_ad_join" +require_relative "resource/windows_auto_run" +require_relative "resource/windows_certificate" +require_relative "resource/windows_dfs_folder" +require_relative "resource/windows_dfs_namespace" +require_relative "resource/windows_dfs_server" +require_relative "resource/windows_dns_record" +require_relative "resource/windows_dns_zone" +require_relative "resource/windows_feature" +require_relative "resource/windows_feature_dism" +require_relative "resource/windows_feature_powershell" +require_relative "resource/windows_firewall_rule" +require_relative "resource/windows_font" +require_relative "resource/windows_pagefile" +require_relative "resource/windows_path" +require_relative "resource/windows_printer" +require_relative "resource/windows_printer_port" +require_relative "resource/windows_share" +require_relative "resource/windows_shortcut" +require_relative "resource/windows_task" +require_relative "resource/windows_uac" +require_relative "resource/windows_workgroup" +require_relative "resource/timezone" diff --git a/lib/chef/role.rb b/lib/chef/role.rb index 31318fbfe3..d0c1bc4327 100644 --- a/lib/chef/role.rb +++ b/lib/chef/role.rb @@ -18,14 +18,14 @@ # limitations under the License. # -require "chef/config" -require "chef/mixin/params_validate" -require "chef/mixin/from_file" -require "chef/run_list" -require "chef/mash" -require "chef/json_compat" -require "chef/server_api" -require "chef/search/query" +require_relative "config" +require_relative "mixin/params_validate" +require_relative "mixin/from_file" +require_relative "run_list" +require_relative "mash" +require_relative "json_compat" +require_relative "server_api" +require_relative "search/query" class Chef class Role diff --git a/lib/chef/run_context.rb b/lib/chef/run_context.rb index 403a30f6fb..e533ebbddd 100644 --- a/lib/chef/run_context.rb +++ b/lib/chef/run_context.rb @@ -17,15 +17,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/resource_collection" -require "chef/cookbook_version" -require "chef/node" -require "chef/role" -require "chef/log" -require "chef/recipe" -require "chef/run_context/cookbook_compiler" -require "chef/event_dispatch/events_output_stream" -require "chef/train_transport" +require_relative "resource_collection" +require_relative "cookbook_version" +require_relative "node" +require_relative "role" +require_relative "log" +require_relative "recipe" +require_relative "run_context/cookbook_compiler" +require_relative "event_dispatch/events_output_stream" +require_relative "train_transport" require "forwardable" class Chef diff --git a/lib/chef/run_context/cookbook_compiler.rb b/lib/chef/run_context/cookbook_compiler.rb index 1469462e69..4c6e1c9f0d 100644 --- a/lib/chef/run_context/cookbook_compiler.rb +++ b/lib/chef/run_context/cookbook_compiler.rb @@ -17,11 +17,11 @@ # require "set" -require "chef/log" -require "chef/recipe" -require "chef/resource/lwrp_base" -require "chef/provider/lwrp_base" -require "chef/resource_definition_list" +require_relative "../log" +require_relative "../recipe" +require_relative "../resource/lwrp_base" +require_relative "../provider/lwrp_base" +require_relative "../resource_definition_list" class Chef class RunContext diff --git a/lib/chef/run_list.rb b/lib/chef/run_list.rb index 3ac5fab07b..7ec5419ab7 100644 --- a/lib/chef/run_list.rb +++ b/lib/chef/run_list.rb @@ -19,10 +19,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/run_list/run_list_item" -require "chef/run_list/run_list_expansion" -require "chef/run_list/versioned_recipe_list" -require "chef/mixin/params_validate" +require_relative "run_list/run_list_item" +require_relative "run_list/run_list_expansion" +require_relative "run_list/versioned_recipe_list" +require_relative "mixin/params_validate" class Chef class RunList diff --git a/lib/chef/run_list/run_list_expansion.rb b/lib/chef/run_list/run_list_expansion.rb index 97422bee16..9ddcdf7373 100644 --- a/lib/chef/run_list/run_list_expansion.rb +++ b/lib/chef/run_list/run_list_expansion.rb @@ -16,13 +16,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/mash" +require_relative "../mash" -require "chef/mixin/deep_merge" +require_relative "../mixin/deep_merge" -require "chef/role" -require "chef/server_api" -require "chef/json_compat" +require_relative "../role" +require_relative "../server_api" +require_relative "../json_compat" class Chef class RunList diff --git a/lib/chef/run_list/versioned_recipe_list.rb b/lib/chef/run_list/versioned_recipe_list.rb index e2933d45cd..182c749b46 100644 --- a/lib/chef/run_list/versioned_recipe_list.rb +++ b/lib/chef/run_list/versioned_recipe_list.rb @@ -15,8 +15,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -require "chef/version_class" -require "chef/version_constraint" +require_relative "../version_class" +require_relative "../version_constraint" # Why does this class exist? # Why did we not just modify RunList/RunListItem? diff --git a/lib/chef/run_lock.rb b/lib/chef/run_lock.rb index 84b43afc19..1e779a9bdb 100644 --- a/lib/chef/run_lock.rb +++ b/lib/chef/run_lock.rb @@ -15,15 +15,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/mixin/create_path" +require_relative "mixin/create_path" require "fcntl" if Chef::Platform.windows? - require "chef/win32/mutex" + require_relative "win32/mutex" end -require "chef/config" -require "chef/exceptions" +require_relative "config" +require_relative "exceptions" require "timeout" -require "chef/dist" +require_relative "dist" class Chef diff --git a/lib/chef/runner.rb b/lib/chef/runner.rb index d5dab75dfd..f3f4c9e9d9 100644 --- a/lib/chef/runner.rb +++ b/lib/chef/runner.rb @@ -18,10 +18,10 @@ # limitations under the License. # -require "chef/exceptions" -require "chef/mixin/params_validate" -require "chef/node" -require "chef/resource_collection" +require_relative "exceptions" +require_relative "mixin/params_validate" +require_relative "node" +require_relative "resource_collection" class Chef # == Chef::Runner diff --git a/lib/chef/search/query.rb b/lib/chef/search/query.rb index b7b15765bb..38a9f9406e 100644 --- a/lib/chef/search/query.rb +++ b/lib/chef/search/query.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/config" -require "chef/exceptions" -require "chef/server_api" +require_relative "../config" +require_relative "../exceptions" +require_relative "../server_api" require "uri" require "addressable/uri" diff --git a/lib/chef/server_api.rb b/lib/chef/server_api.rb index 62fe319b86..ef44ea1879 100644 --- a/lib/chef/server_api.rb +++ b/lib/chef/server_api.rb @@ -16,15 +16,15 @@ # limitations under the License. # -require "chef/http" -require "chef/http/authenticator" -require "chef/http/cookie_manager" -require "chef/http/decompressor" -require "chef/http/json_input" -require "chef/http/json_output" -require "chef/http/remote_request_id" -require "chef/http/validate_content_length" -require "chef/http/api_versions" +require_relative "http" +require_relative "http/authenticator" +require_relative "http/cookie_manager" +require_relative "http/decompressor" +require_relative "http/json_input" +require_relative "http/json_output" +require_relative "http/remote_request_id" +require_relative "http/validate_content_length" +require_relative "http/api_versions" class Chef class ServerAPI < Chef::HTTP @@ -80,4 +80,4 @@ class Chef end end -require "chef/config" +require_relative "config" diff --git a/lib/chef/shell.rb b/lib/chef/shell.rb index 01ab28c2b1..695b162e05 100644 --- a/lib/chef/shell.rb +++ b/lib/chef/shell.rb @@ -20,18 +20,18 @@ require "pp" require "etc" require "mixlib/cli" -require "chef" -require "chef/version" -require "chef/client" -require "chef/config" -require "chef/config_fetcher" -require "chef/dist" - -require "chef/shell/shell_session" -require "chef/workstation_config_loader" -require "chef/shell/ext" -require "chef/json_compat" -require "chef/util/path_helper" +require_relative "" +require_relative "version" +require_relative "client" +require_relative "config" +require_relative "config_fetcher" +require_relative "dist" + +require_relative "shell/shell_session" +require_relative "workstation_config_loader" +require_relative "shell/ext" +require_relative "json_compat" +require_relative "util/path_helper" # = Shell # Shell is Chef in an IRB session. Shell can interact with a Chef server via the diff --git a/lib/chef/shell/ext.rb b/lib/chef/shell/ext.rb index cb1fb9041b..b75be3e339 100644 --- a/lib/chef/shell/ext.rb +++ b/lib/chef/shell/ext.rb @@ -17,14 +17,14 @@ # require "tempfile" -require "chef/recipe" +require_relative "../recipe" require "fileutils" -require "chef/dsl/platform_introspection" -require "chef/version" -require "chef/shell/shell_session" -require "chef/shell/model_wrapper" -require "chef/server_api" -require "chef/json_compat" +require_relative "../dsl/platform_introspection" +require_relative "../version" +require_relative "shell_session" +require_relative "model_wrapper" +require_relative "../server_api" +require_relative "../json_compat" module Shell module Extensions diff --git a/lib/chef/shell/model_wrapper.rb b/lib/chef/shell/model_wrapper.rb index 4394caa395..c2c5f2cd09 100644 --- a/lib/chef/shell/model_wrapper.rb +++ b/lib/chef/shell/model_wrapper.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/mixin/convert_to_class_name" -require "chef/dsl/data_query" +require_relative "../mixin/convert_to_class_name" +require_relative "../dsl/data_query" module Shell class ModelWrapper diff --git a/lib/chef/shell/shell_session.rb b/lib/chef/shell/shell_session.rb index 789a022b56..10cd4c81aa 100644 --- a/lib/chef/shell/shell_session.rb +++ b/lib/chef/shell/shell_session.rb @@ -18,16 +18,16 @@ # limitations under the License. # -require "chef/recipe" -require "chef/run_context" -require "chef/config" -require "chef/client" -require "chef/cookbook/cookbook_collection" -require "chef/cookbook_loader" -require "chef/run_list/run_list_expansion" -require "chef/formatters/base" -require "chef/formatters/doc" -require "chef/formatters/minimal" +require_relative "../recipe" +require_relative "../run_context" +require_relative "../config" +require_relative "../client" +require_relative "../cookbook/cookbook_collection" +require_relative "../cookbook_loader" +require_relative "../run_list/run_list_expansion" +require_relative "../formatters/base" +require_relative "../formatters/doc" +require_relative "../formatters/minimal" module Shell class ShellSession diff --git a/lib/chef/user.rb b/lib/chef/user.rb index 9b2c5bc8f0..946ab49a83 100644 --- a/lib/chef/user.rb +++ b/lib/chef/user.rb @@ -15,13 +15,13 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require "chef/config" -require "chef/mixin/params_validate" -require "chef/mixin/from_file" -require "chef/mash" -require "chef/json_compat" -require "chef/search/query" -require "chef/server_api" +require_relative "config" +require_relative "mixin/params_validate" +require_relative "mixin/from_file" +require_relative "mash" +require_relative "json_compat" +require_relative "search/query" +require_relative "server_api" # TODO # DEPRECATION NOTE diff --git a/lib/chef/user_v1.rb b/lib/chef/user_v1.rb index 2f35ec8be0..a31f55279c 100644 --- a/lib/chef/user_v1.rb +++ b/lib/chef/user_v1.rb @@ -15,15 +15,15 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require "chef/config" -require "chef/mixin/params_validate" -require "chef/mixin/from_file" -require "chef/mash" -require "chef/json_compat" -require "chef/search/query" -require "chef/mixin/api_version_request_handling" -require "chef/exceptions" -require "chef/server_api" +require_relative "config" +require_relative "mixin/params_validate" +require_relative "mixin/from_file" +require_relative "mash" +require_relative "json_compat" +require_relative "search/query" +require_relative "mixin/api_version_request_handling" +require_relative "exceptions" +require_relative "server_api" # OSC 11 BACKWARDS COMPATIBILITY NOTE (remove after OSC 11 support ends) # 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 diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 109637f5a5..e6d016a5d4 100644 --- a/lib/chef/version.rb +++ b/lib/chef/version.rb @@ -19,7 +19,7 @@ # task instead. # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -require "chef/version_string" +require_relative "version_string" class Chef CHEF_ROOT = File.expand_path("../..", __FILE__) diff --git a/lib/chef/version/platform.rb b/lib/chef/version/platform.rb index 6d8f4192fe..83e2a4570a 100644 --- a/lib/chef/version/platform.rb +++ b/lib/chef/version/platform.rb @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "chef/version_class" +require_relative "../version_class" # NOTE: this is fairly badly broken for its purpose and should not be used # unless it gets fixed. diff --git a/lib/chef/version_constraint.rb b/lib/chef/version_constraint.rb index bce2a29887..ba0a3669ed 100644 --- a/lib/chef/version_constraint.rb +++ b/lib/chef/version_constraint.rb @@ -14,7 +14,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -require "chef/version_class" +require_relative "version_class" class Chef class VersionConstraint diff --git a/lib/chef/version_constraint/platform.rb b/lib/chef/version_constraint/platform.rb index e39da194c6..4bcdaa2d71 100644 --- a/lib/chef/version_constraint/platform.rb +++ b/lib/chef/version_constraint/platform.rb @@ -13,8 +13,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -require "chef/version_constraint" -require "chef/version/platform" +require_relative "" +require_relative "../version/platform" # NOTE: this is fairly badly broken for its purpose and should not be used # unless it gets fixed. see chef/version/platform. diff --git a/lib/chef/whitelist.rb b/lib/chef/whitelist.rb index c94ffcaed2..3f23aff240 100644 --- a/lib/chef/whitelist.rb +++ b/lib/chef/whitelist.rb @@ -1,5 +1,5 @@ -require "chef/exceptions" +require_relative "exceptions" class Chef class Whitelist diff --git a/lib/chef/win32/api.rb b/lib/chef/win32/api.rb index fccedd1d54..6bfa287249 100644 --- a/lib/chef/win32/api.rb +++ b/lib/chef/win32/api.rb @@ -18,8 +18,8 @@ # require "ffi" -require "chef/reserved_names" -require "chef/exceptions" +require_relative "../reserved_names" +require_relative "../exceptions" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/api/crypto.rb b/lib/chef/win32/api/crypto.rb index 0abb908622..a2d73b0381 100644 --- a/lib/chef/win32/api/crypto.rb +++ b/lib/chef/win32/api/crypto.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/win32/api" +require_relative "" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/api/error.rb b/lib/chef/win32/api/error.rb index e37468c609..a4ac7e4a13 100644 --- a/lib/chef/win32/api/error.rb +++ b/lib/chef/win32/api/error.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/win32/api" +require_relative "" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/api/file.rb b/lib/chef/win32/api/file.rb index a239671557..76153a01a5 100644 --- a/lib/chef/win32/api/file.rb +++ b/lib/chef/win32/api/file.rb @@ -17,10 +17,10 @@ # limitations under the License. # -require "chef/win32/api" -require "chef/win32/api/security" -require "chef/win32/api/system" -require "chef/win32/unicode" +require_relative "" +require_relative "security" +require_relative "system" +require_relative "../unicode" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/api/installer.rb b/lib/chef/win32/api/installer.rb index 46930b65fc..bb0215255a 100644 --- a/lib/chef/win32/api/installer.rb +++ b/lib/chef/win32/api/installer.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/exceptions" -require "chef/win32/api" -require "chef/win32/error" +require_relative "../../exceptions" +require_relative "" +require_relative "../error" require "pathname" class Chef diff --git a/lib/chef/win32/api/memory.rb b/lib/chef/win32/api/memory.rb index a00ac5fec8..4738ef4be6 100644 --- a/lib/chef/win32/api/memory.rb +++ b/lib/chef/win32/api/memory.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/win32/api" +require_relative "" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/api/net.rb b/lib/chef/win32/api/net.rb index 8c624866d4..f339a3f12d 100644 --- a/lib/chef/win32/api/net.rb +++ b/lib/chef/win32/api/net.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/win32/api" -require "chef/win32/unicode" +require_relative "" +require_relative "../unicode" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/api/process.rb b/lib/chef/win32/api/process.rb index 3568b7e76c..fc06d805d6 100644 --- a/lib/chef/win32/api/process.rb +++ b/lib/chef/win32/api/process.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/win32/api" +require_relative "" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/api/psapi.rb b/lib/chef/win32/api/psapi.rb index 9deb68d92e..13c83f0545 100644 --- a/lib/chef/win32/api/psapi.rb +++ b/lib/chef/win32/api/psapi.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/win32/api" +require_relative "" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/api/registry.rb b/lib/chef/win32/api/registry.rb index dec25118a3..d9ea074c49 100644 --- a/lib/chef/win32/api/registry.rb +++ b/lib/chef/win32/api/registry.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/win32/api" +require_relative "" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/api/security.rb b/lib/chef/win32/api/security.rb index 5c3dd69c3e..e35fbbf46d 100644 --- a/lib/chef/win32/api/security.rb +++ b/lib/chef/win32/api/security.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/win32/api" +require_relative "" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/api/synchronization.rb b/lib/chef/win32/api/synchronization.rb index 9b5d5c6ab9..5543f68b94 100644 --- a/lib/chef/win32/api/synchronization.rb +++ b/lib/chef/win32/api/synchronization.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/win32/api" +require_relative "" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/api/system.rb b/lib/chef/win32/api/system.rb index 732ed073e6..70a3d78e42 100644 --- a/lib/chef/win32/api/system.rb +++ b/lib/chef/win32/api/system.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/win32/api" +require_relative "" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/api/unicode.rb b/lib/chef/win32/api/unicode.rb index 21ddde2865..ae68671a6a 100644 --- a/lib/chef/win32/api/unicode.rb +++ b/lib/chef/win32/api/unicode.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/win32/api" +require_relative "" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/crypto.rb b/lib/chef/win32/crypto.rb index 9832f9e67e..d1a6d41d2f 100644 --- a/lib/chef/win32/crypto.rb +++ b/lib/chef/win32/crypto.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/win32/error" -require "chef/win32/api/memory" -require "chef/win32/api/crypto" -require "chef/win32/unicode" +require_relative "error" +require_relative "api/memory" +require_relative "api/crypto" +require_relative "unicode" require "digest" class Chef diff --git a/lib/chef/win32/error.rb b/lib/chef/win32/error.rb index 83d4583f1d..aa2ae94273 100644 --- a/lib/chef/win32/error.rb +++ b/lib/chef/win32/error.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/win32/api/error" -require "chef/win32/memory" -require "chef/win32/unicode" -require "chef/exceptions" +require_relative "api/error" +require_relative "memory" +require_relative "unicode" +require_relative "../exceptions" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/file.rb b/lib/chef/win32/file.rb index 422cc194dc..101680fc90 100644 --- a/lib/chef/win32/file.rb +++ b/lib/chef/win32/file.rb @@ -17,12 +17,12 @@ # limitations under the License. # -require "chef/mixin/wide_string" -require "chef/win32/api/file" -require "chef/win32/api/security" -require "chef/win32/error" -require "chef/win32/unicode" -require "chef/win32/version" +require_relative "../mixin/wide_string" +require_relative "api/file" +require_relative "api/security" +require_relative "error" +require_relative "unicode" +require_relative "version" class Chef module ReservedNames::Win32 @@ -222,5 +222,5 @@ class Chef end end -require "chef/win32/file/info" -require "chef/win32/file/version_info" +require_relative "file/info" +require_relative "file/version_info" diff --git a/lib/chef/win32/file/info.rb b/lib/chef/win32/file/info.rb index 55873f8a0b..0e49fcae39 100644 --- a/lib/chef/win32/file/info.rb +++ b/lib/chef/win32/file/info.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/win32/file" +require_relative "" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/file/version_info.rb b/lib/chef/win32/file/version_info.rb index fa04096cf1..81e6213a25 100644 --- a/lib/chef/win32/file/version_info.rb +++ b/lib/chef/win32/file/version_info.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/win32/file" +require_relative "" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/handle.rb b/lib/chef/win32/handle.rb index 3ebb6983c4..3f553969cc 100644 --- a/lib/chef/win32/handle.rb +++ b/lib/chef/win32/handle.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/win32/api/process" -require "chef/win32/api/psapi" -require "chef/win32/api/system" -require "chef/win32/error" +require_relative "api/process" +require_relative "api/psapi" +require_relative "api/system" +require_relative "error" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/memory.rb b/lib/chef/win32/memory.rb index 2a9d5d8eb5..853551f183 100644 --- a/lib/chef/win32/memory.rb +++ b/lib/chef/win32/memory.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/win32/error" -require "chef/win32/api/memory" +require_relative "error" +require_relative "api/memory" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/mutex.rb b/lib/chef/win32/mutex.rb index 2264479734..cee0743f71 100644 --- a/lib/chef/win32/mutex.rb +++ b/lib/chef/win32/mutex.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/win32/api/synchronization" -require "chef/win32/unicode" +require_relative "api/synchronization" +require_relative "unicode" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/net.rb b/lib/chef/win32/net.rb index 06d91e9823..b92b723e27 100644 --- a/lib/chef/win32/net.rb +++ b/lib/chef/win32/net.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/win32/api/net" -require "chef/win32/error" -require "chef/mixin/wide_string" +require_relative "api/net" +require_relative "error" +require_relative "../mixin/wide_string" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/process.rb b/lib/chef/win32/process.rb index 76e526340b..85f3faea64 100644 --- a/lib/chef/win32/process.rb +++ b/lib/chef/win32/process.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require "chef/win32/api/process" -require "chef/win32/api/psapi" -require "chef/win32/error" -require "chef/win32/handle" +require_relative "api/process" +require_relative "api/psapi" +require_relative "error" +require_relative "handle" require "ffi" class Chef diff --git a/lib/chef/win32/registry.rb b/lib/chef/win32/registry.rb index b1365fd61b..b1a2258975 100644 --- a/lib/chef/win32/registry.rb +++ b/lib/chef/win32/registry.rb @@ -16,13 +16,13 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require "chef/reserved_names" -require "chef/win32/api" -require "chef/mixin/wide_string" +require_relative "../reserved_names" +require_relative "api" +require_relative "../mixin/wide_string" if RUBY_PLATFORM =~ /mswin|mingw32|windows/ - require "chef/monkey_patches/win32/registry" - require "chef/win32/api/registry" + require_relative "../monkey_patches/win32/registry" + require_relative "api/registry" require "win32/registry" require "win32/api" end diff --git a/lib/chef/win32/security.rb b/lib/chef/win32/security.rb index 879aba7f2b..0d2a2ee470 100644 --- a/lib/chef/win32/security.rb +++ b/lib/chef/win32/security.rb @@ -16,13 +16,13 @@ # limitations under the License. # -require "chef/win32/api/security" -require "chef/win32/error" -require "chef/win32/memory" -require "chef/win32/process" -require "chef/win32/unicode" -require "chef/win32/security/token" -require "chef/mixin/wide_string" +require_relative "api/security" +require_relative "error" +require_relative "memory" +require_relative "process" +require_relative "unicode" +require_relative "security/token" +require_relative "../mixin/wide_string" class Chef module ReservedNames::Win32 @@ -691,8 +691,8 @@ class Chef end end -require "chef/win32/security/ace" -require "chef/win32/security/acl" -require "chef/win32/security/securable_object" -require "chef/win32/security/security_descriptor" -require "chef/win32/security/sid" +require_relative "security/ace" +require_relative "security/acl" +require_relative "security/securable_object" +require_relative "security/security_descriptor" +require_relative "security/sid" diff --git a/lib/chef/win32/security/ace.rb b/lib/chef/win32/security/ace.rb index d593513983..6ba7190520 100644 --- a/lib/chef/win32/security/ace.rb +++ b/lib/chef/win32/security/ace.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/win32/security" -require "chef/win32/security/sid" -require "chef/win32/memory" +require_relative "" +require_relative "sid" +require_relative "../memory" require "ffi" diff --git a/lib/chef/win32/security/acl.rb b/lib/chef/win32/security/acl.rb index 0d9f7decd0..929ff09464 100644 --- a/lib/chef/win32/security/acl.rb +++ b/lib/chef/win32/security/acl.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/win32/security" -require "chef/win32/security/ace" +require_relative "" +require_relative "ace" require "ffi" class Chef diff --git a/lib/chef/win32/security/securable_object.rb b/lib/chef/win32/security/securable_object.rb index f0bbfc7354..02a65f43ce 100644 --- a/lib/chef/win32/security/securable_object.rb +++ b/lib/chef/win32/security/securable_object.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/win32/security" -require "chef/win32/security/acl" -require "chef/win32/security/sid" +require_relative "" +require_relative "acl" +require_relative "sid" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/security/security_descriptor.rb b/lib/chef/win32/security/security_descriptor.rb index 8bfd8b8287..a18b4820de 100644 --- a/lib/chef/win32/security/security_descriptor.rb +++ b/lib/chef/win32/security/security_descriptor.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/win32/security" -require "chef/win32/security/acl" -require "chef/win32/security/sid" +require_relative "" +require_relative "acl" +require_relative "sid" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/security/sid.rb b/lib/chef/win32/security/sid.rb index 43efc6e3fe..8cd3b65092 100644 --- a/lib/chef/win32/security/sid.rb +++ b/lib/chef/win32/security/sid.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/win32/security" -require "chef/win32/api/net" -require "chef/win32/api/error" +require_relative "" +require_relative "../api/net" +require_relative "../api/error" require "wmi-lite/wmi" diff --git a/lib/chef/win32/security/token.rb b/lib/chef/win32/security/token.rb index 38ef03b33c..44790458e1 100644 --- a/lib/chef/win32/security/token.rb +++ b/lib/chef/win32/security/token.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef/win32/security" -require "chef/win32/api/security" -require "chef/win32/unicode" +require_relative "" +require_relative "../api/security" +require_relative "../unicode" require "ffi" class Chef diff --git a/lib/chef/win32/system.rb b/lib/chef/win32/system.rb index ec2e5d3457..63616fa397 100755..100644 --- a/lib/chef/win32/system.rb +++ b/lib/chef/win32/system.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/win32/api/system" -require "chef/win32/error" +require_relative "api/system" +require_relative "error" require "ffi" class Chef diff --git a/lib/chef/win32/unicode.rb b/lib/chef/win32/unicode.rb index 033569f731..64406d656c 100644 --- a/lib/chef/win32/unicode.rb +++ b/lib/chef/win32/unicode.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/mixin/wide_string" -require "chef/win32/api/unicode" +require_relative "../mixin/wide_string" +require_relative "api/unicode" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/version.rb b/lib/chef/win32/version.rb index 07f2b8d7a8..93e09d3c83 100644 --- a/lib/chef/win32/version.rb +++ b/lib/chef/win32/version.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/win32/api" -require "chef/win32/api/system" +require_relative "api" +require_relative "api/system" require "wmi-lite/wmi" class Chef |