Hi all,
This patch adds support for OAuth to our Image Factory client which uses Active Resource. I also added some basic tests.
A few things I'd like to call attention to:
- My goal was to monkey-patch Active Resource to add OAuth support[1]. Doing so meant that I had to duplicate a handful of lines of code from Active Resource into our project. It would be fantastic if someone more familiar with the ASL (used for aeolus-image-rubygem) and the MIT license (under which Active Resource is released) could confirm that this is kosher before I commit this code. We could also just license this module under the MIT license if that would avoid a licensing headache.
- This patch adds vcr, webmock, and timecop dependencies, as I mocked out our requests to Image Factory. I updated the RPM spec to this effect. (All three dependencies are already required by aeolus-conductor-devel.) Does it make sense to consider a -devel version of aeolus-image-rubygem as well so that these dependencies aren't pushed mainstream? (Or else, shall I add them to %check in the RPM spec?) I incremented the version in the RPM spec.
Best, Matt
[1] I highly doubt that a patch adding OAuth support to Active Resource would be accepted upstream, as it would introduce a dependency on the oauth gem to a core component of Rails.