Class: Albacore::NugetsRestore::AddSourceCmd

Inherits:
Object
  • Object
show all
Includes:
CrossPlatformCmd, Logging
Defined in:
lib/albacore/task_types/nugets_restore.rb

Constant Summary

Constants included from CrossPlatformCmd

CrossPlatformCmd::KILL_TIMEOUT

Instance Attribute Summary

Attributes included from CrossPlatformCmd

#pid

Instance Method Summary collapse

Methods included from CrossPlatformCmd

#chdir, #make_command, #normalise_slashes, #sh, #shie, #stop, #system, #which

Methods included from Logging

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

Constructor Details

#initialize(exe, source, user, pass) ⇒ AddSourceCmd

Returns a new instance of AddSourceCmd.



30
31
32
33
34
# File 'lib/albacore/task_types/nugets_restore.rb', line 30

def initialize exe, source, user, pass
  @executable = exe
  @parameters = %W[sources add -name #{source.name} -source #{source.uri} -user #{user} -password #{pass}] 
  mono_command
end

Instance Method Details

#executeObject



35
36
37
# File 'lib/albacore/task_types/nugets_restore.rb', line 35

def execute
  system @executable, @parameters, :ensure_success => true
end