Sha256: 5aa5ca9f61e85338c23642cade1ba2e6a40b456aae10870ef3c8dd438c324d65

Contents?: true

Size: 873 Bytes

Versions: 1

Compression:

Stored size: 873 Bytes

Contents

require "albacore/support/albacore_helper"
class NDepend
  include RunCommand
  include Logging
  include YAMLConfig

  attr_accessor :path_to_command, :project_file , :parameters
  def initialize()
    super()
    @parameters =[]
    @require_valid_command = true
  end
  
  def run
    check_comand
    return if @failed
    result = run_command @path_to_command, create_parameters
    failure_message = 'Command Failed. See Build Log For Detail'
    fail_with_message failure_message if !result
  end

  def create_parameters
    params = []
    params << File.expand_path( @project_file)
    params << @parameters.join(" ")
    @logger.debug "NDependConsole Parameters" + @parameters.join(" ")
    return params
  end

  def check_comand
    return if @project_file
    fail_with_message 'A ndepend project file is required'
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
albacore-0.1.0 lib/albacore/ndepend.rb