Module: Bootstrap::Db::Command
- Included in:
- Adapter
- Defined in:
- lib/bootstrap/db/command.rb
Instance Method Summary collapse
Instance Method Details
#display_and_execute(command) ⇒ Object
5 6 7 8 |
# File 'lib/bootstrap/db/command.rb', line 5 def display_and_execute(command) log(command) if ENV['VERBOSE'] == 'true' execute_command(command) end |
#execute_command(command) ⇒ Object
10 11 12 13 14 |
# File 'lib/bootstrap/db/command.rb', line 10 def execute_command(command) output = `#{command} 2>&1` raise "Error : #{output}" unless $?.success? output end |