Sha256: 8a2c4b30f379fb9d9e123b30ac0869bb2611b2979410f7248179828464fae854

Contents?: true

Size: 687 Bytes

Versions: 2

Compression:

Stored size: 687 Bytes

Contents

$:.unshift File.dirname(__FILE__)

require 'physical_system'
require 'cotta_dir'
require 'cotta_file'
require 'pathname'

module BuildMaster
class Cotta
  def initialize(system=PhysicalSystem.new)
    @system = system
  end
  
  def shell(command_line)
    puts "$> #{command_line}"
    @system.shell(command_line)
  end
  
  def dir(path)
    return CottaDir.new(@system, Pathname.new(path))
  end
  
  def file(path)
    return CottaFile.new(@system, Pathname.new(path))
  end
  
  def environment!(variable)
    @system.environment!(variable)
  end
  
  def environment(variable, default = '')
    @system.environment(variable, default)
  end
end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
BuildMaster-0.9.0 lib/buildmaster/cotta/cotta.rb
BuildMaster-0.9.1 lib/buildmaster/cotta/cotta.rb