Chapter 09/circuit-oneops-1-master/components/cookbooks/artifact/providers/deploy.rb
# A wrapper that adds debug logging for running a recipe_eval on the
# numerous Proc attributes defined for this resource.
#
# @param name [Symbol] the name of the proc to execute
#
# @return [void]
A wrapper that adds debug logging for running a recipe_eval on the
numerous Proc attributes defined for this resource.
A wrapper that adds debug logging for running a recipe_eval on the numerous Proc attributes defined for this resource .
def run_proc(name)
    proc = new_resource.send(name)
    proc_name = name.to_s
    Chef::Log.info "artifact_deploy[run_proc::#{proc_name}] Determining whether to execute #{proc_name} proc."
    if proc
      Chef::Log.debug "artifact_deploy[run_proc::#{proc_name}] Beginning execution of #{proc_name} proc."
      recipe_eval(&proc)
      Chef::Log.debug "artifact_deploy[run_proc::#{proc_name}] Ending execution of #{proc_name} proc."
    else
      Chef::Log.info "artifact_deploy[run_proc::#{proc_name}] Skipping execution of #{proc_name} proc because it was not defined."
    end
  end
def run_proc ( name ) proc = new_resource . send ( name ) proc_name = name . to_s Chef :: Log . info "artifact_deploy[run_proc::#{proc_name}] Determining whether to execute #{proc_name} proc." if proc Chef :: Log . debug "artifact_deploy[run_proc::#{proc_name}] Beginning execution of #{proc_name} proc." recipe_eval ( & proc ) Chef :: Log . debug "artifact_deploy[run_proc::#{proc_name}] Ending execution of #{proc_name} proc." else Chef :: Log . info "artifact_deploy[run_proc::#{proc_name}] Skipping execution of #{proc_name} proc because it was not defined." end end
A wrapper that adds debug logging for running a recipe_eval on the
numerous Proc attributes defined for this resource.
A wrapper that adds debug logging for running a recipe_eval on the numerous Proc attributes defined for this resource .
None
void
name
the name of the proc to execute
the name of the proc to execute