Class: Bozo::Tools::OctopusTools

Inherits:
Object
  • Object
show all
Defined in:
lib/bozo/tools/octopustools.rb

Instance Method Summary collapse

Constructor Details

#initializeOctopusTools

Creates a new instance.



8
9
10
# File 'lib/bozo/tools/octopustools.rb', line 8

def initialize
  @url = 'https://download.octopusdeploy.com/octopus-tools/3.3.2/OctopusTools.3.3.2.zip'
end

Instance Method Details

#retrieve(destination_path) ⇒ Object

Retrieves the Octopus tools exe from the path



21
22
23
24
25
26
27
28
29
# File 'lib/bozo/tools/octopustools.rb', line 21

def retrieve(destination_path)
  zip_file_path = download_path('OctopusTools.3.3.2.zip')

  open(zip_file_path, 'wb') do |file|
    file << open(@url).read
  end

  extract_zip(zip_file_path, destination_path)
end

#source(url) ⇒ Object

Sets the source url for the Octopus Tools to be retrieved from

Parameters:

  • url (String)

    A web server hosting the Octopus Tools



16
17
18
# File 'lib/bozo/tools/octopustools.rb', line 16

def source(url)
  @url = url
end