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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a54a768d6acdfe00c681217b0c49d86d6bc0e5f8
4
- data.tar.gz: 3738bfe3bd6920f6155137eb8e7caed5e06b570a
3
+ metadata.gz: 5004a2bfbcbc8d75238b755771340ebbe325a241
4
+ data.tar.gz: 40cad14298f7929b642bcd99aaca635c4a157fc0
5
5
  SHA512:
6
- metadata.gz: 4a4edd776f047c8f681fe7b5986b0a10f7f1bf97464a5d2bcb01fc2d77d3d2ad6ff26ba4a62e9ef48abbefd6e53de6e47336eec3b2ccff90c1a224cbf813fba3
7
- data.tar.gz: b4747c74b5ff099d537b0311657ad53cf29deb775c3329be4a02741b17cea5e5615b48e79c6c14551248eaa9fc3d6d64f54dd97e8c11f4df2b3f403f4ee4dcfe
6
+ metadata.gz: cf72942195654605441c0820d74d5f58a3cc7ef5b964cab32bf311863ebe906c1244b2de605a1de6525c4746fe336443ac24bae27b001ef1007b3312c315be1e
7
+ data.tar.gz: efa7a8565340a01d43b0273547b48bf33aee0fafdfe1f4e20b6d6d8c1acf28a69dc5aa1a2c7ab3cdb30caca7be4d551321313143543b3ecb45035b0ab3fce7b2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0.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, "expected end of statement in line #{lineno}: #{current_line.inspect}"
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, "prefix #{ns.inspect} is not defined" unless pfx_iri
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, "invalid PName"
68
+ raise RDF::ReaderError.new("ERROR [line #{lineno}] invalid PName", lineno: lineno)
69
69
  end
70
70
 
71
71
  ##
@@ -315,9 +315,12 @@ module RDF::Turtle
315
315
  end
316
316
  end
317
317
  end
318
- rescue EBNF::LL1::Parser::Error => e
319
- progress("Parsing completed with errors:\n\t#{e.message}")
320
- raise RDF::ReaderError, e.message if validate?
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.0.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-18 00:00:00.000000000 Z
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.2
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.2
40
+ version: 0.3.5
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: open-uri-cached
43
43
  requirement: !ruby/object:Gem::Requirement