summaryrefslogtreecommitdiff
path: root/lib/gitlab.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-06-13 17:43:29 -0400
committerRobert Speicher <rspeicher@gmail.com>2016-06-27 15:10:36 -0400
commitd3d0e3dd5de9d00cbb6c8f2ec3c82bfdbb146ff3 (patch)
treea5b8b50a42cc5e02a612ac2cc63ff52b8b221eb0 /lib/gitlab.rb
parent298e4ece30bf0f5d7fefd0314c923ae18715338c (diff)
downloadgitlab-ce-d3d0e3dd5de9d00cbb6c8f2ec3c82bfdbb146ff3.tar.gz
Update `Gitlab.com?` to support stagingrs-gitalb-com-staging
Diffstat (limited to 'lib/gitlab.rb')
-rw-r--r--lib/gitlab.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/gitlab.rb b/lib/gitlab.rb
index 37f4c34054f..c3064163e07 100644
--- a/lib/gitlab.rb
+++ b/lib/gitlab.rb
@@ -2,6 +2,11 @@ require_dependency 'gitlab/git'
module Gitlab
def self.com?
- Gitlab.config.gitlab.url == 'https://gitlab.com'
+ # Check `staging?` as well to keep parity with gitlab.com
+ Gitlab.config.gitlab.url == 'https://gitlab.com' || staging?
+ end
+
+ def self.staging?
+ Gitlab.config.gitlab.url == 'https://staging.gitlab.com'
end
end