Sha256: 35491e4ea1d64a2ef137e20d1bbd3b348333a3c9548891808b72bf3630fcb3eb

Contents?: true

Size: 703 Bytes

Versions: 9

Compression:

Stored size: 703 Bytes

Contents

require 'albacore/albacoretask'

class NDepend
  include Albacore::Task
  include Albacore::RunCommand

  attr_accessor :project_file

  def initialize()
    super()
    update_attributes Albacore.configuration.ndepend.to_hash
  end
  
  def execute
    return unless check_command
    result = run_command @command, create_parameters.join(" ")
    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
  end

  def check_command
    return true if @project_file
    fail_with_message 'A ndepend project file is required'
    false
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
albacore-0.3.6 lib/albacore/ndepend.rb
albacore-1.0.0.rc.2 lib/albacore/ndepend.rb
albacore-1.0.0.rc.1 lib/albacore/ndepend.rb
albacore-0.3.5 lib/albacore/ndepend.rb
albacore-0.3.4 lib/albacore/ndepend.rb
albacore-0.3.3 lib/albacore/ndepend.rb
albacore-0.3.2 lib/albacore/ndepend.rb
albacore-0.3.1 lib/albacore/ndepend.rb
albacore-0.3.0 lib/albacore/ndepend.rb