Module: Dbmanager

Extended by:
Dbmanager
Included in:
Dbmanager
Defined in:
lib/dbmanager/adapters/mysql2.rb,
lib/dbmanager.rb,
lib/dbmanager/dumper.rb,
lib/dbmanager/loader.rb,
lib/dbmanager/runner.rb,
lib/dbmanager/version.rb,
lib/dbmanager/adapters.rb,
lib/dbmanager/importer.rb,
lib/dbmanager/yml_parser.rb,
lib/dbmanager/environment.rb,
lib/dbmanager/adapters/mysql.rb

Overview

just the same as the mysql adapter, but ready for future modifications

Defined Under Namespace

Modules: Adapters, YmlParser Classes: CommandError, Dumper, Engine, Environment, EnvironmentProtectedError, Importer, Loader, MixedAdapterError, Runner

Constant Summary collapse

VERSION =
'0.3.0'

Instance Method Summary collapse

Instance Method Details

#execute(command, output = $stdout) ⇒ Object



40
41
42
# File 'lib/dbmanager.rb', line 40

def execute(command, output=$stdout)
  execute!(command, output) rescue false
end

#execute!(command, output = $stdout) ⇒ Object



44
45
46
47
48
# File 'lib/dbmanager.rb', line 44

def execute!(command, output=$stdout)
  output.puts %(executing "#{command}")
  result = `#{command}`
  $?.exitstatus.zero? ? result : raise(CommandError)
end

#rails_rootObject



36
37
38
# File 'lib/dbmanager.rb', line 36

def rails_root
  Rails.root
end