envato/circuit_breaker — pull request #1 by simpsora (2014-08-05 05:24:08+00:00)
Title: Persistent state

1. Add `SharedState` module, moving the circuit state from an instance variable to a class variable in the mixed-into class.

1. Add new states, events and methods to support required behavior. Allows the enable/disable links in the UI to function.

1. Add in a Redis-backed failure state class, then move it to one which uses `Rails.cache` as the persistent backing store

1. Set the initial circuit state to the state described in the (persistent) failure state.

1. Various changes to fix failing specs.