Class: Bozo::DependencyResolvers::Nuget

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

Overview

Class for resolving project dependencies using NuGet.

Instance Method Summary collapse

Constructor Details

#initializeNuget

Creates a new instance.



7
8
9
# File 'lib/bozo/dependency_resolvers/nuget.rb', line 7

def initialize
  @sources = []
end

Instance Method Details

#executeObject

Ensure all the specified sources are present and execute the dependency resolver for all the files matching test/**/packages.config and src/**/packages.config and packages.config if present.



29
30
31
32
33
34
# File 'lib/bozo/dependency_resolvers/nuget.rb', line 29

def execute
  add_package_sources
  install_packages 'test', '**', 'packages.config'
  install_packages 'src', '**', 'packages.config'
  install_packages 'packages.config'
end

#required_toolsObject

Returns the build tools required for this dependency resolver to run successfully.



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

def required_tools
  :nuget
end

#source(url) ⇒ Object

Add a URL that should be within the machine’s configuration for package resolution URLs.

Parameters:

  • url (String)

    A NuGet package resolving URL.



16
17
18
# File 'lib/bozo/dependency_resolvers/nuget.rb', line 16

def source(url)
  @sources << url
end