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
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-04-10 17:07:47 +0300
committerRémy Coutable <remy@rymai.me>2018-04-23 13:20:30 +0300
commitc286c66f57e4fd716fe1746363f8c7cf4205cee3 (patch)
treefb2b9bc7c1c157bd1ca76051ce4c3c831e8d4b33 /lib/gitlab.rb
parentfe919f95b140f95ffcefc6f7fbfd0e7b1da43016 (diff)
Move Settings to its own file, isolate it from Rails and introduce Gitlab.root
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 f6629982512..a51ea0afbd9 100644
--- a/lib/gitlab.rb
+++ b/lib/gitlab.rb
@@ -5,6 +5,10 @@ module Gitlab
APP_DIRS_PATTERN = %r{^/?(app|config|ee|lib|spec|\(\w*\))}
SUBDOMAIN_REGEX = %r{\Ahttps://[a-z0-9]+\.gitlab\.com\z}
+ def self.root
+ Pathname.new(File.expand_path('..', __dir__))
+ end
+
def self.com?
# Check `gl_subdomain?` as well to keep parity with gitlab.com
Gitlab.config.gitlab.url == COM_URL || gl_subdomain?