class RuboCop::RemoteConfig
def handle_response(response, limit, &block)
def handle_response(response, limit, &block) case response when Net::HTTPSuccess, Net::HTTPNotModified, SocketError yield response when Net::HTTPRedirection request(URI.parse(response['location']), limit - 1, &block) else begin response.error! rescue StandardError => e raise e, "#{e.message} while downloading remote config file #{uri}" end end end