class ArduinoCI::ArduinoDownloaderOSX
Manage the OSX download & install of Arduino
Public Class Methods
existing_executable()
click to toggle source
The executable Arduino file in an existing installation, or nil @return [string]
# File lib/arduino_ci/arduino_downloader_osx.rb, line 22 def self.existing_executable Host.which("arduino-cli") end
extract(package_file)
click to toggle source
Extract the package_file
to extracted_file
@return [bool] whether successful
# File lib/arduino_ci/arduino_downloader_osx.rb, line 45 def self.extract(package_file) system(extracter, "xf", package_file, extracted_file) end
extracted_file()
click to toggle source
The local file (dir) name of the extracted IDE package (zip/tar/etc) @return [string]
# File lib/arduino_ci/arduino_downloader_osx.rb, line 16 def self.extracted_file "arduino-cli" end
extracter()
click to toggle source
The technology that will be used to extract the download (for logging purposes) @return [string]
# File lib/arduino_ci/arduino_downloader_osx.rb, line 39 def self.extracter "tar" end
Public Instance Methods
package_file()
click to toggle source
The local filename of the desired IDE package (zip/tar/etc) @return [string]
# File lib/arduino_ci/arduino_downloader_osx.rb, line 10 def package_file "arduino-cli_#{@desired_version}_macOS_64bit.tar.gz" end
prepare()
click to toggle source
Make any preparations or run any checks prior to making changes @return [string] Error message, or nil if success
# File lib/arduino_ci/arduino_downloader_osx.rb, line 28 def prepare reqs = [self.class.extracter] reqs.each do |req| return "#{req} does not appear to be installed!" unless Host.which(req) end nil end