Module: Mys3ql::Shell
Instance Method Summary collapse
Instance Method Details
#log(message) ⇒ Object
| 13 14 15 | # File 'lib/mys3ql/shell.rb', line 13 def log() puts if @config.debugging? end | 
#run(command) ⇒ Object
| 5 6 7 8 9 10 11 | # File 'lib/mys3ql/shell.rb', line 5 def run(command) log command result = `#{command}` log "==> #{result}" unless result.empty? raise ShellCommandError, "error (exit status #{$?.exitstatus}): #{command} ==> #{result}: #{$?}" unless $?.success? result end |