module Deploku::Runnable
Public Instance Methods
run_command(command, option = nil)
click to toggle source
# File lib/deploku/runnable.rb, line 4 def run_command(command, option = nil) Bundler.with_clean_env { out = `#{command}` if $?.success? if option == :echo puts out end out else puts "Error running command:" puts command puts out exit $?.exitstatus end } end
test_command(command)
click to toggle source
# File lib/deploku/runnable.rb, line 21 def test_command(command) Bundler.with_clean_env { `#{command} 2> /dev/null` $?.success? } end