Class: Albacore::NugetsPack::Config

Inherits:
Object
  • Object
show all
Includes:
CmdConfig
Defined in:
lib/albacore/task_types/nugets_pack.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from CmdConfig

#add_parameter, #parameters

Methods included from ConfigDSL

#attr_path, #attr_path_accessor

Methods included from Logging

#debug, #err, #error, #fatal, #info, #puts, #trace, #warn

Constructor Details

#initializeConfig

Returns a new instance of Config.



17
18
19
20
21
22
23
24
# File 'lib/albacore/task_types/nugets_pack.rb', line 17

def initialize
  @symbols = true
  @transitive = true
  @pin = false
  @exe = '.paket/paket.exe'
  @files = []
  @metadata = Albacore::NugetModel::Metadata.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args, &block) ⇒ Object



56
57
58
# File 'lib/albacore/task_types/nugets_pack.rb', line 56

def method_missing(m, *args, &block)
  @metadata.send(m, *args, &block)
end

Instance Attribute Details

#configurationObject

Returns the value of attribute configuration.



26
27
28
# File 'lib/albacore/task_types/nugets_pack.rb', line 26

def configuration
  @configuration
end

#exeObject

Returns the value of attribute exe.



27
28
29
# File 'lib/albacore/task_types/nugets_pack.rb', line 27

def exe
  @exe
end

#filesObject

Returns the value of attribute files.



29
30
31
# File 'lib/albacore/task_types/nugets_pack.rb', line 29

def files
  @files
end

#metadataObject

Returns the value of attribute metadata.



30
31
32
# File 'lib/albacore/task_types/nugets_pack.rb', line 30

def 
  @metadata
end

#outputObject

Returns the value of attribute output.



28
29
30
# File 'lib/albacore/task_types/nugets_pack.rb', line 28

def output
  @output
end

Instance Method Details

#fallbacks!Object



69
70
71
72
73
74
# File 'lib/albacore/task_types/nugets_pack.rb', line 69

def fallbacks!
  if @metadata.release_notes.nil?
    notes = Albacore::Tools.git_release_notes
    @metadata.release_notes = notes
  end
end

#not_symbolsObject



32
33
34
# File 'lib/albacore/task_types/nugets_pack.rb', line 32

def not_symbols
  @symbols = false
end

#not_transitiveObject



40
41
42
# File 'lib/albacore/task_types/nugets_pack.rb', line 40

def not_transitive
  @transitive = false
end

#pinObject



48
49
50
# File 'lib/albacore/task_types/nugets_pack.rb', line 48

def pin
  @pin = true
end

#pin?Boolean

Returns:

  • (Boolean)


52
53
54
# File 'lib/albacore/task_types/nugets_pack.rb', line 52

def pin?
  @pin
end

#symbols?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/albacore/task_types/nugets_pack.rb', line 36

def symbols?
  @symbols
end

#transitive?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/albacore/task_types/nugets_pack.rb', line 44

def transitive?
  @transitive
end

#validateObject



60
61
62
63
64
65
66
67
# File 'lib/albacore/task_types/nugets_pack.rb', line 60

def validate
  if configuration.nil?
    raise '"configuration" is a required property'
  end
  if version.nil?
    raise '"version" is a required property'
  end
end