Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-10 13:57:19 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-10 13:57:19 +0300
commit5fbeb73a76ca21db02146a7686dc13a7c961cc87 (patch)
tree6fdea49e075c301c18010769bd35868c30a37517 /app/models/container_repository.rb
parent3d1cade13f61115b63bf6dbda5a1f194ba54b24b (diff)
Add method that returns a registry repository location
Diffstat (limited to 'app/models/container_repository.rb')
-rw-r--r--app/models/container_repository.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/container_repository.rb b/app/models/container_repository.rb
index 9682df3a586..82f4182d59a 100644
--- a/app/models/container_repository.rb
+++ b/app/models/container_repository.rb
@@ -23,6 +23,10 @@ class ContainerRepository < ActiveRecord::Base
@path ||= [project.full_path, name].select(&:present?).join('/')
end
+ def location
+ File.join(registry.path, path)
+ end
+
def tag(tag)
ContainerRegistry::Tag.new(self, tag)
end