summaryrefslogtreecommitdiff
path: root/lib/chef/mixin
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/mixin')
-rw-r--r--lib/chef/mixin/checksum.rb2
-rw-r--r--lib/chef/mixin/homebrew_user.rb2
-rw-r--r--lib/chef/mixin/shell_out.rb2
-rw-r--r--lib/chef/mixin/template.rb4
-rw-r--r--lib/chef/mixin/uris.rb4
5 files changed, 7 insertions, 7 deletions
diff --git a/lib/chef/mixin/checksum.rb b/lib/chef/mixin/checksum.rb
index 74607da04b..5394c5ea48 100644
--- a/lib/chef/mixin/checksum.rb
+++ b/lib/chef/mixin/checksum.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require "digest/sha2"
+require "digest/sha2" unless defined?(Digest::SHA2)
require_relative "../digester"
class Chef
diff --git a/lib/chef/mixin/homebrew_user.rb b/lib/chef/mixin/homebrew_user.rb
index 9e619c3c47..7703538ff7 100644
--- a/lib/chef/mixin/homebrew_user.rb
+++ b/lib/chef/mixin/homebrew_user.rb
@@ -23,7 +23,7 @@
# awkward to use modules elsewhere (e.g., chef/provider/package/homebrew/owner)
require_relative "shell_out"
-require "etc"
+require "etc" unless defined?(Etc)
class Chef
module Mixin
diff --git a/lib/chef/mixin/shell_out.rb b/lib/chef/mixin/shell_out.rb
index a7272c0bf3..f439323411 100644
--- a/lib/chef/mixin/shell_out.rb
+++ b/lib/chef/mixin/shell_out.rb
@@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-require "mixlib/shellout"
+require "mixlib/shellout" unless defined?(Mixlib::ShellOut)
require_relative "path_sanity"
class Chef
diff --git a/lib/chef/mixin/template.rb b/lib/chef/mixin/template.rb
index bb811aa758..e230044bae 100644
--- a/lib/chef/mixin/template.rb
+++ b/lib/chef/mixin/template.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require "tempfile"
-require "erubis"
+require "tempfile" unless defined?(Tempfile)
+require "erubis" unless defined?(Erubis)
class Chef
module Mixin
diff --git a/lib/chef/mixin/uris.rb b/lib/chef/mixin/uris.rb
index ea55eefd8f..53624ca41d 100644
--- a/lib/chef/mixin/uris.rb
+++ b/lib/chef/mixin/uris.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require "uri"
-require "addressable/uri"
+require "uri" unless defined?(URI)
+require "addressable/uri" unless defined?(Addressable::URI)
class Chef
module Mixin