fastlane/lib/fastlane/actions/testfairy.rb in fastlane-2.55.0.beta.20170829010003 vs fastlane/lib/fastlane/actions/testfairy.rb in fastlane-2.55.0.beta.20170830010003

- old
+ new

@@ -7,13 +7,14 @@ class TestfairyAction < Action def self.upload_build(ipa, options) require 'faraday' require 'faraday_middleware' - connection = Faraday.new(url: "https://app.testfairy.com") do |builder| + connection = Faraday.new(url: "https://upload.testfairy.com") do |builder| builder.request :multipart builder.request :url_encoded + builder.request :retry, max: 3, interval: 5 builder.response :json, content_type: /\bjson$/ builder.use FaradayMiddleware::FollowRedirects builder.adapter :net_http end @@ -22,12 +23,16 @@ symbols_file = options.delete(:symbols_file) if symbols_file options[:symbols_file] = Faraday::UploadIO.new(symbols_file, 'application/octet-stream') end - connection.post do |req| - req.url("/api/upload/") - req.body = options + begin + connection.post do |req| + req.url("/api/upload/") + req.body = options + end + rescue Faraday::Error::TimeoutError + UI.crash!("Uploading build to TestFairy timed out ⏳") end end def self.run(params) UI.success('Starting with ipa upload to TestFairy...')