summaryrefslogtreecommitdiff
path: root/lib/gitlab.rb
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2018-04-17 11:21:03 -0300
committerOswaldo Ferreira <oswaldo@gitlab.com>2018-04-17 11:21:03 -0300
commitf39a7af0f7a7521957bc0736dcabbf0faa467a89 (patch)
tree310fd7b218fde5f1b1fcc8152ad48b58fbfe1547 /lib/gitlab.rb
parent08083f43cb8ff6b5d83e998fd96159f717aa181f (diff)
downloadgitlab-ce-f39a7af0f7a7521957bc0736dcabbf0faa467a89.tar.gz
Add .org? method to Gitlab helper
dev_env_or_com? now considers dev.gitlab.org
Diffstat (limited to 'lib/gitlab.rb')
-rw-r--r--lib/gitlab.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab.rb b/lib/gitlab.rb
index 2526a870976..f6629982512 100644
--- a/lib/gitlab.rb
+++ b/lib/gitlab.rb
@@ -10,11 +10,15 @@ module Gitlab
Gitlab.config.gitlab.url == COM_URL || gl_subdomain?
end
+ def self.org?
+ Gitlab.config.gitlab.url == 'https://dev.gitlab.org'
+ end
+
def self.gl_subdomain?
SUBDOMAIN_REGEX === Gitlab.config.gitlab.url
end
def self.dev_env_or_com?
- Rails.env.test? || Rails.env.development? || com?
+ Rails.env.test? || Rails.env.development? || org? || com?
end
end