From 14606682433b0314eb054e60638aab72724fddce Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Mon, 20 Jan 2025 13:22:55 -0600 Subject: [PATCH] test4 Signed-off-by: Corey Hemminger --- libraries/helpers.rb | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/libraries/helpers.rb b/libraries/helpers.rb index f9a1167..cfaf2ff 100644 --- a/libraries/helpers.rb +++ b/libraries/helpers.rb @@ -19,22 +19,23 @@ # limitations under the License. # -class HomebrewUserWrapper - require 'chef/mixin/homebrew' - include Chef::Mixin::Homebrew - # require Chef::VERSION >= Chef::Version.new('18.6.2') ? 'chef/mixin/homebrew' : 'chef/mixin/homebrew_user' - # include Chef::VERSION >= Chef::Version.new('18.6.2') ? Chef::Mixin::Homebrew : Chef::Mixin::HomebrewUser - include Chef::Mixin::Which -end +# class HomebrewUserWrapper +# require 'chef/mixin/homebrew' +# include Chef::Mixin::Homebrew +# # require Chef::VERSION >= Chef::Version.new('18.6.2') ? 'chef/mixin/homebrew' : 'chef/mixin/homebrew_user' +# # include Chef::VERSION >= Chef::Version.new('18.6.2') ? Chef::Mixin::Homebrew : Chef::Mixin::HomebrewUser +# include Chef::Mixin::Which +# end module Homebrew - extend self + require 'chef/mixin/homebrew' + include Chef::Mixin::Homebrew require 'mixlib/shellout' include Chef::Mixin::ShellOut def self.included(base) - base.extend(Homebrew) + base.extend(HomebrewHelper) end def install_path @@ -70,6 +71,8 @@ def owner end end + extend self + private def calculate_owner @@ -93,8 +96,8 @@ def sudo_user def current_user ENV['USER'] end -end unless defined?(Homebrew) +end # unless defined?(Homebrew) -class HomebrewWrapper - include Homebrew -end +# class HomebrewWrapper +# include Homebrew +# end