Sha256: 9929ebf3d96ae488f85fe8a9be4e94034028f82896af188bc54116ad17c54af6

Contents?: true

Size: 1.01 KB

Versions: 6

Compression:

Stored size: 1.01 KB

Contents

require 'albacore/support/albacore_helper'

class Docu
  extend AttrMethods
  include RunCommand
  include YAMLConfig
  
  attr_accessor :output_location
  attr_array :assemblies, :xml_files
  
  def initialize(path_to_command='docu.exe')
    @path_to_command = path_to_command
    @assemblies = []
    @xml_files = []
    @output_location = ""
    super()
  end
  
  def execute
    if @assemblies.empty?
      fail_with_message 'Docu Failed. No assemblies specified'
      return
    end
  
    command_params = get_command_parameters
    success = run_command 'Docu', command_params.join(' ')
  
    fail_with_message 'Docu Failed. See Build Log For Detail' unless success
  end
  
  private
  def get_command_parameters
    command_params = []
    command_params << @assemblies.join(' ') unless @assemblies.nil?
    command_params << @xml_files.join(' ') unless @xml_files.nil?
    command_params << " --output=\"#{@output_location}\" " unless @output_location.empty?
    command_params
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
albacore-0.1.5 lib/albacore/docu.rb
albacore-0.1.4 lib/albacore/docu.rb
albacore-0.1.3 lib/albacore/docu.rb
albacore-0.1.2 lib/albacore/docu.rb
albacore-0.1.1 lib/albacore/docu.rb
albacore-0.1.0 lib/albacore/docu.rb