fastlane/lib/fastlane/actions/deploygate.rb in fastlane-2.74.1 vs fastlane/lib/fastlane/actions/deploygate.rb in fastlane-2.75.0.beta.20180109010003

- old
+ new

@@ -16,15 +16,15 @@ def self.upload_build(api_token, user_name, binary, options) require 'faraday' require 'faraday_middleware' connection = Faraday.new(url: DEPLOYGATE_URL_BASE, request: { timeout: 120 }) do |builder| - builder.request :multipart - builder.request :json - builder.response :json, content_type: /\bjson$/ - builder.use FaradayMiddleware::FollowRedirects - builder.adapter :net_http + builder.request(:multipart) + builder.request(:json) + builder.response(:json, content_type: /\bjson$/) + builder.use(FaradayMiddleware::FollowRedirects) + builder.adapter(:net_http) end options.update({ token: api_token, file: Faraday::UploadIO.new(binary, 'application/octet-stream'), @@ -32,21 +32,21 @@ }) options[:disable_notify] = 'yes' if options[:disable_notify] connection.post("/api/users/#{user_name}/apps", options) rescue Faraday::Error::TimeoutError - UI.crash! "Timed out while uploading build. Check https://deploygate.com/ to see if the upload was completed." + UI.crash!("Timed out while uploading build. Check https://deploygate.com/ to see if the upload was completed.") end def self.run(options) # Available options: https://deploygate.com/docs/api UI.success('Starting with app upload to DeployGate... this could take some time ⏳') api_token = options[:api_token] user_name = options[:user] binary = options[:ipa] || options[:apk] upload_options = options.values.select do |key, _| - [:message, :distribution_key, :release_note, :disable_notify].include? key + [:message, :distribution_key, :release_note, :disable_notify].include?(key) end UI.user_error!('missing `ipa` and `apk`. deploygate action needs least one.') unless binary return binary if Helper.test?