lib/buildmaster/cotta/physical_system.rb in BuildMaster-1.1.9 vs lib/buildmaster/cotta/physical_system.rb in BuildMaster-1.1.12
- old
+ new
@@ -1,17 +1,12 @@
-$:.unshift File.dirname(__FILE__)
-
-require 'file_not_found_error'
-require 'command_error'
-require 'command_runner'
-require 'fileutils'
-
module BuildMaster
class PhysicalSystem
def initialize
end
+ # Invoke the command passed in through the CommandRunner
+ # and pass in the closure.
def shell(command, &block)
runner = CommandRunner.new(command)
runner.execute(&block)
end
@@ -77,7 +72,18 @@
def move_dir(source, target)
FileUtils.mv(source, target)
end
+ def chdir(target, &block)
+ Dir.chdir(target, &block)
+ end
+
+ def pwd
+ Dir.pwd
+ end
+
+ def ==(other)
+ other.class == PhysicalSystem
+ end
end
end
\ No newline at end of file