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:
authorRémy Coutable <remy@rymai.me>2017-12-14 03:26:07 +0300
committerRémy Coutable <remy@rymai.me>2017-12-14 04:11:11 +0300
commitb51e6d6ddc7bf9ffdb9d82debfeaee4942e01659 (patch)
tree5582cf96be9b7d166d89a842125120b198687bab /lib/feature.rb
parent54c2d7bdbddc18953571ed928948c18471d6edfa (diff)
Update flipper to 0.11.0 and take advantage of the new features
- Added an ActiveSupport (using Rails.cache) caching adapter - Overview of the new features can be found at https://johnnunemaker.com/flippin-features-at-runtime/ - Full Changelog can be found at https://github.com/jnunemaker/flipper/blob/v0.11.0/Changelog.md Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/feature.rb')
-rw-r--r--lib/feature.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/feature.rb b/lib/feature.rb
index ac3bc65c0d5..8e9ba5c530a 100644
--- a/lib/feature.rb
+++ b/lib/feature.rb
@@ -1,5 +1,3 @@
-require 'flipper/adapters/active_record'
-
class Feature
# Classes to override flipper table names
class FlipperFeature < Flipper::Adapters::ActiveRecord::Feature
@@ -62,12 +60,7 @@ class Feature
end
def flipper
- @flipper ||= begin
- adapter = Flipper::Adapters::ActiveRecord.new(
- feature_class: FlipperFeature, gate_class: FlipperGate)
-
- Flipper.new(adapter)
- end
+ @flipper ||= Flipper.instance
end
# This method is called from config/initializers/flipper.rb and can be used