gamache/hyperresource — pull request #18 by gamache (2014-01-22 01:05:43+00:00)
Title: 0.9

The next version of HyperResource to be released will be 0.9.0. This is a big jump from the current 0.2.1, but it better reflects HR's closeness to 1.0-quality and intentions to standardize its interface for a while. (And anyway, there were four versions before 0.1 that no one saw but me.)

I'm going to leave this pull request open, in case people would like to watch progress.

Changes from 0.2.1:

* **Automatic method creation doesn't happen anymore.** `method_missing` now handles all method calls for link, object, and attribute names. Creating instance methods on the resource's class was error-prone, it could violate the principle of HATEOAS by misleading the end user about links or attributes or objects that don't exist on a particular resource, and most egregiously of all, it completely busts Ruby's method resolution cache, causing absolutely all method calls to incur a ~1ms penalty the first time they're called after the cache is cleared. `method_missing` has always done a fine job; removing `_hr_create_methods!` improves real world performance and simplifies the HR code.