diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab.rb | 9 | ||||
-rw-r--r-- | lib/settings.rb | 2 |
2 files changed, 7 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? diff --git a/lib/settings.rb b/lib/settings.rb index bc688eaf121..8bf087c76c3 100644 --- a/lib/settings.rb +++ b/lib/settings.rb @@ -1,3 +1,5 @@ +require 'settingslogic' + require_dependency 'gitlab' class Settings < Settingslogic |