deliver/lib/deliver/download_screenshots.rb in fastlane_hotfix-2.165.1 vs deliver/lib/deliver/download_screenshots.rb in fastlane_hotfix-2.187.0

- old
+ new

@@ -1,8 +1,7 @@ require_relative 'module' require 'spaceship' -require 'open-uri' module Deliver class DownloadScreenshots def self.run(options, path) UI.message("Downloading all existing screenshots...") @@ -12,11 +11,11 @@ UI.error(ex) UI.error("Couldn't download already existing screenshots from App Store Connect.") end def self.download(options, folder_path) - app = options[:app] + app = Deliver.cache[:app] platform = Spaceship::ConnectAPI::Platform.map(options[:platform]) if options[:use_live_version] version = app.get_live_app_store_version(platform: platform) UI.user_error!("Could not find a live version on App Store Connect. Try using '--use_live_version false'") if version.nil? @@ -66,10 +65,10 @@ rescue # if it's already there end path = File.join(containing_folder, file_name) - File.binwrite(path, open(url).read) + File.binwrite(path, FastlaneCore::Helper.open_uri(url).read) end end end end end