Aeolus-image + upstream OAuth gem
Jiří Stránský
jstransk at redhat.com
Thu Aug 23 14:00:24 UTC 2012
Hi,
I'm trying to solve the upstream OAuth problem and I could use some opinions from people familiar with Aeolus-Image and OAuth.
There was a change in behavior in OAuth gem v0.4.6. I'm not entirely convinced whether the change should be considered a bug or a feature and whether the change is going to persist or be reverted later. (BTW Rawhide stays away from 0.4.6 as well and continues to ship 0.4.4 [1].)
Problem description:
--------------------
Our code interacting with OAuth is in this code block [2].
Our code generates resource paths including the site prefix, like
`/imagefactory/builders`
(The prefix would be present even if we used default ARes behavior and didn't override the path generation methods.)
The OAuth site for imagefactory is set in settings.yml to this:
`https://localhost:8075/imagefactory`
*OAuth 0.4.4 treats the resource path as full path* on the host and generates HTTP request to URL:
`https://localhost:8075/imagefactory/builders`
*OAuth 0.4.6 treats the resource path as relative to OAuth site URL* and generates this URL:
`https://localhost:8075/imagefactory/imagefactory/builders`
I'm not sure which OAuth behavior (0.4.4 vs. 0.4.6) is right. Does anyone have an opinion on this?
If 0.4.6 is the right behavior, we'll have to change our code [2] to work with it. Shouldn't be very hard, but worst case scenario is another dependency-version-specific code.
If 0.4.4 is the right behavior, we should stick to 0.4.4. This means fixing the OAuth dependency version in aeolus-image.gemspec XOR (if changing gemspec would cause some trouble I failed to predict now) fixing the OAuth dependency version in both Gemfiles (Conductor, Aeolus-Image).
Any opinions on which road to take are very welcome.
J.
[1] http://isitfedoraruby.com/fedorarpms/rubygem-oauth
[2] https://github.com/aeolusproject/aeolus-image-rubygem/blob/6801a52797adae91d141a59c6443b6e79dd56d52/lib/aeolus_image/active_resource_oauth_client.rb#L32
More information about the aeolus-devel
mailing list