Sha256: 055ef1929345abe756221b308b8bb8603c7652bb8a299a0c299878c767d40e31

Contents?: true

Size: 642 Bytes

Versions: 5

Compression:

Stored size: 642 Bytes

Contents

# encoding: UTF-8

module Tetra
  # runs Ant with tetra-specific options
  class Ant
    include Logging
    include ProcessRunner

    # project_path is relative to the current dir
    # ant_path is relative to project_path
    def initialize(project_path, ant_path)
      @project_path = project_path
      @ant_path = ant_path
    end

    # runs ant in a subprocess
    def ant(options)
      run(get_ant_commandline(options), true)
    end

    # returns a command line for running Ant
    def get_ant_commandline(options)
      full_path = File.join(@project_path, @ant_path)
      "#{full_path} #{options.join(' ')}"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tetra-0.52.0 lib/tetra/facades/ant.rb
tetra-0.51.0 lib/tetra/facades/ant.rb
tetra-0.50.0 lib/tetra/facades/ant.rb
tetra-0.49.0 lib/tetra/facades/ant.rb
tetra-0.48.0 lib/tetra/facades/ant.rb