11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/applitools/universal_sdk/universal_server_downloader.rb', line 11
def download(to)
puts "[eyes-universal] Downloading Eyes universal server from #{full_url}"
where = filepath(to)
full_url.open {|cloud| File.binwrite(where, cloud.read) }
if Digest::SHA256.file(where).to_s == expected_binary_sha
FileUtils.chmod('+x', where)
puts "[eyes-universal] Download complete. Server placed in #{where}"
else
puts "[eyes-universal] Download broken. Please try reinstall"
end
end
|