From 2e13f6c326b920f1b78ca592dc1b938b62d5eef3 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Tue, 12 Apr 2016 14:39:08 -0400 Subject: Add `Gitlab.com?` method To be used as a feature flag for GitLab.com-only features, such as welcome emails. We will be careful to only use this to disable features or functionality that do not make sense for any installations that aren't GitLab.com. We will not use this to restrict features from other installations or keep them "exclusive" to GitLab.com. --- lib/gitlab.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/gitlab.rb') diff --git a/lib/gitlab.rb b/lib/gitlab.rb index 6108697bc20..7479e729db1 100644 --- a/lib/gitlab.rb +++ b/lib/gitlab.rb @@ -1,4 +1,7 @@ require 'gitlab/git' module Gitlab + def self.com? + Gitlab.config.gitlab.url == 'https://gitlab.com' + end end -- cgit v1.2.3