Class: Database

Inherits:
Object
  • Object
show all
Defined in:
lib/capistrano/tasks/database.rb

Direct Known Subclasses

Locale, Remote

Instance Method Summary collapse

Constructor Details

#initialize(config_file = fetch(:filename) || 'config/database.yml') ⇒ Database

Returns a new instance of Database.



6
7
8
# File 'lib/capistrano/tasks/database.rb', line 6

def initialize(config_file = fetch(:filename) || 'config/database.yml')
  @config_file = config_file
end

Instance Method Details

#dumpObject



10
11
12
13
14
# File 'lib/capistrano/tasks/database.rb', line 10

def dump
  #dump_file = "dump.local.#{Time.now.strftime '%Y-%m-%d_%H-%M-%S'}.sql"
  #username, password, database, host = database_config('development')
  #system "mysqldump -u #{username} --password=#{password} #{database} > #{dump_file}"
end

#sync_dirObject



16
17
18
# File 'lib/capistrano/tasks/database.rb', line 16

def sync_dir
  execute :mkdir, "-p #{shared_path}/sync"
end