From 5b44097cf7a20a6bcdc38ac9ed43aac0ec33415e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Mon, 23 Apr 2018 13:02:07 +0200 Subject: Address latest feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- lib/gitlab.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/gitlab.rb') 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? -- cgit v1.2.3