No commit activity in last 3 years
No release in over 3 years
DynamoDB storage adapter for Rollout
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6.0
~> 1.7
~> 0.77
~> 10.0
~> 3.2
~> 1.20

Runtime

~> 1.28
~> 2.0
 Project Readme

DynamoDB storage adapter for Rollout

This is a storage adapter for Rollout that uses DynamoDB. Rollout allows you to flip feature flags around in a reasonable way.

I wrote this adapter for those who either don't want to stand up a new redis instance or introduce a new single point of failure into their architecture.

Build Status

Installation

Add this line to your application's Gemfile:

gem 'rollout-dynamodb'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rollout-dynamodb

Usage

$storage = Rollout::DynamoDB::Storage.new(aws_access_key, aws_secret_key, aws_table_name, aws_region)
$rollout = Rollout.new($storage)

$rollout.active?(:chat)
# -> false
$rollout.activate(:chat)
# -> {}
$rollout.active?(:chat)
# -> true

Testing

You might want to test this code. You can get started like so:

foreman run rake

Note that there are integration tests bundled in with the specs. If you want to run them, follow the steps below, otherwise they will be skipped.

  1. Go to the AWS console for DynamoDB

  2. Create a new table, indexed by hash key named id of type String

  3. Set up the environment

    mv .env.test .env
    $EDITOR .env  # set config vars

Contributing

  1. Fork it ( https://github.com/chooper/rollout-dynamodb/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request