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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 14:18:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 14:18:50 +0300
commit8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch)
treea77e7fe7a93de11213032ed4ab1f33a3db51b738 /lib/gitlab.rb
parent00b35af3db1abfe813a778f643dad221aad51fca (diff)
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'lib/gitlab.rb')
-rw-r--r--lib/gitlab.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/gitlab.rb b/lib/gitlab.rb
index f2bff51df38..43785d165fb 100644
--- a/lib/gitlab.rb
+++ b/lib/gitlab.rb
@@ -36,6 +36,7 @@ module Gitlab
end
COM_URL = 'https://gitlab.com'
+ STAGING_COM_URL = 'https://staging.gitlab.com'
APP_DIRS_PATTERN = %r{^/?(app|config|ee|lib|spec|\(\w*\))}.freeze
SUBDOMAIN_REGEX = %r{\Ahttps://[a-z0-9]+\.gitlab\.com\z}.freeze
VERSION = File.read(root.join("VERSION")).strip.freeze
@@ -47,6 +48,10 @@ module Gitlab
Gitlab.config.gitlab.url == COM_URL || gl_subdomain?
end
+ def self.staging?
+ Gitlab.config.gitlab.url == STAGING_COM_URL
+ end
+
def self.canary?
Gitlab::Utils.to_boolean(ENV['CANARY'])
end
@@ -75,6 +80,10 @@ module Gitlab
Rails.env.development? || com?
end
+ def self.dev_or_test_env?
+ Rails.env.development? || Rails.env.test?
+ end
+
def self.ee?
@is_ee ||=
# We use this method when the Rails environment is not loaded. This