Class: Bozo::Publishers::Nuget

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

Overview

Publisher that pushes package to nuget

Instance Method Summary collapse

Instance Method Details

#api_key(api_key) ⇒ Object



12
13
14
# File 'lib/bozo/publishers/nuget.rb', line 12

def api_key(api_key)
  @api_key = api_key
end

#executeObject



16
17
18
19
20
21
22
23
# File 'lib/bozo/publishers/nuget.rb', line 16

def execute
  raise Bozo::ConfigurationError.new 'You must specify a nuget server address' if @server.empty?
  raise Bozo::ConfigurationError.new 'You must specify a nuget api key' if @api_key.empty?

  Dir[File.join('dist', 'nuget', '**', '*')].each do |source_file|
    push File.expand_path(source_file)
  end
end

#server(server) ⇒ Object



8
9
10
# File 'lib/bozo/publishers/nuget.rb', line 8

def server(server)
  @server = server
end