registry.rb 336 Bytes
Newer Older
1
module ContainerRegistry
2
  class Registry
3
    attr_reader :uri, :client, :path
4
5

    def initialize(uri, options = {})
Kamil Trzcinski's avatar
Kamil Trzcinski committed
6
7
      @uri = uri
      @path = options[:path] || default_path
8
      @client = ContainerRegistry::Client.new(uri, options)
9
10
    end

Kamil Trzcinski's avatar
Kamil Trzcinski committed
11
12
13
14
15
    private

    def default_path
      @uri.sub(/^https?:\/\//, '')
    end
16
17
  end
end