Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.rdoc

Fail Whale

When developing rails applications that depend on external services we often don't have a way of simulating these service failing on development or staging boxes. Fail whale is designed randomly return failing web services while developing an application.

The gem is inspired by Netflix chaos monkey techblog.netflix.com/2011/07/netflix-simian-army.html

Current Status

No more than a shell gem project.

This is purely for here to define the project

Installing

gem :git => "git://github.com/pythonandchips/fail_whale.git", :ref => "HEAD"

Usage

add this to config/initializers/fail_whale.rb

FailWhale::Config do
  fail_on /api.twitter.com\/1\/statuses\/show.json?id=112652479837110273/ do
    with :status => :500, :return => {"errors":[{"message":"Sorry, something when wrong","code":34}]}
    with :status => :404, :return => {"errors":[{"message":"Sorry, that message cannot be found","code":34}]}
    with :timeout => 60
  end
end

Contributing to fail_whale

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.

  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.

  • Fork the project.

  • Start a feature/bugfix branch.

  • Commit and push until you are happy with your contribution.

  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2012 Colin Gemmell. See LICENSE.txt for further details.

About

Randomly make calls to web services fail during development

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.