diff options
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/provider/package/windows/msi.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/package/windows/registry_uninstall_entry.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/service/windows.rb | 2 | ||||
-rw-r--r-- | lib/chef/resource/windows_font.rb | 4 | ||||
-rw-r--r-- | lib/chef/resource/windows_shortcut.rb | 2 | ||||
-rw-r--r-- | lib/chef/win32/registry.rb | 4 |
6 files changed, 9 insertions, 9 deletions
diff --git a/lib/chef/provider/package/windows/msi.rb b/lib/chef/provider/package/windows/msi.rb index 1ce8add80d..93e41f67fc 100644 --- a/lib/chef/provider/package/windows/msi.rb +++ b/lib/chef/provider/package/windows/msi.rb @@ -18,7 +18,7 @@ # TODO: Allow new_resource.source to be a Product Code as a GUID for uninstall / network install -require_relative "../../../win32/api/installer" if RUBY_PLATFORM.match?(/mswin|mingw32|windows/) +require_relative "../../../win32/api/installer" if RUBY_PLATFORM.match?(/mswin|mingw|windows/) require_relative "../../../mixin/shell_out" class Chef @@ -26,7 +26,7 @@ class Chef class Package class Windows class MSI - include Chef::ReservedNames::Win32::API::Installer if RUBY_PLATFORM.match?(/mswin|mingw32|windows/) + include Chef::ReservedNames::Win32::API::Installer if RUBY_PLATFORM.match?(/mswin|mingw|windows/) include Chef::Mixin::ShellOut def initialize(resource, uninstall_entries) diff --git a/lib/chef/provider/package/windows/registry_uninstall_entry.rb b/lib/chef/provider/package/windows/registry_uninstall_entry.rb index 6e7b825256..ca8bd89766 100644 --- a/lib/chef/provider/package/windows/registry_uninstall_entry.rb +++ b/lib/chef/provider/package/windows/registry_uninstall_entry.rb @@ -18,7 +18,7 @@ # module Win32 - autoload :Registry, File.expand_path("../../../monkey_patches/win32/registry", __dir__) if RUBY_PLATFORM.match?(/mswin|mingw32|windows/) + autoload :Registry, File.expand_path("../../../monkey_patches/win32/registry", __dir__) if RUBY_PLATFORM.match?(/mswin|mingw|windows/) end class Chef diff --git a/lib/chef/provider/service/windows.rb b/lib/chef/provider/service/windows.rb index 09b378e557..6d62d5a125 100644 --- a/lib/chef/provider/service/windows.rb +++ b/lib/chef/provider/service/windows.rb @@ -20,7 +20,7 @@ require_relative "simple" require_relative "../../win32_service_constants" -if RUBY_PLATFORM.match?(/mswin|mingw32|windows/) +if RUBY_PLATFORM.match?(/mswin|mingw|windows/) require_relative "../../win32/error" require "win32/service" end diff --git a/lib/chef/resource/windows_font.rb b/lib/chef/resource/windows_font.rb index 952f689fba..21ce0a2f7e 100644 --- a/lib/chef/resource/windows_font.rb +++ b/lib/chef/resource/windows_font.rb @@ -82,7 +82,7 @@ class Chef # install the font into the appropriate fonts directory def install_font - require "win32ole" if RUBY_PLATFORM.match?(/mswin|mingw32|windows/) + require "win32ole" if RUBY_PLATFORM.match?(/mswin|mingw|windows/) fonts_dir = Chef::Util::PathHelper.join(ENV["windir"], "fonts") folder = WIN32OLE.new("Shell.Application").Namespace(fonts_dir) converge_by("install font #{new_resource.font_name} to #{fonts_dir}") do @@ -94,7 +94,7 @@ class Chef # # @return [Boolean] Is the font is installed? def font_exists? - require "win32ole" if RUBY_PLATFORM.match?(/mswin|mingw32|windows/) + require "win32ole" if RUBY_PLATFORM.match?(/mswin|mingw|windows/) fonts_dir = WIN32OLE.new("WScript.Shell").SpecialFolders("Fonts") fonts_dir_local = Chef::Util::PathHelper.join(ENV["home"], "AppData/Local/Microsoft/Windows/fonts") logger.trace("Seeing if the font at #{Chef::Util::PathHelper.join(fonts_dir, new_resource.font_name)} exists") diff --git a/lib/chef/resource/windows_shortcut.rb b/lib/chef/resource/windows_shortcut.rb index 3bf52f61d5..37fc8eca2d 100644 --- a/lib/chef/resource/windows_shortcut.rb +++ b/lib/chef/resource/windows_shortcut.rb @@ -57,7 +57,7 @@ class Chef description: "Icon to use for the shortcut. Accepts the format of `path, index`, where index is the icon file to use. See Microsoft's [documentation](https://msdn.microsoft.com/en-us/library/3s9bx7at.aspx) for details" load_current_value do |new_resource| - require "win32ole" if RUBY_PLATFORM.match?(/mswin|mingw32|windows/) + require "win32ole" if RUBY_PLATFORM.match?(/mswin|mingw|windows/) link = WIN32OLE.new("WScript.Shell").CreateShortcut(new_resource.shortcut_name) name new_resource.shortcut_name diff --git a/lib/chef/win32/registry.rb b/lib/chef/win32/registry.rb index ec7783815d..cb7bbfc51c 100644 --- a/lib/chef/win32/registry.rb +++ b/lib/chef/win32/registry.rb @@ -20,7 +20,7 @@ require_relative "../reserved_names" require_relative "api" require_relative "../mixin/wide_string" -if RUBY_PLATFORM.match?(/mswin|mingw32|windows/) +if RUBY_PLATFORM.match?(/mswin|mingw|windows/) require "win32/api" module Win32 autoload :Registry, File.expand_path("../monkey_patches/win32/registry", __dir__) @@ -32,7 +32,7 @@ class Chef class Win32 class Registry - if RUBY_PLATFORM.match?(/mswin|mingw32|windows/) + if RUBY_PLATFORM.match?(/mswin|mingw|windows/) include Chef::ReservedNames::Win32::API::Registry extend Chef::ReservedNames::Win32::API::Registry end |