ruby-rdf / sparql-client

SPARQL client for Ruby.
http://rubygems.org/gems/sparql-client
The Unlicense
112 stars 58 forks source link

Fix for issues with the alternative endpoint override #72

Closed cecton closed 8 years ago

cecton commented 8 years ago

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.

cecton commented 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 )

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.3%) to 94.61% when pulling 82530b90895a1c17fea4d85f08c23cc08e3324d7 on cecton:fix-alt-endpoint into 9f173a59ad4363d676d1aa64e1e3328ca969597c on ruby-rdf:develop.

gkellogg commented 8 years ago

The failure is JRuby's It should be added to the allow_failures in the .travis.yml file.

cecton commented 8 years ago

Ok :) should I make a change in the travis.yml?

no-reply commented 8 years ago

@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.