Clever/clever-ruby — pull request #4 by carols10cents (2013-01-30 19:26:33+00:00)
Title: Ruby style

Most of these are just cleaning up the style/structure of the tests.

I also added VCR to record the http requests then play them back during tests. This makes the tests run faster, makes them more stable, and makes it possible to run the tests offline. We can also create different "cassettes" to simulate error conditions without having to be able to trigger those with the API live.

The biggest change is how to configure the API key; having a Configuration class and instance is a common pattern for ruby gems. There are reasons not to use @@ class variables, I'm not great at explaining them and I'm not sure if they're an issue in the latest versions of ruby, but they're enough to convince me to use classes and instance variables instead.

Thanks!!!