Class: BardRake::Mysql
- Inherits:
-
Object
- Object
- BardRake::Mysql
- Extended by:
- Rake::DSL
- Defined in:
- lib/bard/rake/db.rb
Class Method Summary collapse
Class Method Details
.dump ⇒ Object
74 75 76 77 78 |
# File 'lib/bard/rake/db.rb', line 74 def dump mysqldump = `which mysqldump`.strip raise RuntimeError, "Cannot find mysqldump." if mysqldump.blank? sh "#{mysqldump} -e #{} > #{FILE_PATH}" end |
.load ⇒ Object
80 81 82 83 84 |
# File 'lib/bard/rake/db.rb', line 80 def load mysql = `which mysql`.strip raise RuntimeError, "Cannot find mysql." if mysql.blank? sh "#{mysql} #{} < #{FILE_PATH}" end |