class Stratocumulus::PostgreSQL

Public Instance Methods

command() click to toggle source
# File lib/stratocumulus/database/postgresql.rb, line 6
def command
  command = ""
  command << %(PGPASSWORD="#{@password}" ) if @password
  command << "pg_dump "
  command << "-U#{username} "
  command << "-h#{host} " unless socket?
  command << "-p#{port} " unless socket?
  command << @name
end
dependencies() click to toggle source
Calls superclass method Stratocumulus::Database#dependencies
# File lib/stratocumulus/database/postgresql.rb, line 16
def dependencies
  super + ["pg_dump"]
end

Private Instance Methods

host() click to toggle source
# File lib/stratocumulus/database/postgresql.rb, line 26
def host
  @host || "localhost"
end
port() click to toggle source
# File lib/stratocumulus/database/postgresql.rb, line 30
def port
  @port || 5432
end
username() click to toggle source
# File lib/stratocumulus/database/postgresql.rb, line 22
def username
  @username || "postgres"
end