ruby-rdf / rdf-ldp

A suite of LDP software and middleware for RDF.rb & Rack
The Unlicense
13 stars 2 forks source link

Clean up Rack input stream handling #59

Closed no-reply closed 8 years ago

no-reply commented 8 years ago

The parser methods used to try to handle Strings, as well as valid Rack inputs. This led to some unnecessary complexity, giving rise to errors like those seen in #56. This refactors to handle only IO-like Rack Input streams.

Most of the work here is just to reorganize the tests.

There is an odd case where RDFSource#update feeds the IO stream before trying to parse a graph. For now, we aggressively #rewind the stream in #parse_graph to this problem. This might be unduely costly, and there is probably a better fix in the long run.


The later commits introduce Rack::Lint and deal with a few issues found by running the existing tests and the W3C suite with those in place.

no-reply commented 8 years ago

Closes #56 and replaces #57.

no-reply commented 8 years ago

Closes #58