class Berkshelf::CommunityREST

def stream(target)

Returns:
  • (Tempfile) -

Parameters:
  • target (String) --
def stream(target)
  local = Tempfile.new("community-rest-stream")
  local.binmode
  Retryable.retryable(tries: retries, on: Berkshelf::APIClientError, sleep: retry_interval) do
    connection.streaming_request(target, {}, local)
  end
ensure
  local.close(false) unless local.nil?
end