Merge branch 'add-dev-check-back-for-deprecations' into 'master'

Add .org? method to Gitlab helper

See merge request gitlab-org/gitlab-ce!18429
This commit is contained in:
Rémy Coutable 2018-04-17 15:31:54 +00:00
commit c11e15bc7c

View file

@ -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