2019-11-15 13:06:24 -05:00
|
|
|
# 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
|
2020-06-02 08:08:33 -04:00
|
|
|
Feature.get(:sourcegraph) # rubocop:disable Gitlab/AvoidFeatureGet
|
2019-11-15 13:06:24 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|