no-reply/Ruby-EZID — pull request #1 by terrellt (2013-03-15 00:00:48+00:00)
Title: Refactor for Ruby-isms

# Backwards Incompatible

This is a pretty distinct refactor of the API to allow for fewer queries against the API as well as add a test suite. Calling mint, create, or get now returns an Ezid::Record object (to accomplish this mint/create now hits the API twice - once to actually create the object, and again to get the object back), whose properties you can set via record[property] =. Those properties are then bulk-sent to the API via record.save. If you want to get an updated record (to get the new _updated field, for instance), you can call record.reload.

One of the big things that'll have to be dealt with is how exceptions are handled - I raise a basic exception in one place, but it'd likely be good to instead have a custom exception object that handles errors on the response - something that can probably be dealt with in Ezid::ServerResponse (which now gets returned on an error).