-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove "ovirt-engine" prefix from paths #55
Remove "ovirt-engine" prefix from paths #55
Conversation
@bdunne, @blomquisg, @pkliczewski, please review. This is needed in order to fix the integration with version 4 of the engine when using targeted refresh. Note that we also need a change in the provider in order to calculate correctly the Once this is merged we will need a new release of the gem. |
The travis build for Ruby 1.9.3 failed with the following error:
I think it isn't related to this PR. |
API_PATH = "/ovirt-engine/api" | ||
|
||
it "removes slash" do | ||
allow(service).to receive(:base_uri).and_return(BASE_URI) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can share similar test setup in a before
block in this context. I'd prefer the allow
to be an expect
since we know that it will be called and should only be called once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the advice Brandon, I addressed it in the new version of the PR.
@bdunne, @blomquisg, the Travis build is failing for Ruby 1.9.3 because it detects that one of the dependencies (mime-types) requires Ruby version >= 2.0. Does it make sense to keep testing this gem with Ruby 1.9.3 when ManageIQ itself already requires Ruby 2.2? |
Thanks @bdunne, I will rebase once that is merged. |
@bdunne, rebased. |
@bdunne the Travis build is failing now because coincidentally I see that ManageIQ itself requires 5.0.x, from git, it should probably be updated to require the gem, now that it is released. I'd suggest that we exclude all Ruby versions older than 2.2.2 from the Travis builds. |
I have added to this PR a commit to remove from the Travis configuration the versions of Ruby older than 2.2.2. That should probably be part of a different PR, but I just want to check that everything works correctly. If required, I will move that patch to a different PR, later. |
@bdunne, the build works correctly with Ruby 2.2.2 and Ruby 2.3.1. Do you want a separate PR to remove older versions? Or should we address this issue in a different way? |
@bdunne, any chance we can merge this and do a new release of the gem before we decide how to better resolve the issue with Rails 5 and activesupport? |
The path passed to the "api_uril" method will have the "/api" prefix if it is extracted from the "ems_ref" attribute stored in the database, and will have the "/ovirt-engine/api" if it comes directly from the "href" attribute of the XML documents, for example when using the "relationships" method to fetch secondary objects related to the primary object. This means that to have a clean path we need to remove both "ovirt-engine" and "api". Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
Removed the patch that changes the Travis configuration, only the original patch remains. |
The path passed to the "api_uri" method will have the "/api" prefix if it is
extracted from the "ems_ref" attribute stored in the database, and will have
the "/ovirt-engine/api" if it comes directly from the "href" attribute of the
XML documents, for example when using the "relationships" method to fetch
secondary objects related to the primary object. This means that to have a
clean path we need to remove both "ovirt-engine" and "api".
https://bugzilla.redhat.com/show_bug.cgi?id=1352967