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
path: root/config
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-10-15 16:59:00 +0300
committerLin Jen-Shin <godfat@godfat.org>2018-10-26 09:27:05 +0300
commit1581f75fb511fed171e8105c1a0811561a2f2dcc (patch)
tree0bf87a3d3731017554446a3b02b7ba534f4d5395 /config
parent679c0048a8f679aad456c02e30486150bbd0d93d (diff)
Put EE routes in EE files under EE directories
Diffstat (limited to 'config')
-rw-r--r--config/initializers/routing_draw.rb8
-rw-r--r--config/routes/admin.rb2
-rw-r--r--config/routes/group.rb3
3 files changed, 6 insertions, 7 deletions
diff --git a/config/initializers/routing_draw.rb b/config/initializers/routing_draw.rb
index 25003cf0239..f0f74954eef 100644
--- a/config/initializers/routing_draw.rb
+++ b/config/initializers/routing_draw.rb
@@ -1,7 +1,3 @@
# Adds draw method into Rails routing
-# It allows us to keep routing splitted into files
-class ActionDispatch::Routing::Mapper
- def draw(routes_name)
- instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb")))
- end
-end
+# It allows us to keep routing split into files
+ActionDispatch::Routing::Mapper.prepend Gitlab::Patch::DrawRoute
diff --git a/config/routes/admin.rb b/config/routes/admin.rb
index fb29c4748c1..af333bdc748 100644
--- a/config/routes/admin.rb
+++ b/config/routes/admin.rb
@@ -71,6 +71,7 @@ namespace :admin do
resource :logs, only: [:show]
resource :health_check, controller: 'health_check', only: [:show]
resource :background_jobs, controller: 'background_jobs', only: [:show]
+
resource :system_info, controller: 'system_info', only: [:show]
resources :requests_profiles, only: [:index, :show], param: :name, constraints: { name: /.+\.html/ }
@@ -104,6 +105,7 @@ namespace :admin do
resource :application_settings, only: [:show, :update] do
resources :services, only: [:index, :edit, :update]
+
get :usage_data
put :reset_registration_token
put :reset_health_check_token
diff --git a/config/routes/group.rb b/config/routes/group.rb
index 602bbe837cf..2328b50b760 100644
--- a/config/routes/group.rb
+++ b/config/routes/group.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
resources :groups, only: [:index, :new, :create] do
post :preview_markdown
end
@@ -63,7 +65,6 @@ constraints(::Constraints::GroupUrlConstrainer.new) do
end
end
- # On CE only index and show actions are needed
resources :boards, only: [:index, :show]
resources :runners, only: [:index, :edit, :update, :destroy, :show] do