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
Previously, the model was being incorrectly loaded from request data. As a
result, the username and apiKey properties were always nil. This fixes parsing
and improves the tests to catch this type of bug in the future.
In many places we were checking for identity which was the shorthand for
checking if the resource had been saved by the service.
The #persisted? method was added to show a clearer intent and also offer
minimal ActiveModel interface