Class: Bozo::Tools::OpenCover
- Inherits:
-
Object
- Object
- Bozo::Tools::OpenCover
- Defined in:
- lib/bozo/tools/opencover.rb
Instance Method Summary collapse
-
#initialize ⇒ OpenCover
constructor
Creates a new instance.
-
#retrieve(destination_path) ⇒ Object
Retreives the OpenCover tool exe from the path.
-
#source(url) ⇒ Object
Sets the source url for the nuget tool to be retreived from.
Constructor Details
#initialize ⇒ OpenCover
Creates a new instance.
8 9 10 |
# File 'lib/bozo/tools/opencover.rb', line 8 def initialize @url = 'https://github.com/OpenCover/opencover/releases/download/4.6.166/opencover.4.6.166.zip' end |
Instance Method Details
#retrieve(destination_path) ⇒ Object
Retreives the OpenCover tool exe from the path
21 22 23 24 25 26 27 28 29 |
# File 'lib/bozo/tools/opencover.rb', line 21 def retrieve(destination_path) zip_file_path = download_path('opencover.4.6.166.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 nuget tool to be retreived from
16 17 18 |
# File 'lib/bozo/tools/opencover.rb', line 16 def source(url) @url = url end |