Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grammar fixes in windows_task #6828

Merged
merged 3 commits into from Feb 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 13 additions & 13 deletions lib/chef/provider/windows_task.rb
Expand Up @@ -75,9 +75,9 @@ def resource_attributes

def action_create
if current_resource.exists
Chef::Log.debug "#{new_resource} task exists."
Chef::Log.debug "#{new_resource} task exists"
if !(task_need_update? || new_resource.force)
Chef::Log.info "#{new_resource} task doesn't need updating and force not specified - nothing to do"
Chef::Log.info "#{new_resource} task does not need updating and force is not specified - nothing to do"
return
end
# Setting the attributes of new_resource as current_resource.
Expand Down Expand Up @@ -128,34 +128,34 @@ def action_create

def action_run
if current_resource.exists
Chef::Log.debug "#{new_resource} task exists."
Chef::Log.debug "#{new_resource} task exists"
if current_resource.status == :running
Chef::Log.info "#{new_resource} task is currently running, skipping run."
Chef::Log.info "#{new_resource} task is currently running, skipping run"
else
converge_by("run scheduled task #{new_resource}") do
run_schtasks "RUN"
end
end
else
Chef::Log.warn "#{new_resource} task doesn't exists - nothing to do"
Chef::Log.warn "#{new_resource} task does not exist - nothing to do"
end
end

def action_delete
if current_resource.exists
Chef::Log.debug "#{new_resource} task exists."
Chef::Log.debug "#{new_resource} task exists"
converge_by("delete scheduled task #{new_resource}") do
# always need to force deletion
run_schtasks "DELETE", "F" => ""
end
else
Chef::Log.warn "#{new_resource} task doesn't exists - nothing to do"
Chef::Log.warn "#{new_resource} task does not exist - nothing to do"
end
end

def action_end
if current_resource.exists
Chef::Log.debug "#{new_resource} task exists."
Chef::Log.debug "#{new_resource} task exists"
if current_resource.status != :running
Chef::Log.debug "#{new_resource} is not running - nothing to do"
else
Expand All @@ -164,13 +164,13 @@ def action_end
end
end
else
Chef::Log.warn "#{new_resource} task doesn't exist - nothing to do"
Chef::Log.warn "#{new_resource} task does not exist - nothing to do"
end
end

def action_enable
if current_resource.exists
Chef::Log.debug "#{new_resource} task exists."
Chef::Log.debug "#{new_resource} task exists"
if current_resource.enabled
Chef::Log.debug "#{new_resource} already enabled - nothing to do"
else
Expand All @@ -179,14 +179,14 @@ def action_enable
end
end
else
Chef::Log.fatal "#{new_resource} task doesn't exist - nothing to do"
Chef::Log.fatal "#{new_resource} task does not exist - nothing to do"
raise Errno::ENOENT, "#{new_resource}: task does not exist, cannot enable"
end
end

def action_disable
if current_resource.exists
Chef::Log.info "#{new_resource} task exists."
Chef::Log.info "#{new_resource} task exists"
if current_resource.enabled
converge_by("#{new_resource} task disabled") do
run_schtasks "CHANGE", "DISABLE" => ""
Expand All @@ -195,7 +195,7 @@ def action_disable
Chef::Log.warn "#{new_resource} already disabled - nothing to do"
end
else
Chef::Log.warn "#{new_resource} task doesn't exist - nothing to do"
Chef::Log.warn "#{new_resource} task does not exist - nothing to do"
end
end

Expand Down