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 14:41:47 +00:00
@uri = uri
@path = options[:path] || default_path
@client = ContainerRegistry::Client.new(uri, options)
end
2016-05-17 14:41:47 +00:00
private
def default_path
2018-01-27 05:35:53 +00:00
@uri.sub(%r{^https?://}, '')
2016-05-17 14:41:47 +00:00
end
end
end