gitlab-org--gitlab-foss/lib/container_registry/registry.rb

20 lines
367 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module ContainerRegistry
class Registry
attr_reader :uri, :client, :path
def initialize(uri, options = {})
2016-05-17 10:41:47 -04:00
@uri = uri
@path = options[:path] || default_path
@client = ContainerRegistry::Client.new(uri, options)
end
2016-05-17 10:41:47 -04:00
private
def default_path
2018-01-27 00:35:53 -05:00
@uri.sub(%r{^https?://}, '')
2016-05-17 10:41:47 -04:00
end
end
end