lib/buildmaster/cotta/physical_system.rb in BuildMaster-0.9.1 vs lib/buildmaster/cotta/physical_system.rb in BuildMaster-1.0.6

- old
+ new

@@ -1,23 +1,19 @@ $:.unshift File.dirname(__FILE__) require 'file_not_found_error' require 'command_error' +require 'command_runner' require 'fileutils' module BuildMaster class PhysicalSystem def initialize end - def shell(command) - puts "$> #{command}" - raise CommandError.new, command, caller unless system(command) - end - - def shell_output(command) - puts "$> #{command}" - `#{command}` + def shell(command, &block) + runner = CommandRunner.new(command) + runner.execute(&block) end def environment!(variable) value = ENV[variable] raise "#{variable} environment variable not found" unless value \ No newline at end of file