Class: Bozo::Packagers::Nuget

Inherits:
Object
  • Object
show all
Defined in:
lib/bozo/packagers/nuget.rb

Instance Method Summary collapse

Constructor Details

#initializeNuget

Returns a new instance of Nuget.



7
8
9
10
11
12
# File 'lib/bozo/packagers/nuget.rb', line 7

def initialize
  @libraries = []
  @executables = []
  @websites = []
  @resources = []
end

Instance Method Details

#author(author) ⇒ Object



50
51
52
# File 'lib/bozo/packagers/nuget.rb', line 50

def author(author)
  @author = author
end

#destination(destination) ⇒ Object



14
15
16
# File 'lib/bozo/packagers/nuget.rb', line 14

def destination(destination)
  @destination = destination
end

#executable(project) ⇒ Object



26
27
28
# File 'lib/bozo/packagers/nuget.rb', line 26

def executable(project)
  @executables << ExecutablePackage.new(project)
end

#executeObject



58
59
60
61
62
63
# File 'lib/bozo/packagers/nuget.rb', line 58

def execute
  @libraries.each {|project| package project}
  @executables.each {|project| package project}
  @websites.each {|project| package project}
  @resources.each {|project| package project}
end

#library(project, *extfiles) ⇒ Object



18
19
20
# File 'lib/bozo/packagers/nuget.rb', line 18

def library(project, *extfiles)
  @libraries << LibraryPackage.new(project, extfiles, self)
end

#library_with_option(project, opts = {}) ⇒ Object



22
23
24
# File 'lib/bozo/packagers/nuget.rb', line 22

def library_with_option(project, opts = {})
  @libraries << LibraryPackage.new(project, opts[:extfiles], self, opts[:excluded_references], opts[:dependency_versions])
end

#license_url(url) ⇒ Object



46
47
48
# File 'lib/bozo/packagers/nuget.rb', line 46

def license_url(url)
  @license_url = url
end

#package_versionObject

Returns the version that the package should be given.



66
67
68
# File 'lib/bozo/packagers/nuget.rb', line 66

def package_version
  env['BUILD_VERSION_FULL']
end

#project_url(url) ⇒ Object



42
43
44
# File 'lib/bozo/packagers/nuget.rb', line 42

def project_url(url)
  @project_url = url
end

#required_toolsObject



38
39
40
# File 'lib/bozo/packagers/nuget.rb', line 38

def required_tools
  :nuget
end

#resource(project, base_directory) ⇒ Object



30
31
32
# File 'lib/bozo/packagers/nuget.rb', line 30

def resource(project, base_directory)
  @resources << ResourcePackage.new(project, base_directory)
end

#to_sObject



54
55
56
# File 'lib/bozo/packagers/nuget.rb', line 54

def to_s
  "Publish projects with nuget #{@libraries | @executables | @websites} to #{@destination}"
end

#website(project) ⇒ Object



34
35
36
# File 'lib/bozo/packagers/nuget.rb', line 34

def website(project)
  @websites << WebsitePackage.new(project)
end