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-04 12:56:32 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-04 12:56:32 +0300
commit97c6cf59b361a0fe1b22cc999a2b2dd64b0a30f3 (patch)
tree0e9e97ea1e1af02ae179d9cac220e7cd501fc1e4 /lib/container_registry/path.rb
parent7cf91f7b78225957d8b79e96f7d0080cdd15c0cd (diff)
Swap method names in containe registry path class
Diffstat (limited to 'lib/container_registry/path.rb')
-rw-r--r--lib/container_registry/path.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/container_registry/path.rb b/lib/container_registry/path.rb
index f76c6489381..2291291d1fc 100644
--- a/lib/container_registry/path.rb
+++ b/lib/container_registry/path.rb
@@ -18,19 +18,19 @@ module ContainerRegistry
def valid?
@path =~ Gitlab::Regex.container_repository_name_regex &&
- nodes.size > 1 &&
- nodes.size < Namespace::NUMBER_OF_ANCESTORS_ALLOWED
+ components.size > 1 &&
+ components.size < Namespace::NUMBER_OF_ANCESTORS_ALLOWED
end
- def nodes
- @nodes ||= @path.to_s.split('/')
+ def components
+ @components ||= @path.to_s.split('/')
end
- def components
+ def nodes
raise InvalidRegistryPathError unless valid?
- @components ||= nodes.size.downto(2).map do |length|
- nodes.take(length).join('/')
+ @nodes ||= components.size.downto(2).map do |length|
+ components.take(length).join('/')
end
end
@@ -50,7 +50,7 @@ module ContainerRegistry
end
def repository_project
- @project ||= Project.where_full_path_in(components.first(3)).first
+ @project ||= Project.where_full_path_in(nodes.first(3)).first
end
def repository_name