From 41956773839ba010bb316e6bbe8d48c1ad7177de Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Fri, 31 Mar 2017 13:08:09 +0200 Subject: Reorganize container repository controllers and views --- config/routes/project.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'config/routes/project.rb') diff --git a/config/routes/project.rb b/config/routes/project.rb index 44b8ae7aedd..34f4bd917f7 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -219,7 +219,10 @@ constraints(ProjectUrlConstrainer.new) do end end - resources :container_registry, only: [:index, :destroy], constraints: { id: Gitlab::Regex.container_registry_reference_regex } + resources :container_registry, + controller: 'registry/repositories', + only: [:index, :destroy], + constraints: { id: Gitlab::Regex.container_registry_reference_regex } resources :milestones, constraints: { id: /\d+/ } do member do -- cgit v1.2.1 From 00319e595ab52906d12ef027a10e08ac92ea1337 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Fri, 31 Mar 2017 13:56:07 +0200 Subject: Move code related to registry to multiple controllers --- config/routes/project.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'config/routes/project.rb') diff --git a/config/routes/project.rb b/config/routes/project.rb index 34f4bd917f7..0269857f9fb 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -224,6 +224,12 @@ constraints(ProjectUrlConstrainer.new) do only: [:index, :destroy], constraints: { id: Gitlab::Regex.container_registry_reference_regex } + namespace :registry do + resources :repository, only: [] do + resources :tags, only: [:destroy] + end + end + resources :milestones, constraints: { id: /\d+/ } do member do put :sort_issues -- cgit v1.2.1 From ee6f50027c3b8366d97a0170f99c24dfc23cd101 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Wed, 5 Apr 2017 14:13:46 +0200 Subject: Improve container repository tags controller route --- config/routes/project.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'config/routes/project.rb') diff --git a/config/routes/project.rb b/config/routes/project.rb index f85521fe6d3..909a12a0204 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -221,14 +221,13 @@ constraints(ProjectUrlConstrainer.new) do end end - resources :container_registry, - controller: 'registry/repositories', - only: [:index, :destroy], - constraints: { id: Gitlab::Regex.container_registry_reference_regex } + resources :container_registry, only: [:index, :destroy], + controller: 'registry/repositories' namespace :registry do resources :repository, only: [] do - resources :tags, only: [:destroy] + resources :tags, only: [:destroy], + constraints: { id: Gitlab::Regex.container_registry_reference_regex } end end -- cgit v1.2.1 From 82dea6cffe339456c5ba0fd090464926e970dccf Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Wed, 5 Apr 2017 15:19:48 +0200 Subject: Fix Rubocop offenses related to registry routes --- config/routes/project.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/routes/project.rb') diff --git a/config/routes/project.rb b/config/routes/project.rb index 909a12a0204..757e1852da4 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -222,12 +222,12 @@ constraints(ProjectUrlConstrainer.new) do end resources :container_registry, only: [:index, :destroy], - controller: 'registry/repositories' + controller: 'registry/repositories' namespace :registry do resources :repository, only: [] do resources :tags, only: [:destroy], - constraints: { id: Gitlab::Regex.container_registry_reference_regex } + constraints: { id: Gitlab::Regex.container_registry_reference_regex } end end -- cgit v1.2.1