Commit c11e15bc authored by Rémy Coutable's avatar Rémy Coutable

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

Add .org? method to Gitlab helper

See merge request gitlab-org/gitlab-ce!18429
parents 606ed05e f39a7af0
...@@ -10,11 +10,15 @@ module Gitlab ...@@ -10,11 +10,15 @@ module Gitlab
Gitlab.config.gitlab.url == COM_URL || gl_subdomain? Gitlab.config.gitlab.url == COM_URL || gl_subdomain?
end end
def self.org?
Gitlab.config.gitlab.url == 'https://dev.gitlab.org'
end
def self.gl_subdomain? def self.gl_subdomain?
SUBDOMAIN_REGEX === Gitlab.config.gitlab.url SUBDOMAIN_REGEX === Gitlab.config.gitlab.url
end end
def self.dev_env_or_com? def self.dev_env_or_com?
Rails.env.test? || Rails.env.development? || com? Rails.env.test? || Rails.env.development? || org? || com?
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment