1.4 KiB
Flaggle Rock
Flaggle Rock is a simple feature flagging gem for use with Ruby on Rails applications.
It is designed for easily hiding features from end users to help enable a fast-moving CI workflow. It currently does not aim to support more advanced features such as A/B testing.
Installation
Add Flaggle Rock to your Gemfile:
gem "flaggle_rock"
And install
bundle install
Generate the migrations, and run them to add feature flags to your database:
bundle exec rails generate flaggle_rock:install
bundle exec rails db:migrate
Usage
All flags are off by default. There is no need to explicitly create a new flag—turning it on will do this.
To enable/disable a flag:
Rock.on(:flag_name)
Rock.off(:flag_name)
To check whether a flag is on:
Rock.on?(:flag_name)
Rock.off?(:flag_name)
To remove a flag which is no longer used:
Rock.delete(:flag_name)
To remove all disabled flags:
Rock.delete_all_disabled
Future
Goals with Flaggle Rock include the creation of a web UI for easily administering flags.
Compatibility
Flaggle Rock has been tested with Rails 7 and PostgreSQL 11, but should work with older versions of Rails and other database engines.
License
Flaggle Rock is released under the MIT License.