Class: Bozo::DependencyResolvers::Nuget
- Inherits:
-
Object
- Object
- Bozo::DependencyResolvers::Nuget
- Defined in:
- lib/bozo/dependency_resolvers/nuget.rb
Overview
Class for resolving project dependencies using NuGet.
Instance Method Summary collapse
-
#execute ⇒ Object
Ensure all the specified sources are present and execute the dependency resolver for all the files matching
test/**/packages.config
andsrc/**/packages.config
andpackages.config
if present. -
#initialize ⇒ Nuget
constructor
Creates a new instance.
-
#required_tools ⇒ Object
Returns the build tools required for this dependency resolver to run successfully.
-
#source(url) ⇒ Object
Add a URL that should be within the machine’s configuration for package resolution URLs.
Constructor Details
#initialize ⇒ Nuget
Creates a new instance.
7 8 9 |
# File 'lib/bozo/dependency_resolvers/nuget.rb', line 7 def initialize @sources = [] end |
Instance Method Details
#execute ⇒ Object
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_tools ⇒ Object
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.
16 17 18 |
# File 'lib/bozo/dependency_resolvers/nuget.rb', line 16 def source(url) @sources << url end |