Closed cecton closed 8 years ago
(I don't know if the failure of the CI on jruby is my fault? https://travis-ci.org/ruby-rdf/sparql-client/jobs/155090646 )
The failure is JRuby's It should be added to the allow_failures in the .travis.yml file.
Ok :) should I make a change in the travis.yml?
@cecton Thanks for this. Looks good to me.
I really don't like our odd internal state changes to @alt_endpoint
and might look at refactoring that out. Due to that awkward complexity, I want to test against some of the dependent gems to make sure this doesn't have odd side effects for them.
I think the travis configuration is already correct, and CI seems to have passed, despite the failed JRuby builds.
The alternative endpoint is set optionally in the update method if an endpoint is provided in the options. If the next call doesn't provide an alternative endpoint, it should use the instance's configured endpoint.
Also: a call to the query method may use the make_post_request method. We should make sure to not keep any previous alternative endpoint.
Note: this commit not only fix the current issues with the alternative endpoints, it also implements a new functionality: the possibility to override the configured endpoint when calling the query method.