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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-15 21:06:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-15 21:06:24 +0300
commiteca3cd3a9e7d9ea680086cad8150050ec8cdef3f (patch)
treec3d262e0d8e721fc138c2d617f501fb09876f1b6 /lib/gitlab/sourcegraph.rb
parent6e81d7f6283fae1b22f66b9d9b133243921cbd9e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/sourcegraph.rb')
-rw-r--r--lib/gitlab/sourcegraph.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/gitlab/sourcegraph.rb b/lib/gitlab/sourcegraph.rb
new file mode 100644
index 00000000000..d0f12c8364a
--- /dev/null
+++ b/lib/gitlab/sourcegraph.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+module Gitlab
+ class Sourcegraph
+ class << self
+ def feature_conditional?
+ feature.conditional?
+ end
+
+ def feature_available?
+ # The sourcegraph_bundle feature could be conditionally applied, so check if `!off?`
+ !feature.off?
+ end
+
+ def feature_enabled?(thing = nil)
+ feature.enabled?(thing)
+ end
+
+ private
+
+ def feature
+ Feature.get(:sourcegraph)
+ end
+ end
+ end
+end