From d3d0e3dd5de9d00cbb6c8f2ec3c82bfdbb146ff3 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Mon, 13 Jun 2016 17:43:29 -0400 Subject: Update `Gitlab.com?` to support staging --- lib/gitlab.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/gitlab.rb') 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 -- cgit v1.2.1