class Capistrano::Configuration

Public Instance Methods

_offroad_emit_warnings() click to toggle source
# File lib/capistrano-offroad/utils.rb, line 43
  def _offroad_emit_warnings()
    if @_offroad_util_warnings
      puts <<-"EOF"

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

                         #{@_offroad_util_warnings.length} WARNING(S) LOGGED
        READ VERY CAREFULLY, FOR I SHALL WRITE THIS ONLY ONCE
                        SCROLL UP FOR DETAILS

EOF
        @_offroad_util_warnings.each { |w| puts " - #{w}" }
        puts <<EOF

                         YOU HAVE BEEN WARNED
EOF
    end
  end
delayed_warning(short, long=nil) click to toggle source
# File lib/capistrano-offroad/utils.rb, line 27
  def delayed_warning(short, long=nil)
    @_offroad_util_warnings ||= []
    @_offroad_util_warnings.push short
    puts <<EOF

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                           BIG FAT WARNING:
EOF
    puts short
    puts long if long
puts <<EOF
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

EOF
  end
set_from_env_or_ask(sym, question) click to toggle source

set_from_env_or_ask :variable, “Please enter variable name: ” If there is VARIABLE in enviroment, set :variable to it, otherwise ask user for a value

# File lib/capistrano-offroad/utils.rb, line 19
def set_from_env_or_ask(sym, question)
  if ENV.has_key? sym.to_s.upcase then
    set sym, ENV[sym.to_s.upcase]
  else
    set sym do Capistrano::CLI.ui.ask question end
  end
end