2020-11-13 16:09:31 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module DependencyProxy
|
|
|
|
class BaseService < ::BaseService
|
2020-12-10 19:09:41 -05:00
|
|
|
class DownloadError < StandardError
|
|
|
|
attr_reader :http_status
|
|
|
|
|
|
|
|
def initialize(message, http_status)
|
|
|
|
@http_status = http_status
|
|
|
|
|
|
|
|
super(message)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-11-13 16:09:31 -05:00
|
|
|
private
|
|
|
|
|
|
|
|
def registry
|
|
|
|
DependencyProxy::Registry
|
|
|
|
end
|
|
|
|
|
|
|
|
def auth_headers
|
|
|
|
{
|
|
|
|
Authorization: "Bearer #{@token}"
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|