diff --git a/config/application.yml.example b/config/application.yml.example index 99b8bf4fe8..2b93ead158 100644 --- a/config/application.yml.example +++ b/config/application.yml.example @@ -60,4 +60,11 @@ SMTP_PASSWORD: 'f00d' # STRIPE_CLIENT_ID: "ca_xxxx" # This can be a development ID or a production ID # STRIPE_ENDPOINT_SECRET: "whsec_xxxx" +# Feature toggles +# +# Adding user emails separated by commas will enable them the use of certain features. See +# config/initializers/feature_toggles.rb for details. +# +# BETA_TESTERS: ofn@example.com,superadmin@example.com + MEMCACHED_VALUE_MAX_MEGABYTES: '4' diff --git a/config/initializers/feature_toggles.rb b/config/initializers/feature_toggles.rb new file mode 100644 index 0000000000..13d083979c --- /dev/null +++ b/config/initializers/feature_toggles.rb @@ -0,0 +1,5 @@ +require 'open_food_network/feature_toggle' + +beta_testers = ENV['BETA_TESTERS']&.split(/[\s,]+/) + +OpenFoodNetwork::FeatureToggle.enable(:customer_balance, beta_testers)