diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-05-20 18:05:36 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-05-20 18:05:36 -0700 |
commit | 9dbdb769bfd963f82eb4bfea53c83501d0193766 (patch) | |
tree | daba4babc4ba8eb73bd765783dc8a53a7abff6be /lib/chef/provider/service | |
parent | 248344cfe776b66a8da563c985e34d9c99967791 (diff) | |
download | chef-lcg/require-idempotency.tar.gz |
This hits the ones that are most frequently required.lcg/require-idempotency
Stops the kernel from scanning through all the activated gems every time in order
to resolve names into pathnames.
See rubygems/rubygems#2762
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider/service')
-rw-r--r-- | lib/chef/provider/service/macosx.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/service/systemd.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/provider/service/macosx.rb b/lib/chef/provider/service/macosx.rb index 0e8a29ce32..746581df73 100644 --- a/lib/chef/provider/service/macosx.rb +++ b/lib/chef/provider/service/macosx.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "etc" -require "rexml/document" +require "etc" unless defined?(Etc) +require "rexml/document" unless defined?(REXML::Document) require_relative "../../resource/service" require_relative "../../resource/macosx_service" require_relative "simple" diff --git a/lib/chef/provider/service/systemd.rb b/lib/chef/provider/service/systemd.rb index e15eab23bd..4cb564e8c0 100644 --- a/lib/chef/provider/service/systemd.rb +++ b/lib/chef/provider/service/systemd.rb @@ -20,7 +20,7 @@ require_relative "../../resource/service" require_relative "simple" require_relative "../../mixin/which" -require "shellwords" +require "shellwords" unless defined?(Shellwords) class Chef::Provider::Service::Systemd < Chef::Provider::Service::Simple |