tyrauber/census_api — pull request #2 by beechnut (2013-07-11 16:00:45+00:00)
Title: Check for valid API key, dataset as an attribute

This is an awesome start of a gem, and I'm looking to contribute to make it more human-friendly.

+ `Client#initialize` uses hash to initialize dataset (SF1, ACS5, what have you)
+ `Client#initialize` if it's passed an invalid API key
+ Dataset is a malleable attribute of the client, so:
+ the user doesn't have to pass it for every request
+ the user can change it when desired
+ Made gem's file loading dependent on the lib/census_api directory, instead of the previous Array

I updated the spec to reflect these changes, but tests are failing because of the pre-initialization RestClient request that VCR doesn't know what to do with. I'm not familiar enough with VCR to debug this at present.