RCurtain
Easy way to control your features using redis.
Installation
Add this line to your application's Gemfile:
gem 'rcurtain'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install rcurtain
Usage
Rcurtain uses redis to control features, which can be checked by a percentage or a set of users.
feature:[name-of-feature]:percentage
feature:[name-of-feature]:users
To use Rcurtain, create a new object Rcurtain using your redis URL. (password@ip:port/database)
rcurtain = Rcurtain.new("redis://:[email protected]:6380/15")
Consult if a feature is opened using the method "opened?", passing the name of the feature you want to check.
rcurtain.opened? "feature"
You can also pass a set of users to be checked.
rcurtain.opened? ("feature", ['user-1','user-2'])
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/moip/rcurtain. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
- Fork it ( https://github.com/moip/rcurtain/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
License
The gem is available as open source under the terms of the MIT License.