rdf-turtle 1.1.0.1 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rdf/turtle/freebase_reader.rb +3 -3
- data/lib/rdf/turtle/reader.rb +6 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5004a2bfbcbc8d75238b755771340ebbe325a241
|
4
|
+
data.tar.gz: 40cad14298f7929b642bcd99aaca635c4a157fc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf72942195654605441c0820d74d5f58a3cc7ef5b964cab32bf311863ebe906c1244b2de605a1de6525c4746fe336443ac24bae27b001ef1007b3312c315be1e
|
7
|
+
data.tar.gz: efa7a8565340a01d43b0273547b48bf33aee0fafdfe1f4e20b6d6d8c1acf28a69dc5aa1a2c7ab3cdb30caca7be4d551321313143543b3ecb45035b0ab3fce7b2
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.1
|
@@ -24,7 +24,7 @@ module RDF::Turtle
|
|
24
24
|
predicate = read_pname(:intern => true) || fail_predicate
|
25
25
|
object = read_pname || read_uriref || read_boolean || read_numeric || read_literal || fail_object
|
26
26
|
if validate? && !read_eos
|
27
|
-
raise RDF::ReaderError
|
27
|
+
raise RDF::ReaderError.new("ERROR [line #{lineno}] Expected end of statement (found: #{current_line.inspect})", lineno: lineno)
|
28
28
|
end
|
29
29
|
return [subject, predicate, object]
|
30
30
|
end
|
@@ -59,13 +59,13 @@ module RDF::Turtle
|
|
59
59
|
@line.insert(0, ".")
|
60
60
|
end
|
61
61
|
pfx_iri = prefix(ns)
|
62
|
-
raise RDF::ReaderError
|
62
|
+
raise RDF::ReaderError.new("ERROR [line #{lineno}] prefix #{ns.inspect} is not defined", lineno: lineno) unless pfx_iri
|
63
63
|
uri = RDF::URI(pfx_iri + suffix)
|
64
64
|
uri.validate! if validate?
|
65
65
|
uri
|
66
66
|
end
|
67
67
|
rescue ArgumentError => e
|
68
|
-
raise RDF::ReaderError
|
68
|
+
raise RDF::ReaderError.new("ERROR [line #{lineno}] invalid PName", lineno: lineno)
|
69
69
|
end
|
70
70
|
|
71
71
|
##
|
data/lib/rdf/turtle/reader.rb
CHANGED
@@ -315,9 +315,12 @@ module RDF::Turtle
|
|
315
315
|
end
|
316
316
|
end
|
317
317
|
end
|
318
|
-
rescue EBNF::LL1::Parser::Error => e
|
319
|
-
|
320
|
-
|
318
|
+
rescue EBNF::LL1::Parser::Error, EBNF::LL1::Lexer::Error => e
|
319
|
+
if validate?
|
320
|
+
raise RDF::ReaderError.new(e.message, lineno: e.lineno, token: e.token)
|
321
|
+
else
|
322
|
+
$stderr.puts e.message
|
323
|
+
end
|
321
324
|
end
|
322
325
|
|
323
326
|
##
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf-turtle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregg Kellogg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdf
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.3.
|
33
|
+
version: 0.3.5
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.3.
|
40
|
+
version: 0.3.5
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: open-uri-cached
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|