Skip to content

Commit 960c23f

Browse files
committed
clean up comments and debug statements
1 parent 808d373 commit 960c23f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

lib/arduino_ci/arduino_downloader_windows.rb

+2-8
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module ArduinoCI
1010
class ArduinoDownloaderWindows < ArduinoDownloader
1111

1212
def powershell(*args)
13-
encoded_cmd = Base64.strict_encode64((args.shelljoin + " | Out-Null").encode('utf-16le') )
13+
encoded_cmd = Base64.strict_encode64((args.shelljoin + " | Out-Null").encode('utf-16le'))
1414
system("powershell.exe", "-encodedCommand", encoded_cmd)
1515
end
1616

@@ -34,8 +34,8 @@ def downloader
3434
# Download the package_url to package_file
3535
# @return [bool] whether successful
3636
def download
37-
puts 'Downloading from ' + package_url
3837
# Turned off ssl verification
38+
# This should be acceptable because it won't happen on a user's machine, just CI
3939
open(URI.parse(package_url), ssl_verify_mode: 0) do |url|
4040
File.open(package_file, 'wb') { |file| file.write(url.read) }
4141
end
@@ -44,11 +44,9 @@ def download
4444
# Move the extracted package file from extracted_file to the force_install_location
4545
# @return [bool] whether successful
4646
def install
47-
puts 'Installing to ' + self.class.force_install_location
4847
# Move only the content of the directory
4948
powershell("Move-Item", extracted_file + "\*", self.class.force_install_location)
5049
# clean up the no longer required root extracted folder
51-
puts 'Removing ' + package_file
5250
powershell("Remove-Item", extracted_file)
5351
end
5452

@@ -68,10 +66,8 @@ def extracter
6866
# Extract the package_file to extracted_file
6967
# @return [bool] whether successful
7068
def extract
71-
puts 'Extracting ' + package_file + " to " + extracted_file
7269
powershell("Expand-Archive", "-Path", package_file, "-DestinationPath", extracted_file)
7370
# clean up the no longer required zip
74-
puts 'Removing ' + package_file
7571
powershell("Remove-Item", package_file)
7672
end
7773

@@ -96,7 +92,6 @@ def self.existing_executable
9692
Win32::Registry::HKEY_LOCAL_MACHINE.open(arduino_reg) do |reg|
9793
path = reg.read_s('Install_Dir')
9894
exe = File.join(path, "arduino_debug.exe")
99-
puts "Using existing exe located at " + exe
10095
return exe if File.exist? exe
10196
end
10297
rescue
@@ -107,7 +102,6 @@ def self.existing_executable
107102
# @return [string]
108103
def self.force_installed_executable
109104
exe = File.join(self.force_install_location, "arduino_debug.exe")
110-
puts "Using force installed exe located at " + exe
111105
return nil if exe.nil?
112106
exe
113107
end

0 commit comments

Comments
 (0)