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
path: root/lib
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-08-25 07:44:51 +0300
committerNick Thomas <nick@gitlab.com>2018-08-25 07:44:51 +0300
commit26ea5437f17ce2a6546fbfd644b93b7f18896783 (patch)
tree7f1ddd0846d9515a7bb1714711be88d4b633f01e /lib
parentee2aaa29dd483a237b91aa46e9000e085b912e1e (diff)
parent7b7969bf15894660411d8ea53f4fa5101c6571b4 (diff)
Merge branch '50345-hashed-storage-feature-flag' into 'master'
Feature flag to disable Hashed Storage migration when renaming a repository Closes #50345 See merge request gitlab-org/gitlab-ce!21291
Diffstat (limited to 'lib')
-rw-r--r--lib/feature.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/feature.rb b/lib/feature.rb
index 09c5ef3ad94..24dbcb32fc0 100644
--- a/lib/feature.rb
+++ b/lib/feature.rb
@@ -47,7 +47,8 @@ class Feature
end
def disabled?(key, thing = nil)
- !enabled?(key, thing)
+ # we need to make different method calls to make it easy to mock / define expectations in test mode
+ thing.nil? ? !enabled?(key) : !enabled?(key, thing)
end
def enable(key, thing = true)