diff options
author | sawanoboly <sawanoboriyu@higanworks.com> | 2014-08-04 15:03:02 +0900 |
---|---|---|
committer | sawanoboly <sawanoboriyu@higanworks.com> | 2014-08-04 15:03:02 +0900 |
commit | e717a8a050f1e7d0b8419b1a058b98f4f9ef294f (patch) | |
tree | 35169e6630451a0f74f2dc89d3a68df6bf5ed9b6 /lib/chef/provider | |
parent | e2d090be774b1c2e18c4864884588e29ec2bc3bb (diff) | |
parent | 930d12091511aa2d547366796ea49f4e26f18253 (diff) | |
download | chef-e717a8a050f1e7d0b8419b1a058b98f4f9ef294f.tar.gz |
Merge remote-tracking branch 'upstream/master' into use_shared_path_for_deploy_resource
Diffstat (limited to 'lib/chef/provider')
51 files changed, 5 insertions, 141 deletions
diff --git a/lib/chef/provider/cookbook_file.rb b/lib/chef/provider/cookbook_file.rb index 18af70d415..26d6ebf1d9 100644 --- a/lib/chef/provider/cookbook_file.rb +++ b/lib/chef/provider/cookbook_file.rb @@ -49,4 +49,3 @@ class Chef end end end - diff --git a/lib/chef/provider/deploy.rb b/lib/chef/provider/deploy.rb index 18f396f89e..541cc9e846 100644 --- a/lib/chef/provider/deploy.rb +++ b/lib/chef/provider/deploy.rb @@ -175,7 +175,6 @@ class Chef restart end - def callback(what, callback_code=nil) @collection = Chef::ResourceCollection.new case callback_code diff --git a/lib/chef/provider/execute.rb b/lib/chef/provider/execute.rb index 2907688e88..d469bea769 100644 --- a/lib/chef/provider/execute.rb +++ b/lib/chef/provider/execute.rb @@ -16,7 +16,6 @@ # limitations under the License. # -require 'chef/mixin/shell_out' require 'chef/log' require 'chef/provider' @@ -24,8 +23,6 @@ class Chef class Provider class Execute < Chef::Provider - include Chef::Mixin::ShellOut - def load_current_resource true end diff --git a/lib/chef/provider/file.rb b/lib/chef/provider/file.rb index 2dffcc6ddc..031d0fb005 100644 --- a/lib/chef/provider/file.rb +++ b/lib/chef/provider/file.rb @@ -25,7 +25,6 @@ require 'etc' require 'fileutils' require 'chef/scan_access_control' require 'chef/mixin/checksum' -require 'chef/mixin/shell_out' require 'chef/mixin/file_class' require 'chef/util/backup' require 'chef/util/diff' @@ -48,7 +47,6 @@ class Chef class File < Chef::Provider include Chef::Mixin::EnforceOwnershipAndPermissions include Chef::Mixin::Checksum - include Chef::Mixin::ShellOut include Chef::Util::Selinux include Chef::Mixin::FileClass @@ -247,7 +245,6 @@ class Chef "Assuming symlink source would be created by a previous resource" ] end - def content @content ||= begin load_current_resource if @current_resource.nil? diff --git a/lib/chef/provider/git.rb b/lib/chef/provider/git.rb index 3999edc16a..263014d229 100644 --- a/lib/chef/provider/git.rb +++ b/lib/chef/provider/git.rb @@ -16,19 +16,15 @@ # limitations under the License. # - require 'chef/exceptions' require 'chef/log' require 'chef/provider' -require 'chef/mixin/shell_out' require 'fileutils' class Chef class Provider class Git < Chef::Provider - include Chef::Mixin::ShellOut - def whyrun_supported? true end @@ -51,7 +47,6 @@ class Chef "Cannot clone #{@new_resource} to #{@new_resource.destination}, the enclosing directory #{dirname} does not exist") end - requirements.assert(:all_actions) do |a| a.assertion { !(@new_resource.revision =~ /^origin\//) } a.failure_message Chef::Exceptions::InvalidRemoteGitReference, @@ -107,7 +102,6 @@ class Chef end end - def existing_git_clone? ::File.exist?(::File.join(@new_resource.destination, ".git")) end diff --git a/lib/chef/provider/group/gpasswd.rb b/lib/chef/provider/group/gpasswd.rb index a65a7ffd53..521affac11 100644 --- a/lib/chef/provider/group/gpasswd.rb +++ b/lib/chef/provider/group/gpasswd.rb @@ -17,15 +17,12 @@ # require 'chef/provider/group/groupadd' -require 'chef/mixin/shell_out' class Chef class Provider class Group class Gpasswd < Chef::Provider::Group::Groupadd - include Chef::Mixin::ShellOut - def load_current_resource super end diff --git a/lib/chef/provider/group/groupmod.rb b/lib/chef/provider/group/groupmod.rb index c8b6458db0..7ad762af8d 100644 --- a/lib/chef/provider/group/groupmod.rb +++ b/lib/chef/provider/group/groupmod.rb @@ -16,15 +16,11 @@ # limitations under the License. # -require 'chef/mixin/shell_out' - class Chef class Provider class Group class Groupmod < Chef::Provider::Group - include Chef::Mixin::ShellOut - def load_current_resource super [ "group", "user" ].each do |binary| diff --git a/lib/chef/provider/group/suse.rb b/lib/chef/provider/group/suse.rb index 14380f1705..7ac2831d02 100644 --- a/lib/chef/provider/group/suse.rb +++ b/lib/chef/provider/group/suse.rb @@ -17,15 +17,12 @@ # require 'chef/provider/group/groupadd' -require 'chef/mixin/shell_out' class Chef class Provider class Group class Suse < Chef::Provider::Group::Groupadd - include Chef::Mixin::ShellOut - def load_current_resource super end diff --git a/lib/chef/provider/group/usermod.rb b/lib/chef/provider/group/usermod.rb index e6f3fc9e0f..e9dcc38b43 100644 --- a/lib/chef/provider/group/usermod.rb +++ b/lib/chef/provider/group/usermod.rb @@ -17,15 +17,12 @@ # require 'chef/provider/group/groupadd' -require 'chef/mixin/shell_out' class Chef class Provider class Group class Usermod < Chef::Provider::Group::Groupadd - include Chef::Mixin::ShellOut - def load_current_resource super end diff --git a/lib/chef/provider/http_request.rb b/lib/chef/provider/http_request.rb index 2bbd20aa2c..ba54b10195 100644 --- a/lib/chef/provider/http_request.rb +++ b/lib/chef/provider/http_request.rb @@ -33,13 +33,13 @@ class Chef @http = Chef::HTTP::Simple.new(@new_resource.url) end - # Send a HEAD request to @new_resource.url, with ?message=@new_resource.message + # Send a HEAD request to @new_resource.url def action_head message = check_message(@new_resource.message) # CHEF-4762: we expect a nil return value from Chef::HTTP for a "200 Success" response # and false for a "304 Not Modified" response modified = @http.head( - "#{@new_resource.url}?message=#{message}", + "#{@new_resource.url}", @new_resource.headers ) Chef::Log.info("#{@new_resource} HEAD to #{@new_resource.url} successful") @@ -50,13 +50,13 @@ class Chef end end - # Send a GET request to @new_resource.url, with ?message=@new_resource.message + # Send a GET request to @new_resource.url def action_get converge_by("#{@new_resource} GET to #{@new_resource.url}") do message = check_message(@new_resource.message) body = @http.get( - "#{@new_resource.url}?message=#{message}", + "#{@new_resource.url}", @new_resource.headers ) Chef::Log.info("#{@new_resource} GET to #{@new_resource.url} successful") diff --git a/lib/chef/provider/link.rb b/lib/chef/provider/link.rb index c41fbcad95..d6602c2e03 100644 --- a/lib/chef/provider/link.rb +++ b/lib/chef/provider/link.rb @@ -18,7 +18,6 @@ require 'chef/config' require 'chef/log' -require 'chef/mixin/shell_out' require 'chef/mixin/file_class' require 'chef/resource/link' require 'chef/provider' @@ -29,7 +28,6 @@ class Chef class Link < Chef::Provider include Chef::Mixin::EnforceOwnershipAndPermissions - include Chef::Mixin::ShellOut include Chef::Mixin::FileClass def negative_complement(big) diff --git a/lib/chef/provider/log.rb b/lib/chef/provider/log.rb index e65f01e69a..0aee349705 100644 --- a/lib/chef/provider/log.rb +++ b/lib/chef/provider/log.rb @@ -25,9 +25,6 @@ class Chef # Chef log provider, allows logging to chef's logs from recipes class ChefLog < Chef::Provider - # ordered array of the log levels - @@levels = [ :debug, :info, :warn, :error, :fatal ] - # No concept of a 'current' resource for logs, this is a no-op # # === Return @@ -42,18 +39,7 @@ class Chef # true:: Always return true def action_write Chef::Log.send(@new_resource.level, @new_resource.message) - - # resolve the integers for the current log levels - global_level = Mixlib::Log::LEVELS.fetch(Chef::Log.level) - resource_level = Mixlib::Log::LEVELS.fetch(@new_resource.level) - - # If the resource level is greater than or the same os the global - # level, then it should have been written to the log. Mark the - # resource as updated. - if resource_level >= global_level - @new_resource.updated_by_last_action(true) - end - + @new_resource.updated_by_last_action(true) end end @@ -63,6 +49,3 @@ class Chef end end - - - diff --git a/lib/chef/provider/mdadm.rb b/lib/chef/provider/mdadm.rb index 51c9b8d3c6..d156e49d48 100644 --- a/lib/chef/provider/mdadm.rb +++ b/lib/chef/provider/mdadm.rb @@ -17,15 +17,12 @@ # require 'chef/log' -require 'chef/mixin/shell_out' require 'chef/provider' class Chef class Provider class Mdadm < Chef::Provider - include Chef::Mixin::ShellOut - def popen4 raise Exception, "deprecated" end diff --git a/lib/chef/provider/mount/mount.rb b/lib/chef/provider/mount/mount.rb index 22d61a9236..bb1b796290 100644 --- a/lib/chef/provider/mount/mount.rb +++ b/lib/chef/provider/mount/mount.rb @@ -18,13 +18,11 @@ require 'chef/provider/mount' require 'chef/log' -require 'chef/mixin/shell_out' class Chef class Provider class Mount class Mount < Chef::Provider::Mount - include Chef::Mixin::ShellOut def initialize(new_resource, run_context) super diff --git a/lib/chef/provider/mount/solaris.rb b/lib/chef/provider/mount/solaris.rb index 85158eb564..462fa32b71 100644 --- a/lib/chef/provider/mount/solaris.rb +++ b/lib/chef/provider/mount/solaris.rb @@ -20,14 +20,12 @@ require 'chef/provider/mount' require 'chef/log' -require 'chef/mixin/shell_out' require 'forwardable' class Chef class Provider class Mount class Solaris < Chef::Provider::Mount - include Chef::Mixin::ShellOut extend Forwardable VFSTAB = "/etc/vfstab".freeze diff --git a/lib/chef/provider/package.rb b/lib/chef/provider/package.rb index adae880b7f..a4a056dfec 100644 --- a/lib/chef/provider/package.rb +++ b/lib/chef/provider/package.rb @@ -198,7 +198,6 @@ class Chef Chef::Log.debug("#{@new_resource} fetching preseed file to #{cache_seed_to}") - if template_available?(@new_resource.response_file) Chef::Log.debug("#{@new_resource} fetching preseed file via Template") remote_file = Chef::Resource::Template.new(cache_seed_to, run_context) diff --git a/lib/chef/provider/package/apt.rb b/lib/chef/provider/package/apt.rb index 76d90a5a97..0d91d0d1f0 100644 --- a/lib/chef/provider/package/apt.rb +++ b/lib/chef/provider/package/apt.rb @@ -19,15 +19,12 @@ require 'chef/provider/package' require 'chef/mixin/command' require 'chef/resource/package' -require 'chef/mixin/shell_out' - class Chef class Provider class Package class Apt < Chef::Provider::Package - include Chef::Mixin::ShellOut attr_accessor :is_virtual_package def load_current_resource diff --git a/lib/chef/provider/package/easy_install.rb b/lib/chef/provider/package/easy_install.rb index 6c9dacc55d..2af8a72e61 100644 --- a/lib/chef/provider/package/easy_install.rb +++ b/lib/chef/provider/package/easy_install.rb @@ -18,17 +18,13 @@ require 'chef/provider/package' require 'chef/mixin/command' -require 'chef/mixin/shell_out' require 'chef/resource/package' -require 'chef/mixin/shell_out' class Chef class Provider class Package class EasyInstall < Chef::Provider::Package - include Chef::Mixin::ShellOut - def install_check(name) check = false diff --git a/lib/chef/provider/package/freebsd/base.rb b/lib/chef/provider/package/freebsd/base.rb index 24f79484f0..b0f05667ff 100644 --- a/lib/chef/provider/package/freebsd/base.rb +++ b/lib/chef/provider/package/freebsd/base.rb @@ -21,7 +21,6 @@ require 'chef/resource/package' require 'chef/provider/package' -require 'chef/mixin/shell_out' require 'chef/mixin/get_source_from_package' class Chef @@ -63,9 +62,7 @@ class Chef end end - class Base < Chef::Provider::Package - include Chef::Mixin::ShellOut include Chef::Mixin::GetSourceFromPackage def initialize(*args) diff --git a/lib/chef/provider/package/freebsd/pkgng.rb b/lib/chef/provider/package/freebsd/pkgng.rb index da531facc1..0741a4d95f 100644 --- a/lib/chef/provider/package/freebsd/pkgng.rb +++ b/lib/chef/provider/package/freebsd/pkgng.rb @@ -52,8 +52,6 @@ class Chef @new_resource.source ? file_candidate_version : repo_candidate_version end - - private def file_candidate_version diff --git a/lib/chef/provider/package/freebsd/port.rb b/lib/chef/provider/package/freebsd/port.rb index 6f4471a6f7..4b3510f0e9 100644 --- a/lib/chef/provider/package/freebsd/port.rb +++ b/lib/chef/provider/package/freebsd/port.rb @@ -54,8 +54,6 @@ class Chef super(@new_resource.package_name) end - - private def supports_pkgng? diff --git a/lib/chef/provider/package/ips.rb b/lib/chef/provider/package/ips.rb index 2c6d98d81a..fed3e34124 100644 --- a/lib/chef/provider/package/ips.rb +++ b/lib/chef/provider/package/ips.rb @@ -21,14 +21,12 @@ require 'open3' require 'chef/provider/package' require 'chef/mixin/command' require 'chef/resource/package' -require 'chef/mixin/shell_out' class Chef class Provider class Package class Ips < Chef::Provider::Package - include Chef::Mixin::ShellOut attr_accessor :virtual def define_resource_requirements @@ -98,4 +96,3 @@ class Chef end end end - diff --git a/lib/chef/provider/package/paludis.rb b/lib/chef/provider/package/paludis.rb index e304cd3b8e..f40962d74d 100644 --- a/lib/chef/provider/package/paludis.rb +++ b/lib/chef/provider/package/paludis.rb @@ -18,15 +18,12 @@ require 'chef/provider/package' require 'chef/resource/package' -require 'chef/mixin/shell_out' class Chef class Provider class Package class Paludis < Chef::Provider::Package - include Chef::Mixin::ShellOut - def load_current_resource @current_resource = Chef::Resource::Package.new(@new_resource.package_name) @current_resource.package_name(@new_resource.package_name) @@ -87,5 +84,3 @@ class Chef end end end - - diff --git a/lib/chef/provider/package/portage.rb b/lib/chef/provider/package/portage.rb index ea8e37e5d4..6a3587558a 100644 --- a/lib/chef/provider/package/portage.rb +++ b/lib/chef/provider/package/portage.rb @@ -55,7 +55,6 @@ class Chef @current_resource end - def parse_emerge(package, txt) availables = {} found_package_name = nil @@ -103,7 +102,6 @@ class Chef end - def install_package(name, version) pkg = "=#{name}-#{version}" diff --git a/lib/chef/provider/package/rpm.rb b/lib/chef/provider/package/rpm.rb index 74baddb062..9cfd6bb010 100644 --- a/lib/chef/provider/package/rpm.rb +++ b/lib/chef/provider/package/rpm.rb @@ -85,7 +85,6 @@ class Chef end end - @current_resource end @@ -119,4 +118,3 @@ class Chef end end end - diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb index b423c199a0..be0022f4aa 100644 --- a/lib/chef/provider/package/rubygems.rb +++ b/lib/chef/provider/package/rubygems.rb @@ -352,8 +352,6 @@ class Chef end - include Chef::Mixin::ShellOut - attr_reader :gem_env attr_reader :cleanup_gem_env diff --git a/lib/chef/provider/package/smartos.rb b/lib/chef/provider/package/smartos.rb index 28d56ddc2c..19a6b9efef 100644 --- a/lib/chef/provider/package/smartos.rb +++ b/lib/chef/provider/package/smartos.rb @@ -20,7 +20,6 @@ # require 'chef/provider/package' -require 'chef/mixin/shell_out' require 'chef/resource/package' require 'chef/mixin/get_source_from_package' @@ -28,10 +27,8 @@ class Chef class Provider class Package class SmartOS < Chef::Provider::Package - include Chef::Mixin::ShellOut attr_accessor :is_virtual_package - def load_current_resource Chef::Log.debug("#{@new_resource} loading current resource") @current_resource = Chef::Resource::Package.new(@new_resource.name) diff --git a/lib/chef/provider/package/windows/msi.rb b/lib/chef/provider/package/windows/msi.rb index a342600678..cc07909d8e 100644 --- a/lib/chef/provider/package/windows/msi.rb +++ b/lib/chef/provider/package/windows/msi.rb @@ -18,7 +18,6 @@ # TODO: Allow @new_resource.source to be a Product Code as a GUID for uninstall / network install -require 'chef/mixin/shell_out' require 'chef/win32/api/installer' if RUBY_PLATFORM =~ /mswin|mingw32|windows/ class Chef @@ -27,7 +26,6 @@ class Chef class Windows class MSI include Chef::ReservedNames::Win32::API::Installer if RUBY_PLATFORM =~ /mswin|mingw32|windows/ - include Chef::Mixin::ShellOut def initialize(resource) @new_resource = resource diff --git a/lib/chef/provider/package/yum.rb b/lib/chef/provider/package/yum.rb index c241c7fd6d..d15f22ae16 100644 --- a/lib/chef/provider/package/yum.rb +++ b/lib/chef/provider/package/yum.rb @@ -19,12 +19,10 @@ require 'chef/config' require 'chef/provider/package' require 'chef/mixin/command' -require 'chef/mixin/shell_out' require 'chef/resource/package' require 'singleton' require 'chef/mixin/get_source_from_package' - class Chef class Provider class Package @@ -647,7 +645,6 @@ class Chef # Cache for our installed and available packages, pulled in from yum-dump.py class YumCache include Chef::Mixin::Command - include Chef::Mixin::ShellOut include Singleton def initialize @@ -949,7 +946,6 @@ class Chef end # YumCache include Chef::Mixin::GetSourceFromPackage - include Chef::Mixin::ShellOut def initialize(new_resource, run_context) super diff --git a/lib/chef/provider/package/zypper.rb b/lib/chef/provider/package/zypper.rb index b288d5d954..2639f18deb 100644 --- a/lib/chef/provider/package/zypper.rb +++ b/lib/chef/provider/package/zypper.rb @@ -22,7 +22,6 @@ require 'chef/provider/package' require 'chef/mixin/command' require 'chef/resource/package' -require 'chef/mixin/shell_out' require 'singleton' class Chef @@ -30,8 +29,6 @@ class Chef class Package class Zypper < Chef::Provider::Package - include Chef::Mixin::ShellOut - def load_current_resource @current_resource = Chef::Resource::Package.new(@new_resource.name) @current_resource.package_name(@new_resource.package_name) diff --git a/lib/chef/provider/registry_key.rb b/lib/chef/provider/registry_key.rb index 3b5be93ba1..01ee57895e 100644 --- a/lib/chef/provider/registry_key.rb +++ b/lib/chef/provider/registry_key.rb @@ -25,7 +25,6 @@ require 'chef/provider' require 'etc' require 'fileutils' require 'chef/scan_access_control' -require 'chef/mixin/shell_out' require 'chef/win32/registry' class Chef @@ -33,7 +32,6 @@ class Chef class Provider class RegistryKey < Chef::Provider include Chef::Mixin::Checksum - include Chef::Mixin::ShellOut def whyrun_supported? true diff --git a/lib/chef/provider/remote_directory.rb b/lib/chef/provider/remote_directory.rb index 129c5208f0..77e2754b08 100644 --- a/lib/chef/provider/remote_directory.rb +++ b/lib/chef/provider/remote_directory.rb @@ -40,7 +40,6 @@ class Chef name !~ /(?:^|#{Regexp.escape(::File::SEPARATOR)})\.\.?$/ end) - files_to_transfer.each do |cookbook_file_relative_path| create_cookbook_file(cookbook_file_relative_path) # the file is removed from the purge list diff --git a/lib/chef/provider/remote_file.rb b/lib/chef/provider/remote_file.rb index ed99c0bb84..da2573dacb 100644 --- a/lib/chef/provider/remote_file.rb +++ b/lib/chef/provider/remote_file.rb @@ -50,4 +50,3 @@ class Chef end end end - diff --git a/lib/chef/provider/remote_file/cache_control_data.rb b/lib/chef/provider/remote_file/cache_control_data.rb index 0add74f50a..8331f3d31a 100644 --- a/lib/chef/provider/remote_file/cache_control_data.rb +++ b/lib/chef/provider/remote_file/cache_control_data.rb @@ -161,5 +161,3 @@ class Chef end end end - - diff --git a/lib/chef/provider/remote_file/fetcher.rb b/lib/chef/provider/remote_file/fetcher.rb index c3a098ed35..249b29186f 100644 --- a/lib/chef/provider/remote_file/fetcher.rb +++ b/lib/chef/provider/remote_file/fetcher.rb @@ -17,7 +17,6 @@ # limitations under the License. # - class Chef class Provider class RemoteFile @@ -40,4 +39,3 @@ class Chef end end end - diff --git a/lib/chef/provider/remote_file/ftp.rb b/lib/chef/provider/remote_file/ftp.rb index 7f3fdbf383..3f78286aa3 100644 --- a/lib/chef/provider/remote_file/ftp.rb +++ b/lib/chef/provider/remote_file/ftp.rb @@ -81,7 +81,6 @@ class Chef @filename end - def fetch with_connection do get diff --git a/lib/chef/provider/resource_update.rb b/lib/chef/provider/resource_update.rb index 54f25738ed..e069a8201c 100644 --- a/lib/chef/provider/resource_update.rb +++ b/lib/chef/provider/resource_update.rb @@ -50,6 +50,3 @@ class Chef end end end - - - diff --git a/lib/chef/provider/service/freebsd.rb b/lib/chef/provider/service/freebsd.rb index 7da29851c2..800cd4ec13 100644 --- a/lib/chef/provider/service/freebsd.rb +++ b/lib/chef/provider/service/freebsd.rb @@ -16,7 +16,6 @@ # limitations under the License. # -require 'chef/mixin/shell_out' require 'chef/resource/service' require 'chef/provider/service/init' require 'chef/mixin/command' @@ -26,8 +25,6 @@ class Chef class Service class Freebsd < Chef::Provider::Service::Init - include Chef::Mixin::ShellOut - def load_current_resource @current_resource = Chef::Resource::Service.new(@new_resource.name) @current_resource.service_name(@new_resource.service_name) diff --git a/lib/chef/provider/service/init.rb b/lib/chef/provider/service/init.rb index 64f4074d8b..cf5da852c3 100644 --- a/lib/chef/provider/service/init.rb +++ b/lib/chef/provider/service/init.rb @@ -16,7 +16,6 @@ # limitations under the License. # -require 'chef/mixin/shell_out' require 'chef/provider/service/simple' require 'chef/mixin/command' @@ -25,8 +24,6 @@ class Chef class Service class Init < Chef::Provider::Service::Simple - include Chef::Mixin::ShellOut - def initialize(new_resource, run_context) super @init_command = "/etc/init.d/#{@new_resource.service_name}" diff --git a/lib/chef/provider/service/macosx.rb b/lib/chef/provider/service/macosx.rb index 2642a7e204..36930ee4ac 100644 --- a/lib/chef/provider/service/macosx.rb +++ b/lib/chef/provider/service/macosx.rb @@ -24,7 +24,6 @@ class Chef class Provider class Service class Macosx < Chef::Provider::Service::Simple - include Chef::Mixin::ShellOut def self.gather_plist_dirs locations = %w{/Library/LaunchAgents diff --git a/lib/chef/provider/service/redhat.rb b/lib/chef/provider/service/redhat.rb index 5275bcac29..7a7b2a1c40 100644 --- a/lib/chef/provider/service/redhat.rb +++ b/lib/chef/provider/service/redhat.rb @@ -17,13 +17,11 @@ # require 'chef/provider/service/init' -require 'chef/mixin/shell_out' class Chef class Provider class Service class Redhat < Chef::Provider::Service::Init - include Chef::Mixin::ShellOut CHKCONFIG_ON = /\d:on/ CHKCONFIG_MISSING = /No such/ diff --git a/lib/chef/provider/service/simple.rb b/lib/chef/provider/service/simple.rb index 3b3e539d40..f03b8a18a1 100644 --- a/lib/chef/provider/service/simple.rb +++ b/lib/chef/provider/service/simple.rb @@ -16,7 +16,6 @@ # limitations under the License. # -require 'chef/mixin/shell_out' require 'chef/provider/service' require 'chef/resource/service' require 'chef/mixin/command' @@ -26,8 +25,6 @@ class Chef class Service class Simple < Chef::Provider::Service - include Chef::Mixin::ShellOut - def load_current_resource @current_resource = Chef::Resource::Service.new(@new_resource.name) @current_resource.service_name(@new_resource.service_name) diff --git a/lib/chef/provider/service/solaris.rb b/lib/chef/provider/service/solaris.rb index 69a79e6226..0c47a3462b 100644 --- a/lib/chef/provider/service/solaris.rb +++ b/lib/chef/provider/service/solaris.rb @@ -16,7 +16,6 @@ # limitations under the License. # -require 'chef/mixin/shell_out' require 'chef/provider/service' require 'chef/resource/service' require 'chef/mixin/command' @@ -25,7 +24,6 @@ class Chef class Provider class Service class Solaris < Chef::Provider::Service - include Chef::Mixin::ShellOut attr_reader :maintenance def initialize(new_resource, run_context=nil) @@ -35,7 +33,6 @@ class Chef @maintenace = false end - def load_current_resource @current_resource = Chef::Resource::Service.new(@new_resource.name) @current_resource.service_name(@new_resource.service_name) diff --git a/lib/chef/provider/service/systemd.rb b/lib/chef/provider/service/systemd.rb index ea43e658e4..6231603d03 100644 --- a/lib/chef/provider/service/systemd.rb +++ b/lib/chef/provider/service/systemd.rb @@ -18,7 +18,6 @@ require 'chef/resource/service' require 'chef/provider/service/simple' -require 'chef/mixin/shell_out' class Chef::Provider::Service::Systemd < Chef::Provider::Service::Simple def load_current_resource diff --git a/lib/chef/provider/service/windows.rb b/lib/chef/provider/service/windows.rb index 2cfa9d44c1..2d478fa9fe 100644 --- a/lib/chef/provider/service/windows.rb +++ b/lib/chef/provider/service/windows.rb @@ -18,7 +18,6 @@ # limitations under the License. # -require 'chef/mixin/shell_out' require 'chef/provider/service/simple' if RUBY_PLATFORM =~ /mswin|mingw32|windows/ require 'win32/service' @@ -26,8 +25,6 @@ end class Chef::Provider::Service::Windows < Chef::Provider::Service - include Chef::Mixin::ShellOut - #Win32::Service.get_start_type AUTO_START = 'auto start' DISABLED = 'disabled' diff --git a/lib/chef/provider/subversion.rb b/lib/chef/provider/subversion.rb index 6ceb3e592a..81ed639c53 100644 --- a/lib/chef/provider/subversion.rb +++ b/lib/chef/provider/subversion.rb @@ -16,7 +16,6 @@ # limitations under the License. # - #TODO subversion and git should both extend from a base SCM provider. require 'chef/log' @@ -199,7 +198,6 @@ class Chef ['svn', *args].compact.join(" ") end - def target_dir_non_existent_or_empty? !::File.exist?(@new_resource.destination) || Dir.entries(@new_resource.destination).sort == ['.','..'] end diff --git a/lib/chef/provider/template.rb b/lib/chef/provider/template.rb index 555f4f14f0..48cc45f3a8 100644 --- a/lib/chef/provider/template.rb +++ b/lib/chef/provider/template.rb @@ -22,7 +22,6 @@ require 'chef/provider/file' require 'chef/deprecation/provider/template' require 'chef/deprecation/warnings' - class Chef class Provider class Template < Chef::Provider::File @@ -63,4 +62,3 @@ class Chef end end end - diff --git a/lib/chef/provider/template/content.rb b/lib/chef/provider/template/content.rb index 472ea331a3..7fc680ec85 100644 --- a/lib/chef/provider/template/content.rb +++ b/lib/chef/provider/template/content.rb @@ -58,4 +58,3 @@ class Chef end end end - diff --git a/lib/chef/provider/user/dscl.rb b/lib/chef/provider/user/dscl.rb index b01931609e..96b5db24ba 100644 --- a/lib/chef/provider/user/dscl.rb +++ b/lib/chef/provider/user/dscl.rb @@ -16,7 +16,6 @@ # limitations under the License. # -require 'chef/mixin/shell_out' require 'chef/provider/user' require 'openssl' @@ -24,7 +23,6 @@ class Chef class Provider class User class Dscl < Chef::Provider::User - include Chef::Mixin::ShellOut NFS_HOME_DIRECTORY = %r{^NFSHomeDirectory: (.*)$} AUTHENTICATION_AUTHORITY = %r{^AuthenticationAuthority: (.*)$} diff --git a/lib/chef/provider/user/solaris.rb b/lib/chef/provider/user/solaris.rb index df491ac697..d480acaced 100644 --- a/lib/chef/provider/user/solaris.rb +++ b/lib/chef/provider/user/solaris.rb @@ -89,4 +89,3 @@ class Chef end end end - diff --git a/lib/chef/provider/user/useradd.rb b/lib/chef/provider/user/useradd.rb index 201bcbe542..cad9d58e7e 100644 --- a/lib/chef/provider/user/useradd.rb +++ b/lib/chef/provider/user/useradd.rb @@ -17,7 +17,6 @@ # require 'pathname' -require 'chef/mixin/shell_out' require 'chef/provider/user' class Chef @@ -25,8 +24,6 @@ class Chef class User class Useradd < Chef::Provider::User - include Chef::Mixin::ShellOut - UNIVERSAL_OPTIONS = [[:comment, "-c"], [:gid, "-g"], [:password, "-p"], [:shell, "-s"], [:uid, "-u"]] def create_user |