lib/capitate/plugins/script.rb in capitate-0.2.8 vs lib/capitate/plugins/script.rb in capitate-0.2.11
- old
+ new
@@ -72,20 +72,23 @@
run_via "rm -rf #{dest}" if clean
end
end
# Run all commands (separated by newlines).
+ #
+ # Uses run_via to execute, so will use <tt>run</tt> or <tt>sudo</tt>
+ # depending on the current <tt>:run_method</tt>
#
# ==== Options
# +cmds+:: Commands (separated by newlines)
# +options+:: See invoke_command options
#
def run_all(cmds, options = {}, &block)
cmds.split("\n").each do |cmd|
cmd = cmd.gsub(/^\s+/, "")
run_via(cmd, options, &block)
end
- end
+ end
end
Capistrano.plugin :script, Capitate::Plugins::Script
\ No newline at end of file