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

Version Path
factorylabs-fdlcap-0.2.0 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.2.1 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.2.2 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.2.3 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.2.4 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.2.5 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.2.6 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.2.7 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.3.0 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.3.1 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.3.10 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.3.11 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.3.15 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.3.16 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.3.17 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.3.18 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.3.19 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.3.2 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.3.20 lib/fdlcap/extensions/configuration.rb
factorylabs-fdlcap-0.3.21 lib/fdlcap/extensions/configuration.rb