Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-04-12 21:39:08 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-04-13 00:30:11 +0300
commit2e13f6c326b920f1b78ca592dc1b938b62d5eef3 (patch)
treeb536c21c52bae383c19c2408f29ac451aa417273 /lib/gitlab.rb
parent2c9894d457cac2f15331081a4f6974e0803fead3 (diff)
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.
Diffstat (limited to 'lib/gitlab.rb')
-rw-r--r--lib/gitlab.rb3
1 files changed, 3 insertions, 0 deletions
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