From 52fa309e86d1bafc6b8a986d8bd74fd906b1ebc9 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Thu, 18 Oct 2018 00:55:42 +0800 Subject: Extract EE only oauth routes and add tests --- lib/gitlab/patch/draw_route.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/gitlab/patch/draw_route.rb b/lib/gitlab/patch/draw_route.rb index f8ae6f7afc0..c7a0b49a948 100644 --- a/lib/gitlab/patch/draw_route.rb +++ b/lib/gitlab/patch/draw_route.rb @@ -13,11 +13,15 @@ module Gitlab end def draw_ce(routes_name) - draw_route(Rails.root.join("config/routes/#{routes_name}.rb")) + draw_route(route_path("config/routes/#{routes_name}.rb")) end def draw_ee(routes_name) - draw_route(Rails.root.join("ee/config/routes/#{routes_name}.rb")) + draw_route(route_path("ee/config/routes/#{routes_name}.rb")) + end + + def route_path(routes_name) + Rails.root.join(routes_name) end def draw_route(path) -- cgit v1.2.1