Sha256: 2f3b710c5996dfcf8f7ca499a850099e03789bcab2f90170cc1121f9ea94a392
Contents?: true
Size: 706 Bytes
Versions: 34
Compression:
Stored size: 706 Bytes
Contents
class Capistrano::Configuration ## # Print an informative message with asterisks. def inform(message) puts "#{'*' * (message.length + 4)}" puts "* #{message} *" puts "#{'*' * (message.length + 4)}" end ## # Read a file and evaluate it as an ERB template. # Path is relative to this file's directory. def render_erb_template(filename) template = File.read(filename) result = ERB.new(template).result(binding) end ## # Run a command and return the result as a string. # # TODO May not work properly on multiple servers. def run_and_return(cmd) output = [] run cmd do |ch, st, data| output << data end return output.to_s end end
Version data entries
34 entries across 34 versions & 2 rubygems