summaryrefslogtreecommitdiff
path: root/lib/gitlab.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-04-10 16:07:47 +0200
committerRémy Coutable <remy@rymai.me>2018-04-10 16:15:04 +0200
commit88887586e7205c13b3b883b1a674d0c03bca892a (patch)
tree7dcf661a9341837c1386820cebef2637a15175a7 /lib/gitlab.rb
parent6e7905cefef67577cebaf5a7940a9b23209805fd (diff)
downloadgitlab-ce-44713-fast-spec-helper.tar.gz
Move Settings to its own file, isolate it from Rails and introduce Gitlab.root44713-fast-spec-helper
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/gitlab.rb')
-rw-r--r--lib/gitlab.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab.rb b/lib/gitlab.rb
index aa9fd36d9ff..cbe1467c2cd 100644
--- a/lib/gitlab.rb
+++ b/lib/gitlab.rb
@@ -4,6 +4,10 @@ module Gitlab
COM_URL = 'https://gitlab.com'.freeze
APP_DIRS_PATTERN = %r{^/?(app|config|ee|lib|spec|\(\w*\))}
+ def self.root
+ Pathname.new(File.expand_path('..', __dir__))
+ end
+
def self.com?
# Check `staging?` as well to keep parity with gitlab.com
Gitlab.config.gitlab.url == COM_URL || staging?