README.md in airbrake_proxy-0.1.1 vs README.md in airbrake_proxy-0.1.2

- old
+ new

@@ -6,11 +6,11 @@ [![Dependency Status](https://gemnasium.com/FinalCAD/airbrake_proxy.png)](https://gemnasium.com/FinalCAD/airbrake_proxy) [![Build Status](https://travis-ci.org/FinalCAD/airbrake_proxy.png?branch=master)](https://travis-ci.org/FinalCAD/airbrake_proxy) (Travis CI) -[![Coverage Status](https://coveralls.io/repos/FinalCAD/airbrake_proxy/badge.png)](https://coveralls.io/r/FinalCAD/airbrake_proxy) +[![Coverage Status](https://coveralls.io/repos/github/FinalCAD/airbrake_proxy/badge.svg?branch=master)](https://coveralls.io/github/FinalCAD/airbrake_proxy?branch=master) Basic Circuit Breaker to attempt not reach Airbrake limit for the same exception ## Installation @@ -18,19 +18,42 @@ ```ruby gem 'airbrake_proxy' ``` +Please add a config file on your project. + +Rails sample + +`config/initializers/airbrake_proxy.rb` + +```ruby +AirbrakeProxy.configure do |conf| + conf.redis = Resque.redis + conf.logger = Rails.logger +end +``` + +in `spec/spec_helper.rb` or `spec/rails_helper.rb` + +```ruby +AirbrakeProxy.configure do |conf| + conf.redis = MockRedis.new + conf.logger = Logger.new($stderr) +end +``` + And then execute: $ bundle Or install it yourself as: $ gem install airbrake_proxy ## Usage +Simply use `AirbrakeProxy.notify(exception)` in your code instead of `Airbrake.notify exception` ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.