[PATCH aeolus-image 0/1] Compatibility with ActiveResource >= 3.1
jstransk at redhat.com
jstransk at redhat.com
Wed Aug 22 11:40:46 UTC 2012
This changes Aeolus::Image::Factory::* resources to be compatible with
ActiveResource 3.1 and higher. It changes the way
Aeolus::Image::Factory::*.new() method behaves.
The initialization process of the resource changes only if these conditions are
met:
* Second parameter, the `persisted` flag, is not set manually when calling the
constructor. (The second parameter in constructor is available only for
ActiveResource >= 3.1.)
* First parameter, the hash of attributes, contains `:id` key.
* ActiveResource version is >= 3.1.
When the above conditions are met, the instantiated resource is treated as
"persisted" and an attempt to save it generates a PUT request.
Tests (Conductor specs & cukes, aeolus-image specs) on F16 + system gems all
green. (This setup uses ARes 3.0.)
Tests on F17 + bundled gems not all green, but fails seem unrelated to the
patch. (This setup uses ARes 3.2.)
Manually tested with mock provider.
More information about the aeolus-devel
mailing list