Class: Bozo::Tools::OctopusTools
- Inherits:
-
Object
- Object
- Bozo::Tools::OctopusTools
- Defined in:
- lib/bozo/tools/octopustools.rb
Instance Method Summary collapse
-
#initialize ⇒ OctopusTools
constructor
Creates a new instance.
-
#retrieve(destination_path) ⇒ Object
Retrieves the Octopus tools exe from the path.
-
#source(url) ⇒ Object
Sets the source url for the Octopus Tools to be retrieved from.
Constructor Details
#initialize ⇒ OctopusTools
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
16 17 18 |
# File 'lib/bozo/tools/octopustools.rb', line 16 def source(url) @url = url end |