|
| 1 | +# frozen_string_literal: true |
| 2 | + |
| 3 | +Rails.application.configure do |
| 4 | + ## Memoization ensures that only one adapter call is made per feature per request. |
| 5 | + ## For more info, see https://www.flippercloud.io/docs/optimization#memoization |
| 6 | + # config.flipper.memoize = true |
| 7 | + |
| 8 | + ## Flipper preloads all features before each request, which is recommended if: |
| 9 | + ## * you have a limited number of features (< 100?) |
| 10 | + ## * most of your requests depend on most of your features |
| 11 | + ## * you have limited gate data combined across all features (< 1k enabled gates, like individual actors, across all features) |
| 12 | + ## |
| 13 | + ## For more info, see https://www.flippercloud.io/docs/optimization#preloading |
| 14 | + # config.flipper.preload = true |
| 15 | + |
| 16 | + ## Warn or raise an error if an unknown feature is checked |
| 17 | + ## Can be set to `:warn`, `:raise`, or `false` |
| 18 | + # config.flipper.strict = Rails.env.development? && :warn |
| 19 | + |
| 20 | + ## Show Flipper checks in logs |
| 21 | + # config.flipper.log = true |
| 22 | + |
| 23 | + ## Reconfigure Flipper to use the Memory adapter and disable Cloud in tests |
| 24 | + # config.flipper.test_help = true |
| 25 | + |
| 26 | + ## The path that Flipper Cloud will use to sync features |
| 27 | + # config.flipper.cloud_path = "_flipper" |
| 28 | + |
| 29 | + ## The instrumenter that Flipper will use. Defaults to ActiveSupport::Notifications. |
| 30 | + # config.flipper.instrumenter = ActiveSupport::Notifications |
| 31 | +end |
| 32 | + |
| 33 | +Flipper.configure do |config| |
| 34 | + ## Configure other adapters that you want to use here: |
| 35 | + ## See http://flippercloud.io/docs/adapters |
| 36 | + # config.use Flipper::Adapters::ActiveSupportCacheStore, Rails.cache, expires_in: 5.minutes |
| 37 | +end |
| 38 | + |
| 39 | +## Register a group that can be used for enabling features. |
| 40 | +## |
| 41 | +## Flipper.enable_group :my_feature, :admins |
| 42 | +## |
| 43 | +## See https://www.flippercloud.io/docs/features#enablement-group |
| 44 | +# |
| 45 | +# Flipper.register(:admins) do |actor| |
| 46 | +# actor.respond_to?(:admin?) && actor.admin? |
| 47 | +# end |
0 commit comments