Overrides the do_job_work method of a normal Job Executes the command, the before_ and after_execution callbacks, and manages the results
# File vendor/plugins/ubiquo_jobs/lib/ubiquo_jobs/helpers/shell_job.rb, line 24
24: def do_job_work
25: before_execution if self.respond_to?(:before_execution)
26: output = %x{#{command}}
27: self.update_attribute :result_output, output
28: after_execution if self.respond_to?(:after_execution)
29: $?
30: end
Escapes a string to make it safe to use as a command line parameter Based on Ruby’s 1.8.7 Shellwords::shellescape method
# File vendor/plugins/ubiquo_jobs/lib/ubiquo_jobs/helpers/shell_job.rb, line 45
45: def escape_sh(param)
46: param.gsub(/([^A-Za-z0-9_\-.,:\/@\n])/n, "\\\\\\1")
47: end
Disabled; run with $DEBUG to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.