summaryrefslogtreecommitdiff
path: root/lib/container_registry/registry.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-05-17 09:41:47 -0500
committerKamil Trzcinski <ayufan@ayufan.eu>2016-05-17 09:41:47 -0500
commita82109eee80bf703ad8e82de2410f490e5fc6d54 (patch)
tree4417e900b39111123d175303fec9deb71be14e4a /lib/container_registry/registry.rb
parentac6992ba682de08b79e5ddde08dbf566827e2f07 (diff)
downloadgitlab-ce-a82109eee80bf703ad8e82de2410f490e5fc6d54.tar.gz
Add .gitkeep
Diffstat (limited to 'lib/container_registry/registry.rb')
-rw-r--r--lib/container_registry/registry.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/container_registry/registry.rb b/lib/container_registry/registry.rb
index d3b117eeaca..07490de94ba 100644
--- a/lib/container_registry/registry.rb
+++ b/lib/container_registry/registry.rb
@@ -3,13 +3,19 @@ module ContainerRegistry
attr_reader :uri, :client, :path
def initialize(uri, options = {})
- @path = options[:path] || uri
- @uri = URI.parse(uri)
+ @uri = uri
+ @path = options[:path] || default_path
@client = ContainerRegistry::Client.new(uri, options)
end
def [](name)
ContainerRegistry::Repository.new(self, name)
end
+
+ private
+
+ def default_path
+ @uri.sub(/^https?:\/\//, '')
+ end
end
end