Sha256: 8285dc1fb7f7d39648327fca2933cea1d13776173f559b998f8f01841728e613

Contents?: true

Size: 684 Bytes

Versions: 2

Compression:

Stored size: 684 Bytes

Contents

require "albacore/albacoretask"
require "albacore/config/ndependconfig"

class NDepend
  TaskName = :ndepend

  include Albacore::Task
  include Albacore::RunCommand
  include Configuration::NDepend

  attr_accessor :project_file

  def initialize()
    super()
    update_attributes(ndepend.to_hash)
  end
  
  def execute
    unless @project_file
      fail_with_message("ndepend requires #project_file")
      return
    end
    
    result = run_command(@command, build_parameters)
    fail_with_message("NDepend failed, see the build log for more details.") unless result
  end

  def build_parameters
    p = []
    p << "\"#{File.expand_path(@project_file)}\""
    p
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
albacore-1.0.0 lib/albacore/ndepend.rb
albacore-1.0.0.rc.3 lib/albacore/ndepend.rb