Skip to content
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

Check to see if local file exists before opening #6

Merged
merged 1 commit into from
Feb 27, 2013

Conversation

palexander
Copy link
Contributor

The RDF::Util::File.open_file method was throwing an exception when the local file did not exist. This modification will check to see if it exists, avoiding the exception and allowing open-uri to download the file.

I'm also getting errors when running the specs. Many of them look like formatting problems, EX:

40) JSON::LD test suite toRdf toRdf-0026-in.jsonld: Test creation of multiple types
Failure/Error: quads.sort.join("").should produce(sorted_expected, t.debug)
  Expected: _:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
  _:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .

  Actual  : _:t0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
  _:t0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .

gkellogg added a commit that referenced this pull request Feb 27, 2013
Check to see if local file exists before opening
@gkellogg gkellogg merged commit eac49cd into ruby-rdf:master Feb 27, 2013
@gkellogg
Copy link
Member

Thanks a lot! The need for this override may go away, due to recent changes in RDF.rb. There's also much more work to be done to sync up with recent spec changes, which I'm in the middle of, but am burried under a lot of other stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants