diff options
author | Lance Albertson <lance@osuosl.org> | 2020-08-31 12:09:27 -0700 |
---|---|---|
committer | Lance Albertson <lance@osuosl.org> | 2020-09-15 14:04:36 -0700 |
commit | 9ade086b6e0f64ae0610e3ecd2fb1d99b6d91962 (patch) | |
tree | 7490629f78f60e3f4af0950f1fc3d435fad8a0e5 | |
parent | 00595f5e2c5069716fe42f386ea377e56bda56ce (diff) | |
download | chef-9ade086b6e0f64ae0610e3ecd2fb1d99b6d91962.tar.gz |
Workaround rubygems slow requires by only running require for chef-utils/dist
Signed-off-by: Lance Albertson <lance@osuosl.org>
77 files changed, 77 insertions, 77 deletions
diff --git a/chef-bin/bin/chef-service-manager b/chef-bin/bin/chef-service-manager index c7b1177447..dcaae80141 100755 --- a/chef-bin/bin/chef-service-manager +++ b/chef-bin/bin/chef-service-manager @@ -21,7 +21,7 @@ $:.unshift(File.join(__dir__, "..", "lib")) require "chef" require "chef/application/windows_service_manager" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) if Chef::Platform.windows? chef_client_service = { diff --git a/chef-config/lib/chef-config/mixin/credentials.rb b/chef-config/lib/chef-config/mixin/credentials.rb index 7a96bf059e..e480a3bbc9 100644 --- a/chef-config/lib/chef-config/mixin/credentials.rb +++ b/chef-config/lib/chef-config/mixin/credentials.rb @@ -17,7 +17,7 @@ autoload :Tomlrb, "tomlrb" require_relative "../path_helper" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) module ChefConfig module Mixin diff --git a/lib/chef/application/apply.rb b/lib/chef/application/apply.rb index 2c36adc191..3559f8e416 100644 --- a/lib/chef/application/apply.rb +++ b/lib/chef/application/apply.rb @@ -27,7 +27,7 @@ require "fileutils" unless defined?(FileUtils) require "tempfile" unless defined?(Tempfile) require_relative "../providers" require_relative "../resources" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) require "license_acceptance/cli_flags/mixlib_cli" class Chef::Application::Apply < Chef::Application diff --git a/lib/chef/application/base.rb b/lib/chef/application/base.rb index e79f68345f..56e28baa79 100644 --- a/lib/chef/application/base.rb +++ b/lib/chef/application/base.rb @@ -20,7 +20,7 @@ require_relative "../log" require_relative "../config" require_relative "../mixin/shell_out" require_relative "../config_fetcher" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) require_relative "../daemon" require "chef-config/mixin/dot_d" require "license_acceptance/cli_flags/mixlib_cli" diff --git a/lib/chef/application/exit_code.rb b/lib/chef/application/exit_code.rb index 817bbca2f7..26c181fa3d 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-utils/dist" + require "chef-utils/dist" unless defined?(ChefUtils::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 d4e3d179b2..fb79eb6d1a 100644 --- a/lib/chef/application/knife.rb +++ b/lib/chef/application/knife.rb @@ -22,7 +22,7 @@ require "ohai/config" module Net autoload :HTTP, File.expand_path("../monkey_patches/net_http", __dir__) end -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef::Application::Knife < Chef::Application diff --git a/lib/chef/application/windows_service.rb b/lib/chef/application/windows_service.rb index 70149ea082..8975556f75 100644 --- a/lib/chef/application/windows_service.rb +++ b/lib/chef/application/windows_service.rb @@ -29,7 +29,7 @@ require "socket" unless defined?(Socket) require "uri" unless defined?(URI) require "win32/daemon" require_relative "../mixin/shell_out" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Application diff --git a/lib/chef/application/windows_service_manager.rb b/lib/chef/application/windows_service_manager.rb index f630ed57d2..4f0de26411 100644 --- a/lib/chef/application/windows_service_manager.rb +++ b/lib/chef/application/windows_service_manager.rb @@ -21,7 +21,7 @@ if RUBY_PLATFORM.match?(/mswin|mingw32|windows/) end require_relative "../config" require "mixlib/cli" unless defined?(Mixlib::CLI) -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Application diff --git a/lib/chef/chef_fs/knife.rb b/lib/chef/chef_fs/knife.rb index d901fa27be..ba993beee4 100644 --- a/lib/chef/chef_fs/knife.rb +++ b/lib/chef/chef_fs/knife.rb @@ -18,7 +18,7 @@ require_relative "../knife" require "pathname" unless defined?(Pathname) -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef module ChefFS diff --git a/lib/chef/cookbook/synchronizer.rb b/lib/chef/cookbook/synchronizer.rb index e3ea9e5150..53e874d0e8 100644 --- a/lib/chef/cookbook/synchronizer.rb +++ b/lib/chef/cookbook/synchronizer.rb @@ -17,7 +17,7 @@ require_relative "../client" require_relative "../util/threaded_job_queue" require_relative "../server_api" require "singleton" unless defined?(Singleton) -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef diff --git a/lib/chef/cookbook_site_streaming_uploader.rb b/lib/chef/cookbook_site_streaming_uploader.rb index 66c866772d..9f2efd3d8a 100644 --- a/lib/chef/cookbook_site_streaming_uploader.rb +++ b/lib/chef/cookbook_site_streaming_uploader.rb @@ -28,7 +28,7 @@ module Mixlib autoload :SignedHeaderAuth, "mixlib/authentication/signedheaderauth" end end -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef # == Chef::CookbookSiteStreamingUploader diff --git a/lib/chef/data_collector.rb b/lib/chef/data_collector.rb index fc28ac9364..39e5196a10 100644 --- a/lib/chef/data_collector.rb +++ b/lib/chef/data_collector.rb @@ -26,7 +26,7 @@ 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 "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class DataCollector diff --git a/lib/chef/data_collector/config_validation.rb b/lib/chef/data_collector/config_validation.rb index 09cf6b8664..1cdc400f48 100644 --- a/lib/chef/data_collector/config_validation.rb +++ b/lib/chef/data_collector/config_validation.rb @@ -16,7 +16,7 @@ # require "uri" unless defined?(URI) -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class DataCollector diff --git a/lib/chef/deprecation/warnings.rb b/lib/chef/deprecation/warnings.rb index 4443d9869d..f83101ca3e 100644 --- a/lib/chef/deprecation/warnings.rb +++ b/lib/chef/deprecation/warnings.rb @@ -21,7 +21,7 @@ class Chef module Warnings require_relative "../version" - require "chef-utils/dist" + require "chef-utils/dist" unless defined?(ChefUtils::Dist) def add_deprecation_warnings_for(method_names) method_names.each do |name| diff --git a/lib/chef/environment.rb b/lib/chef/environment.rb index 0a66f71185..d6a2215423 100644 --- a/lib/chef/environment.rb +++ b/lib/chef/environment.rb @@ -25,7 +25,7 @@ require_relative "mixin/params_validate" require_relative "mixin/from_file" require_relative "version_constraint" require_relative "server_api" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Environment diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb index addeb4c97f..16134fe44b 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-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) require_relative "constants" class Chef diff --git a/lib/chef/formatters/doc.rb b/lib/chef/formatters/doc.rb index 7870924b09..c92c405387 100644 --- a/lib/chef/formatters/doc.rb +++ b/lib/chef/formatters/doc.rb @@ -1,6 +1,6 @@ require_relative "base" require_relative "../config" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) 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 654aeb67b0..ee4583c89b 100644 --- a/lib/chef/formatters/error_inspectors/api_error_formatting.rb +++ b/lib/chef/formatters/error_inspectors/api_error_formatting.rb @@ -17,7 +17,7 @@ # require_relative "../../http/authenticator" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) require "timeout" unless defined?(Timeout) class Chef 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 442bbbc322..7e904c9ee2 100644 --- a/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb +++ b/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb @@ -17,7 +17,7 @@ # require_relative "api_error_formatting" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::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 f7c8a90b67..4897ac6e1b 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-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef module Formatters 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 22eaabe2db..6e452c959b 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 @@ -18,7 +18,7 @@ # require_relative "api_error_formatting" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef module Formatters diff --git a/lib/chef/formatters/minimal.rb b/lib/chef/formatters/minimal.rb index 653dbade89..46855d5f14 100644 --- a/lib/chef/formatters/minimal.rb +++ b/lib/chef/formatters/minimal.rb @@ -1,5 +1,5 @@ require_relative "base" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef diff --git a/lib/chef/http/http_request.rb b/lib/chef/http/http_request.rb index 9904a1a8e3..e6952aed9e 100644 --- a/lib/chef/http/http_request.rb +++ b/lib/chef/http/http_request.rb @@ -25,7 +25,7 @@ autoload :CGI, "cgi" module Net autoload :HTTP, File.expand_path("../monkey_patches/net_http", __dir__) end -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) # To load faster, we only want ohai's version string. # However, in ohai before 0.6.0, the version is defined diff --git a/lib/chef/http/socketless_chef_zero_client.rb b/lib/chef/http/socketless_chef_zero_client.rb index 5c91d8742e..9664f6feed 100644 --- a/lib/chef/http/socketless_chef_zero_client.rb +++ b/lib/chef/http/socketless_chef_zero_client.rb @@ -44,7 +44,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. require "chef_zero/server" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) module Net autoload :HTTPResponse, File.expand_path("../monkey_patches/net_http", __dir__) end diff --git a/lib/chef/knife.rb b/lib/chef/knife.rb index c3163a3e4c..ac7a68d0fc 100644 --- a/lib/chef/knife.rb +++ b/lib/chef/knife.rb @@ -21,6 +21,7 @@ require "forwardable" unless defined?(Forwardable) require_relative "version" require "mixlib/cli" unless defined?(Mixlib::CLI) require "chef-utils/dsl/default_paths" unless defined?(ChefUtils::DSL::DefaultPaths) +require "chef-utils/dist" unless defined?(ChefUtils::Dist) require_relative "workstation_config_loader" require_relative "mixin/convert_to_class_name" require_relative "mixin/default_paths" @@ -32,7 +33,6 @@ require_relative "http/authenticator" require_relative "http/http_request" require_relative "http" require "pp" unless defined?(PP) -require "chef-utils" class Chef class Knife diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb index e8d1636223..efd969210b 100644 --- a/lib/chef/knife/bootstrap.rb +++ b/lib/chef/knife/bootstrap.rb @@ -18,7 +18,7 @@ require_relative "../knife" require_relative "data_bag_secret_options" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) require "license_acceptance/cli_flags/mixlib_cli" module LicenseAcceptance autoload :Acceptor, "license_acceptance/acceptor" diff --git a/lib/chef/knife/client_create.rb b/lib/chef/knife/client_create.rb index 9cdc20045e..d6e0eab63b 100644 --- a/lib/chef/knife/client_create.rb +++ b/lib/chef/knife/client_create.rb @@ -17,7 +17,7 @@ # require_relative "../knife" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Knife diff --git a/lib/chef/knife/configure.rb b/lib/chef/knife/configure.rb index 44107661a4..2a27fd5d88 100644 --- a/lib/chef/knife/configure.rb +++ b/lib/chef/knife/configure.rb @@ -17,7 +17,7 @@ # require_relative "../knife" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Knife diff --git a/lib/chef/knife/core/bootstrap_context.rb b/lib/chef/knife/core/bootstrap_context.rb index 54e1cba5e7..9aa81da82f 100644 --- a/lib/chef/knife/core/bootstrap_context.rb +++ b/lib/chef/knife/core/bootstrap_context.rb @@ -19,7 +19,7 @@ require_relative "../../run_list" require_relative "../../util/path_helper" require "pathname" unless defined?(Pathname) -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Knife diff --git a/lib/chef/knife/core/windows_bootstrap_context.rb b/lib/chef/knife/core/windows_bootstrap_context.rb index 775eab05e2..ae8d3f37eb 100644 --- a/lib/chef/knife/core/windows_bootstrap_context.rb +++ b/lib/chef/knife/core/windows_bootstrap_context.rb @@ -18,7 +18,7 @@ require_relative "bootstrap_context" require_relative "../../util/path_helper" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Knife diff --git a/lib/chef/knife/exec.rb b/lib/chef/knife/exec.rb index 6a60355520..d3ce2cee24 100644 --- a/lib/chef/knife/exec.rb +++ b/lib/chef/knife/exec.rb @@ -17,7 +17,7 @@ # require_relative "../knife" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef::Knife::Exec < Chef::Knife diff --git a/lib/chef/knife/node_show.rb b/lib/chef/knife/node_show.rb index e58982b320..8ef06d8938 100644 --- a/lib/chef/knife/node_show.rb +++ b/lib/chef/knife/node_show.rb @@ -18,7 +18,7 @@ require_relative "../knife" require_relative "core/node_presenter" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Knife diff --git a/lib/chef/knife/serve.rb b/lib/chef/knife/serve.rb index c127e1ed16..d79e05aa85 100644 --- a/lib/chef/knife/serve.rb +++ b/lib/chef/knife/serve.rb @@ -16,7 +16,7 @@ require_relative "../knife" require_relative "../local_mode" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Knife diff --git a/lib/chef/knife/ssl_check.rb b/lib/chef/knife/ssl_check.rb index e447d3d2a8..0cc4141d42 100644 --- a/lib/chef/knife/ssl_check.rb +++ b/lib/chef/knife/ssl_check.rb @@ -17,7 +17,7 @@ # require_relative "../knife" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Knife diff --git a/lib/chef/knife/status.rb b/lib/chef/knife/status.rb index 9a86153d41..ea5dffdf6c 100644 --- a/lib/chef/knife/status.rb +++ b/lib/chef/knife/status.rb @@ -19,7 +19,7 @@ require_relative "../knife" require_relative "core/status_presenter" require_relative "core/node_presenter" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Knife diff --git a/lib/chef/knife/user_create.rb b/lib/chef/knife/user_create.rb index 07d847ec98..6d68f3ebbb 100644 --- a/lib/chef/knife/user_create.rb +++ b/lib/chef/knife/user_create.rb @@ -18,7 +18,7 @@ # require_relative "../knife" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Knife diff --git a/lib/chef/log/syslog.rb b/lib/chef/log/syslog.rb index e3abf46786..4e6a6dd0b5 100644 --- a/lib/chef/log/syslog.rb +++ b/lib/chef/log/syslog.rb @@ -19,7 +19,7 @@ require "logger" require "syslog-logger" require_relative "../mixin/unformatter" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Log diff --git a/lib/chef/log/winevt.rb b/lib/chef/log/winevt.rb index 42787f83ba..f060ecfde6 100644 --- a/lib/chef/log/winevt.rb +++ b/lib/chef/log/winevt.rb @@ -19,7 +19,7 @@ require_relative "../event_loggers/base" require_relative "../platform/query_helpers" require_relative "../mixin/unformatter" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Log diff --git a/lib/chef/node_map.rb b/lib/chef/node_map.rb index ae65d2fc66..c1d621a77e 100644 --- a/lib/chef/node_map.rb +++ b/lib/chef/node_map.rb @@ -36,7 +36,7 @@ # XXX: confusingly, in the *_priority_map the :klass may be an array of Strings of class names # -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class NodeMap diff --git a/lib/chef/policy_builder/policyfile.rb b/lib/chef/policy_builder/policyfile.rb index 5b23306b3d..bac015be42 100644 --- a/lib/chef/policy_builder/policyfile.rb +++ b/lib/chef/policy_builder/policyfile.rb @@ -24,7 +24,7 @@ require_relative "../run_context" require_relative "../config" require_relative "../node" require_relative "../server_api" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef module PolicyBuilder diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb index 0903157ad8..8aba495c4c 100644 --- a/lib/chef/provider/package/rubygems.rb +++ b/lib/chef/provider/package/rubygems.rb @@ -22,7 +22,7 @@ require_relative "../package" require_relative "../../resource/package" require_relative "../../mixin/get_source_from_package" require_relative "../../mixin/which" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) # Class methods on Gem are defined in rubygems autoload :Gem, "rubygems" diff --git a/lib/chef/provider/zypper_repository.rb b/lib/chef/provider/zypper_repository.rb index 1dd3f015be..53dae74948 100644 --- a/lib/chef/provider/zypper_repository.rb +++ b/lib/chef/provider/zypper_repository.rb @@ -20,7 +20,7 @@ require_relative "../resource" require_relative "../dsl/declare_resource" require_relative "noop" require "shellwords" unless defined?(Shellwords) -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Provider diff --git a/lib/chef/resource/breakpoint.rb b/lib/chef/resource/breakpoint.rb index 1792da07cf..596cb9f1b8 100644 --- a/lib/chef/resource/breakpoint.rb +++ b/lib/chef/resource/breakpoint.rb @@ -17,7 +17,7 @@ # require_relative "../resource" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/chef_client_scheduled_task.rb b/lib/chef/resource/chef_client_scheduled_task.rb index 9c9195ceb1..617d452b1d 100644 --- a/lib/chef/resource/chef_client_scheduled_task.rb +++ b/lib/chef/resource/chef_client_scheduled_task.rb @@ -15,7 +15,7 @@ # require_relative "../resource" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/chef_client_systemd_timer.rb b/lib/chef/resource/chef_client_systemd_timer.rb index e1deb5be12..2d194bebec 100644 --- a/lib/chef/resource/chef_client_systemd_timer.rb +++ b/lib/chef/resource/chef_client_systemd_timer.rb @@ -15,7 +15,7 @@ # require_relative "../resource" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/chef_gem.rb b/lib/chef/resource/chef_gem.rb index 80aa2e1859..81879cdeda 100644 --- a/lib/chef/resource/chef_gem.rb +++ b/lib/chef/resource/chef_gem.rb @@ -18,7 +18,7 @@ require_relative "package" require_relative "gem_package" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/chef_handler.rb b/lib/chef/resource/chef_handler.rb index eaf6218ae7..74f6c50b54 100644 --- a/lib/chef/resource/chef_handler.rb +++ b/lib/chef/resource/chef_handler.rb @@ -16,7 +16,7 @@ # require_relative "../resource" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/chef_sleep.rb b/lib/chef/resource/chef_sleep.rb index 87843aaaef..219fac83a3 100644 --- a/lib/chef/resource/chef_sleep.rb +++ b/lib/chef/resource/chef_sleep.rb @@ -15,7 +15,7 @@ # require_relative "../resource" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/cookbook_file.rb b/lib/chef/resource/cookbook_file.rb index 057bd3be6b..f1ae195426 100644 --- a/lib/chef/resource/cookbook_file.rb +++ b/lib/chef/resource/cookbook_file.rb @@ -21,7 +21,7 @@ require_relative "file" require_relative "../provider/cookbook_file" require_relative "../mixin/securable" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/dnf_package.rb b/lib/chef/resource/dnf_package.rb index d3d093e9bd..80727de7d0 100644 --- a/lib/chef/resource/dnf_package.rb +++ b/lib/chef/resource/dnf_package.rb @@ -18,7 +18,7 @@ require_relative "package" require_relative "../mixin/which" require_relative "../mixin/shell_out" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/dsc_script.rb b/lib/chef/resource/dsc_script.rb index b6b484ff53..42b12cac5a 100644 --- a/lib/chef/resource/dsc_script.rb +++ b/lib/chef/resource/dsc_script.rb @@ -19,7 +19,7 @@ require_relative "../resource" require_relative "../exceptions" require_relative "../dsl/powershell" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/execute.rb b/lib/chef/resource/execute.rb index a385b79123..93bf689dd9 100644 --- a/lib/chef/resource/execute.rb +++ b/lib/chef/resource/execute.rb @@ -18,7 +18,7 @@ # require_relative "../resource" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/gem_package.rb b/lib/chef/resource/gem_package.rb index 0fc469b5c9..c893e7a2f9 100644 --- a/lib/chef/resource/gem_package.rb +++ b/lib/chef/resource/gem_package.rb @@ -17,7 +17,7 @@ # require_relative "package" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/homebrew_package.rb b/lib/chef/resource/homebrew_package.rb index 99730647fe..3874622005 100644 --- a/lib/chef/resource/homebrew_package.rb +++ b/lib/chef/resource/homebrew_package.rb @@ -19,7 +19,7 @@ require_relative "../provider/package" require_relative "package" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/homebrew_update.rb b/lib/chef/resource/homebrew_update.rb index 5298104636..cc191cbbdb 100644 --- a/lib/chef/resource/homebrew_update.rb +++ b/lib/chef/resource/homebrew_update.rb @@ -19,7 +19,7 @@ # require_relative "../resource" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/hostname.rb b/lib/chef/resource/hostname.rb index a8044ec6ae..e959084fa5 100644 --- a/lib/chef/resource/hostname.rb +++ b/lib/chef/resource/hostname.rb @@ -16,7 +16,7 @@ # require_relative "../resource" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/locale.rb b/lib/chef/resource/locale.rb index 021947ffe7..5e4a63c06b 100644 --- a/lib/chef/resource/locale.rb +++ b/lib/chef/resource/locale.rb @@ -16,7 +16,7 @@ # require_relative "../resource" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/macos_userdefaults.rb b/lib/chef/resource/macos_userdefaults.rb index 7ac4b20a6d..a150aeb9ed 100644 --- a/lib/chef/resource/macos_userdefaults.rb +++ b/lib/chef/resource/macos_userdefaults.rb @@ -16,7 +16,7 @@ # require_relative "../resource" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) autoload :Plist, "plist" class Chef diff --git a/lib/chef/resource/ohai.rb b/lib/chef/resource/ohai.rb index 06f80b7611..02c91b8d8a 100644 --- a/lib/chef/resource/ohai.rb +++ b/lib/chef/resource/ohai.rb @@ -19,7 +19,7 @@ # require_relative "../resource" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) require "ohai" unless defined?(Ohai::System) class Chef diff --git a/lib/chef/resource/reboot.rb b/lib/chef/resource/reboot.rb index 418a12c183..6ac19e299b 100644 --- a/lib/chef/resource/reboot.rb +++ b/lib/chef/resource/reboot.rb @@ -17,7 +17,7 @@ # require_relative "../resource" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/remote_file.rb b/lib/chef/resource/remote_file.rb index 4ccf267143..ac0b2fe6a7 100644 --- a/lib/chef/resource/remote_file.rb +++ b/lib/chef/resource/remote_file.rb @@ -22,7 +22,7 @@ require_relative "file" require_relative "../provider/remote_file" require_relative "../mixin/securable" require_relative "../mixin/uris" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/rhsm_register.rb b/lib/chef/resource/rhsm_register.rb index e960e0a0f0..07c4dbc8d7 100644 --- a/lib/chef/resource/rhsm_register.rb +++ b/lib/chef/resource/rhsm_register.rb @@ -16,7 +16,7 @@ # require_relative "../resource" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) require "shellwords" unless defined?(Shellwords) class Chef diff --git a/lib/chef/resource/ruby_block.rb b/lib/chef/resource/ruby_block.rb index 0387e68c4b..427c3e25da 100644 --- a/lib/chef/resource/ruby_block.rb +++ b/lib/chef/resource/ruby_block.rb @@ -19,7 +19,7 @@ require_relative "../resource" require_relative "../provider/ruby_block" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/scm/subversion.rb b/lib/chef/resource/scm/subversion.rb index 396e4f5f84..f5637b04ad 100644 --- a/lib/chef/resource/scm/subversion.rb +++ b/lib/chef/resource/scm/subversion.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/service.rb b/lib/chef/resource/service.rb index d2e6c8c701..63674a3c93 100644 --- a/lib/chef/resource/service.rb +++ b/lib/chef/resource/service.rb @@ -20,7 +20,7 @@ require "chef-utils/dsl/service" unless defined?(ChefUtils::DSL::Service) require_relative "../resource" require "shellwords" unless defined?(Shellwords) -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) 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 ad34299aca..1db811978c 100644 --- a/lib/chef/resource/ssh_known_hosts_entry.rb +++ b/lib/chef/resource/ssh_known_hosts_entry.rb @@ -18,7 +18,7 @@ # limitations under the License. require_relative "../resource" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/systemd_unit.rb b/lib/chef/resource/systemd_unit.rb index 9287e39afc..c220c18450 100644 --- a/lib/chef/resource/systemd_unit.rb +++ b/lib/chef/resource/systemd_unit.rb @@ -17,7 +17,7 @@ # require_relative "../resource" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) require "iniparse" class Chef diff --git a/lib/chef/resource/template.rb b/lib/chef/resource/template.rb index 079bb8a8ca..88fde45a25 100644 --- a/lib/chef/resource/template.rb +++ b/lib/chef/resource/template.rb @@ -20,7 +20,7 @@ require_relative "file" require_relative "../mixin/securable" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/windows_ad_join.rb b/lib/chef/resource/windows_ad_join.rb index 616f7da2cd..6201b57379 100644 --- a/lib/chef/resource/windows_ad_join.rb +++ b/lib/chef/resource/windows_ad_join.rb @@ -16,7 +16,7 @@ # require_relative "../resource" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/windows_certificate.rb b/lib/chef/resource/windows_certificate.rb index 4a563e9bc4..62028c0c6e 100644 --- a/lib/chef/resource/windows_certificate.rb +++ b/lib/chef/resource/windows_certificate.rb @@ -23,7 +23,7 @@ module Win32 autoload :Certstore, "win32-certstore" if Chef::Platform.windows? end autoload :OpenSSL, "openssl" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/windows_package.rb b/lib/chef/resource/windows_package.rb index d7d89d1407..2e10dde43d 100644 --- a/lib/chef/resource/windows_package.rb +++ b/lib/chef/resource/windows_package.rb @@ -20,7 +20,7 @@ require_relative "../mixin/uris" require_relative "package" require_relative "../provider/package/windows" require_relative "../win32/error" if RUBY_PLATFORM.match?(/mswin|mingw|windows/) -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/windows_workgroup.rb b/lib/chef/resource/windows_workgroup.rb index 8bd972e176..aa2af646dc 100644 --- a/lib/chef/resource/windows_workgroup.rb +++ b/lib/chef/resource/windows_workgroup.rb @@ -16,7 +16,7 @@ # require_relative "../resource" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/resource/yum_package.rb b/lib/chef/resource/yum_package.rb index 6d06465c34..f7c4517c6d 100644 --- a/lib/chef/resource/yum_package.rb +++ b/lib/chef/resource/yum_package.rb @@ -17,7 +17,7 @@ # require_relative "package" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class Resource diff --git a/lib/chef/shell.rb b/lib/chef/shell.rb index b84065e44c..08016e97d5 100644 --- a/lib/chef/shell.rb +++ b/lib/chef/shell.rb @@ -24,7 +24,7 @@ require "singleton" unless defined?(Singleton) require "pp" unless defined?(PP) require "etc" unless defined?(Etc) require "mixlib/cli" unless defined?(Mixlib::CLI) -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) require_relative "../chef" require_relative "version" diff --git a/lib/chef/shell/ext.rb b/lib/chef/shell/ext.rb index 5f30491955..c840f90aae 100644 --- a/lib/chef/shell/ext.rb +++ b/lib/chef/shell/ext.rb @@ -25,7 +25,7 @@ require_relative "shell_session" require_relative "model_wrapper" require_relative "../server_api" require_relative "../json_compat" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) module Shell module Extensions diff --git a/lib/chef/shell/shell_session.rb b/lib/chef/shell/shell_session.rb index 7459be16b0..a17d8bbc84 100644 --- a/lib/chef/shell/shell_session.rb +++ b/lib/chef/shell/shell_session.rb @@ -28,7 +28,7 @@ require_relative "../run_list/run_list_expansion" require_relative "../formatters/base" require_relative "../formatters/doc" require_relative "../formatters/minimal" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) module Shell class ShellSession diff --git a/lib/chef/train_transport.rb b/lib/chef/train_transport.rb index fc9ad98fc3..f2ab69921c 100644 --- a/lib/chef/train_transport.rb +++ b/lib/chef/train_transport.rb @@ -17,7 +17,7 @@ require "chef-config/mixin/credentials" autoload :Train, "train" -require "chef-utils/dist" +require "chef-utils/dist" unless defined?(ChefUtils::Dist) class Chef class TrainTransport |