Skip to content
Snippets Groups Projects
Commit 000af871 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Remove redundant code from container registry classes

parent c753975b
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -34,7 +34,7 @@ module Projects
break if path.has_repository?
 
ContainerRepository.build_from_path(path).tap do |repository|
repository.save if repository.has_tags?
repository.save! if repository.has_tags?
end
end
end
Loading
Loading
Loading
Loading
@@ -28,7 +28,7 @@ class ContainerRepository < ActiveRecord::Base
end
 
def manifest
@manifest ||= client.repository_tags(self.path)
@manifest ||= client.repository_tags(path)
end
 
def tags
Loading
Loading
@@ -45,7 +45,7 @@ class ContainerRepository < ActiveRecord::Base
end
 
def has_tags?
tags.to_a.any?
tags.any?
end
 
def root_repository?
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@ require 'spec_helper'
 
describe ContainerRegistry::Blob do
let(:group) { create(:group, name: 'group') }
let(:project) { create(:project, path: 'test', group: group) }
let(:project) { create(:empty_project, path: 'test', group: group) }
 
let(:repository) do
create(:container_repository, name: 'image',
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment