Closed nvdk closed 8 years ago
Several specs fail as a result of this change. Generally, a pull request should include spec updates to test that the feature works correctly and that code coverage is adequate.
Understood, if you agree with approach I will update the required specs accordingly. On 7 Jun 2016 17:03, "Gregg Kellogg" notifications@github.com wrote:
Several specs fail as a result of this change. Generally, a pull request should include spec updates to test that the feature works correctly and that code coverage is adequate.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ruby-rdf/sparql-client/pull/66#issuecomment-224309300, or mute the thread https://github.com/notifications/unsubscribe/AA1oXvzZgyiBHSuP13-BRvmOBIkFeF-gks5qJYgngaJpZM4IvrKo .
I think it's reasonable to fail with an exception if now reader is found, although this would seem to be avoidable, as the request is made with the set of mime-types available to the client, which should be used by the server when encoding the response, but it may not, in which case failing with an exception would be good. It might be a form of RDF::ReaderError
, rather than ArgumentError
.
I've updated the specs where appropriate, for the two remaining failing tests I believe I'm running into a bug in parse_rdf_serialization.
when querying a remote endpoint should handle successful response with overridden plain header
Tries to load an Rdf::Reader for turtle, which is not present as sparql/client currently does not depend on the rdf-turtle gem.
However I think it should actually use a reader based on the returned content-type and not the requested one.
when querying a remote endpoint should handle successful response with custom headers
Similar issue, RDF::Reader.for({:headers=>{"Authorization"=>"Basic XXX=="}})
actually returns nil, again the returned content type should be passed to RDF::Reader.for and not the configured options.
as this has become a bit of a mess I split it up in two new pull requests, please review #67 and #68.
Currently sparql-client will silently fail with a nil if no suitable rdf reader is found. This can lead to the awkward situation where a nil is returned for the query and the user has to find out what is causing it. This pull request tries to quicken this debugging proces by at least indicating the point of failure by raising a descriptive error.