summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-08-04 09:03:30 -0700
committerTim Smith <tsmith84@gmail.com>2020-08-04 10:40:21 -0700
commit10bc6366052a06c9445c40f2bbb4d84cd64499ae (patch)
treedc514e95fc582602c87abf885097cc58ccebaebc
parent69bd023b9617c5bdf0fcbaa5606bfd0a22b1db44 (diff)
downloadchef-10bc6366052a06c9445c40f2bbb4d84cd64499ae.tar.gz
Remove more requires that come for free
The universal DSL includes all this stuff. In resource we include the universal DSL, but we also include several of the things it includes. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/provider/zypper_repository.rb1
-rw-r--r--lib/chef/resource.rb4
-rw-r--r--lib/chef/resource/windows_share.rb2
-rw-r--r--lib/chef/resource/windows_workgroup.rb3
-rw-r--r--spec/functional/resource/dsc_script_spec.rb1
-rw-r--r--spec/functional/resource/windows_security_policy_spec.rb3
6 files changed, 0 insertions, 14 deletions
diff --git a/lib/chef/provider/zypper_repository.rb b/lib/chef/provider/zypper_repository.rb
index d2d4d68d76..6427a27746 100644
--- a/lib/chef/provider/zypper_repository.rb
+++ b/lib/chef/provider/zypper_repository.rb
@@ -19,7 +19,6 @@
require_relative "../resource"
require_relative "../dsl/declare_resource"
require_relative "noop"
-require_relative "../mixin/shell_out"
require "shellwords" unless defined?(Shellwords)
require_relative "../dist"
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb
index 2c9f53a3e2..735ef47b63 100644
--- a/lib/chef/resource.rb
+++ b/lib/chef/resource.rb
@@ -19,8 +19,6 @@
#
require_relative "exceptions"
-require_relative "dsl/data_query"
-require_relative "dsl/registry_helper"
require_relative "dsl/reboot_pending"
require_relative "dsl/resources"
require_relative "dsl/declare_resource"
@@ -53,8 +51,6 @@ class Chef
#
include Chef::DSL::DeclareResource
- include Chef::DSL::DataQuery
- include Chef::DSL::RegistryHelper
include Chef::DSL::RebootPending
extend Chef::Mixin::Provides
diff --git a/lib/chef/resource/windows_share.rb b/lib/chef/resource/windows_share.rb
index 5e88f20967..d5626110dd 100644
--- a/lib/chef/resource/windows_share.rb
+++ b/lib/chef/resource/windows_share.rb
@@ -117,8 +117,6 @@ class Chef
# Specifies which files and folders in the SMB share are visible to users. AccessBased: SMB does not the display the files and folders for a share to a user unless that user has rights to access the files and folders. By default, access-based enumeration is disabled for new SMB shares. Unrestricted: SMB displays files and folders to a user even when the user does not have permission to access the items.
# property :folder_enumeration_mode, String, equal_to: %(AccessBased Unrestricted)
- include Chef::Mixin::PowershellOut
-
load_current_value do |desired|
# this command selects individual objects because EncryptData & CachingMode have underlying
# types that get converted to their Integer values by ConvertTo-Json & we need to make sure
diff --git a/lib/chef/resource/windows_workgroup.rb b/lib/chef/resource/windows_workgroup.rb
index b77b0fc20a..6a64fbbb69 100644
--- a/lib/chef/resource/windows_workgroup.rb
+++ b/lib/chef/resource/windows_workgroup.rb
@@ -16,7 +16,6 @@
#
require_relative "../resource"
-require_relative "../mixin/powershell_out"
require_relative "../dist"
class Chef
@@ -24,8 +23,6 @@ class Chef
class WindowsWorkgroup < Chef::Resource
provides :windows_workgroup
- include Chef::Mixin::PowershellOut
-
description "Use the **windows_workgroup** resource to join or change the workgroup of a Windows host."
introduced "14.5"
examples <<~DOC
diff --git a/spec/functional/resource/dsc_script_spec.rb b/spec/functional/resource/dsc_script_spec.rb
index 85f21cdbbd..83544cee04 100644
--- a/spec/functional/resource/dsc_script_spec.rb
+++ b/spec/functional/resource/dsc_script_spec.rb
@@ -18,7 +18,6 @@
require "spec_helper"
require "chef/mixin/powershell_out"
-require "chef/mixin/shell_out"
require "chef/mixin/windows_architecture_helper"
require "support/shared/integration/integration_helper"
diff --git a/spec/functional/resource/windows_security_policy_spec.rb b/spec/functional/resource/windows_security_policy_spec.rb
index 1a6b697bfa..76764e01b0 100644
--- a/spec/functional/resource/windows_security_policy_spec.rb
+++ b/spec/functional/resource/windows_security_policy_spec.rb
@@ -17,11 +17,8 @@
#
require "spec_helper"
-require "chef/mixin/powershell_out"
describe Chef::Resource::WindowsSecurityPolicy, :windows_only do
- include Chef::Mixin::PowershellExec
-
let(:secoption) { "MaximumPasswordAge" }
let(:secvalue) { "30" }
let(:windows_test_run_context) do