You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: file_uploader.rb
    path of file: ./repos/fastlane/spaceship/lib/spaceship/connect_api
    
    the code of the file until where you have to start completion: require 'faraday' # HTTP Client
require 'faraday-cookie_jar'
require 'faraday_middleware'

require 'spaceship/globals'

require 
    
      def self.with_retry(tries = 5, &_block)
        tries = 1 if Object.const_defined?("SpecHelper")
        response = yield

        tries -= 1

        unless (200...300).cover?(response.status)
          msg = "Received status of #{response.status}! Retrying after 3 seconds (remaining: #{tries})..."
          raise msg
        end