summaryrefslogtreecommitdiff
path: root/lib/gitlab.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-04-23 13:02:07 +0200
committerRémy Coutable <remy@rymai.me>2018-04-23 13:02:07 +0200
commit5b44097cf7a20a6bcdc38ac9ed43aac0ec33415e (patch)
tree79ff9cf1b17a16361803f7f50f6015572838a63a /lib/gitlab.rb
parentc286c66f57e4fd716fe1746363f8c7cf4205cee3 (diff)
downloadgitlab-ce-5b44097cf7a20a6bcdc38ac9ed43aac0ec33415e.tar.gz
Address latest feedback
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/gitlab.rb')
-rw-r--r--lib/gitlab.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/gitlab.rb b/lib/gitlab.rb
index a51ea0afbd9..7aff4e590bf 100644
--- a/lib/gitlab.rb
+++ b/lib/gitlab.rb
@@ -1,14 +1,15 @@
require_dependency 'gitlab/git'
module Gitlab
- COM_URL = 'https://gitlab.com'.freeze
- 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
+ COM_URL = 'https://gitlab.com'.freeze
+ APP_DIRS_PATTERN = %r{^/?(app|config|ee|lib|spec|\(\w*\))}
+ SUBDOMAIN_REGEX = %r{\Ahttps://[a-z0-9]+\.gitlab\.com\z}
+ VERSION = File.read(root.join("VERSION")).strip.freeze
+
def self.com?
# Check `gl_subdomain?` as well to keep parity with gitlab.com
Gitlab.config.gitlab.url == COM_URL || gl_subdomain?