From fc5eb3157082d923b80596485b302504ce0671ea Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 3 Apr 2017 15:53:51 +0200 Subject: [PATCH] Fix Rubocop offenses in code related to the registry --- app/controllers/projects/registry/repositories_controller.rb | 2 +- spec/features/security/project/public_access_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/projects/registry/repositories_controller.rb b/app/controllers/projects/registry/repositories_controller.rb index ab4344bcf3c..cb1ea45dd04 100644 --- a/app/controllers/projects/registry/repositories_controller.rb +++ b/app/controllers/projects/registry/repositories_controller.rb @@ -31,7 +31,7 @@ module Projects # def ensure_root_container_repository! ContainerRegistry::Path.new(@project.full_path).tap do |path| - return if path.has_repository? + break if path.has_repository? ContainerRepository.build_from_path(path).tap do |repository| repository.save if repository.has_tags? diff --git a/spec/features/security/project/public_access_spec.rb b/spec/features/security/project/public_access_spec.rb index 08cf2bf5291..c4d2f50ca14 100644 --- a/spec/features/security/project/public_access_spec.rb +++ b/spec/features/security/project/public_access_spec.rb @@ -446,7 +446,7 @@ describe "Public Project Access", feature: true do let(:container_repository) { create(:container_repository) } before do - stub_container_registry_tags(repository: :any, tags:['latest']) + stub_container_registry_tags(repository: :any, tags: ['latest']) stub_container_registry_config(enabled: true) project.container_repositories << container_repository end