Parent

Class/Module Index [+]

Quicksearch

PgDumpRestore

Attributes

command[R]

Public Class Methods

new(source, target, command) click to toggle source
# File lib/heroku/helpers/pg_dump_restore.rb, line 5
def initialize(source, target, command)
  @source = URI.parse(source)
  @target = URI.parse(target)
  @command = command

  fill_in_shorthand_uris!
end

Public Instance Methods

dump_restore_cmd() click to toggle source
# File lib/heroku/helpers/pg_dump_restore.rb, line 31
def dump_restore_cmd
  pg_restore = gen_pg_restore_command(@target)
  pg_dump = gen_pg_dump_command(@source)
  "#{pg_dump} | #{pg_restore}"
end
execute() click to toggle source
# File lib/heroku/helpers/pg_dump_restore.rb, line 13
def execute
  prepare
  run
  verify
end
prepare() click to toggle source
# File lib/heroku/helpers/pg_dump_restore.rb, line 19
def prepare
  if @target.host == 'localhost'
    create_local_db
  else
    ensure_remote_db_empty
  end
end
verify() click to toggle source
# File lib/heroku/helpers/pg_dump_restore.rb, line 27
def verify
  verify_extensions_match
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.