fog/fog — pull request #1535 by minter (2013-01-31 02:14:22+00:00)
Title: Add support for pulling in >100 zones via Zones.each.

This patch was inspired by the comments to #1172.

Uses the hypermedia links returned by the response body to determine whether or not there are more results available. If so, it loops over those until there is no more "next" link, indicating the last set of results.

It feels like this code could be a little cleaner, but I'm using both the "domains" body subset as well as the "links" one, which makes it different than Zones.all.

And I could probably use more test guidance, @brianhartsock - I didn't know if the proper way to do this would be to create 100+ dummy domains in testing (seemed like overkill).

But it fills a need that I have to iterate over all 300+ domains in an account, and I've used it locally to do work, so the code itself seems solid.