summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-10-18 00:55:42 +0800
committerLin Jen-Shin <godfat@godfat.org>2018-10-26 14:27:05 +0800
commit52fa309e86d1bafc6b8a986d8bd74fd906b1ebc9 (patch)
tree879d8ed6fb6646d1a642a24460f03f6409fb0bd3 /lib
parentf1701c0fec096184a5908df65187573209dd6254 (diff)
downloadgitlab-ce-52fa309e86d1bafc6b8a986d8bd74fd906b1ebc9.tar.gz
Extract EE only oauth routes and add tests
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/patch/draw_route.rb8
1 files changed, 6 insertions, 2 deletions
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)