fog/fog — pull request #2043 by bfosberry (2013-08-07 14:19:13+00:00)
Title: Protect against missing fields in rackspace endpoint documents

This PR will prevent catastrophic failure when building a list of endpoints where some endpoints have missing fields.

In a specific case a rackspace api endpoint returned no region key

'{"tenantId"=>"654557", "publicURL"=>"https://backup.api.rackspacecloud.com/v1.0/654557"}'

As a guard against this case, this commit sets the region to be global
should it not be defined in the endpoint hash

This is the simplest fix possible, we could expand it to validate keys, have defaults etc.