rdf-spec 3.0.0 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -19
- data/UNLICENSE +1 -1
- data/VERSION +1 -1
- data/etc/artob.nq +6 -0
- data/etc/bhuga.nq +5 -6
- data/etc/doap.nt +79 -85
- data/etc/doap.ttl +46 -0
- data/etc/gkellogg.nq +6 -6
- data/etc/quads.nq +79 -85
- data/etc/triples.nt +79 -85
- data/lib/rdf/spec/enumerable.rb +26 -27
- data/lib/rdf/spec/http_adapter.rb +18 -0
- data/lib/rdf/spec/inspects.rb +3 -33
- data/lib/rdf/spec/literal.rb +1 -0
- data/lib/rdf/spec/matchers.rb +34 -28
- data/lib/rdf/spec/mutable.rb +11 -11
- data/lib/rdf/spec/queryable.rb +23 -23
- data/lib/rdf/spec/reader.rb +1 -1
- data/lib/rdf/spec/repository.rb +1 -2
- data/lib/rdf/spec/transactable.rb +2 -2
- data/lib/rdf/spec/transaction.rb +2 -2
- data/lib/rdf/spec/writer.rb +50 -23
- data/lib/rdf/spec.rb +17 -15
- data/spec/spec_helper.rb +9 -2
- data/spec/transaction_spec.rb +2 -1
- metadata +50 -22
- data/etc/bendiken.nq +0 -8
data/etc/quads.nq
CHANGED
@@ -1,88 +1,82 @@
|
|
1
|
-
_:
|
2
|
-
_:
|
3
|
-
_:
|
4
|
-
_:
|
5
|
-
_:
|
6
|
-
_:
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
<
|
29
|
-
<
|
30
|
-
<
|
31
|
-
<
|
32
|
-
<
|
33
|
-
<
|
34
|
-
<
|
35
|
-
<
|
36
|
-
<
|
37
|
-
<
|
38
|
-
<
|
39
|
-
<
|
40
|
-
<
|
41
|
-
<
|
42
|
-
|
43
|
-
<http://
|
44
|
-
<http://
|
45
|
-
<http://
|
46
|
-
|
47
|
-
<http://
|
48
|
-
|
49
|
-
|
50
|
-
<http://
|
51
|
-
|
52
|
-
|
53
|
-
<http://
|
54
|
-
|
55
|
-
<http://
|
56
|
-
<http://
|
57
|
-
<http://
|
58
|
-
<http://
|
59
|
-
<http://
|
60
|
-
<http://
|
61
|
-
<http://
|
62
|
-
<http://
|
63
|
-
<
|
64
|
-
<
|
65
|
-
<http://
|
66
|
-
<
|
67
|
-
<
|
68
|
-
<
|
69
|
-
<
|
70
|
-
<
|
71
|
-
<
|
72
|
-
<
|
73
|
-
<
|
74
|
-
<
|
75
|
-
<
|
76
|
-
<
|
77
|
-
<
|
78
|
-
<
|
79
|
-
<
|
80
|
-
<http://greggkellogg.net/foaf#me> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://greggkellogg.net/foaf#me> .
|
81
|
-
<http://greggkellogg.net/foaf#me> <http://xmlns.com/foaf/0.1/name> "Gregg Kellogg" <http://greggkellogg.net/foaf#me> .
|
82
|
-
<http://greggkellogg.net/foaf#me> <http://xmlns.com/foaf/0.1/mbox> <mailto:gregg@greggkellogg.net> <http://greggkellogg.net/foaf#me> .
|
83
|
-
<http://greggkellogg.net/foaf#me> <http://xmlns.com/foaf/0.1/mbox_sha1sum> "35bc44e6d0070e5ad50ccbe0d24403c96af2b9bd" <http://greggkellogg.net/foaf#me> .
|
84
|
-
<http://greggkellogg.net/foaf#me> <http://xmlns.com/foaf/0.1/homepage> <http://greggkellogg.net/> <http://greggkellogg.net/foaf#me> .
|
85
|
-
<http://greggkellogg.net/foaf#me> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://greggkellogg.net/foaf> <http://greggkellogg.net/foaf#me> .
|
1
|
+
_:g8160 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "c69f3255ff0639543cc5edfd8116eac8df16fab8" .
|
2
|
+
_:g8160 <http://xmlns.com/foaf/0.1/name> "Hellekin O. Wolf" .
|
3
|
+
_:g8160 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
4
|
+
_:g8200 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "2b4247b6fd5bb4a1383378f325784318680d5ff9" .
|
5
|
+
_:g8200 <http://xmlns.com/foaf/0.1/name> "Keita Urashima" .
|
6
|
+
_:g8200 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
7
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#programming-language> "Ruby" .
|
8
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#shortdesc> "A Ruby library for working with Resource Description Framework (RDF) data."@en .
|
9
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#bug-database> <https://github.com/ruby-rdf/rdf/issues> .
|
10
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#download-page> <https://rubygems.org/gems/rdf/> .
|
11
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#license> <https://unlicense.org/1.0/> .
|
12
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#developer> <https://greggkellogg.net/foaf#me> .
|
13
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#developer> <https://bhuga.net/#ben> .
|
14
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#developer> <https://ar.to/#self> .
|
15
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#created> "2007-10-23" .
|
16
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#documenter> <https://greggkellogg.net/foaf#me> .
|
17
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#documenter> <https://bhuga.net/#ben> .
|
18
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#documenter> <https://ar.to/#self> .
|
19
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#name> "RDF.rb" .
|
20
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8160 .
|
21
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8200 .
|
22
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8000 .
|
23
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8220 .
|
24
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8100 .
|
25
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8120 .
|
26
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8140 .
|
27
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8080 .
|
28
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8180 .
|
29
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#blog> <https://greggkellogg.net/> .
|
30
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#blog> <https://ar.to/> .
|
31
|
+
<https://rubygems.org/gems/rdf> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://usefulinc.com/ns/doap#Project> .
|
32
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#implements> <http://www.w3.org/TR/n-triples/> .
|
33
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#implements> <http://www.w3.org/TR/n-quads/> .
|
34
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#implements> <http://www.w3.org/TR/rdf11-concepts/> .
|
35
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#homepage> <https://rubygems.org/gems/rdf> .
|
36
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#description> "RDF.rb is a pure-Ruby library for working with Resource Description Framework (RDF) data."@en .
|
37
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#category> <http://dbpedia.org/resource/Ruby_(programming_language)> .
|
38
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#category> <http://dbpedia.org/resource/Resource_Description_Framework> .
|
39
|
+
<https://rubygems.org/gems/rdf> <http://purl.org/dc/terms/creator> <https://ar.to/#self> .
|
40
|
+
<https://rubygems.org/gems/rdf> <http://xmlns.com/foaf/0.1/maker> <https://ar.to/#self> .
|
41
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#maintainer> <https://greggkellogg.net/foaf#me> .
|
42
|
+
_:g8000 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "274bd18402fc773ffc0606996aa1fb90b603aa29" .
|
43
|
+
_:g8000 <http://xmlns.com/foaf/0.1/name> "Călin Ardelean" .
|
44
|
+
_:g8000 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
45
|
+
_:g8220 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "bedbbf2451e5beb38d59687c0460032aff92cd3c" .
|
46
|
+
_:g8220 <http://xmlns.com/foaf/0.1/name> "Pius Uzamere" .
|
47
|
+
_:g8220 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
48
|
+
_:g8100 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "f412d743150d7b27b8468d56e69ca147917ea6fc" .
|
49
|
+
_:g8100 <http://xmlns.com/foaf/0.1/name> "Joey Geiger" .
|
50
|
+
_:g8100 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
51
|
+
_:g8120 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "d31fdd6af7a279a89bf09fdc9f7c44d9d08bb930" .
|
52
|
+
_:g8120 <http://xmlns.com/foaf/0.1/name> "Fumihiro Kato" .
|
53
|
+
_:g8120 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
54
|
+
_:g8140 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "5bdcd8e2af4f5952aaeeffbdd371c41525ec761d" .
|
55
|
+
_:g8140 <http://xmlns.com/foaf/0.1/name> "Naoki Kawamukai" .
|
56
|
+
_:g8140 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
57
|
+
_:g8080 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "6de43e9cf7de53427fea9765706703e4d957c17b" .
|
58
|
+
_:g8080 <http://xmlns.com/foaf/0.1/name> "Danny Gagne" .
|
59
|
+
_:g8080 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
60
|
+
_:g8180 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "f7653fc1ac0e82ebb32f092389bd5fc728eaae12" .
|
61
|
+
_:g8180 <http://xmlns.com/foaf/0.1/name> "John Fieber" .
|
62
|
+
_:g8180 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
63
|
+
<https://ar.to/#self> <http://xmlns.com/foaf/0.1/mbox_sha1sum> "a033f652c84a4d73b8c26d318c2395699dd2bdfb" <https://ar.to/#self> .
|
64
|
+
<https://ar.to/#self> <http://xmlns.com/foaf/0.1/name> "Arto Bendiken" <https://ar.to/#self> .
|
65
|
+
<https://ar.to/#self> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <https://ar.to/#self> .
|
66
|
+
<https://ar.to/#self> <http://xmlns.com/foaf/0.1/mbox> <mailto:arto@bendiken.net> <https://ar.to/#self> .
|
67
|
+
<https://ar.to/#self> <http://xmlns.com/foaf/0.1/homepage> <https://ar.to/> <https://ar.to/#self> .
|
68
|
+
<https://ar.to/#self> <http://xmlns.com/foaf/0.1/made> <https://rubygems.org/gems/rdf> <https://ar.to/#self> .
|
69
|
+
<https://bhuga.net/#ben> <http://xmlns.com/foaf/0.1/mbox_sha1sum> "dbf45f4ffbd27b67aa84f02a6a31c144727d10af" <https://bhuga.net/#ben> .
|
70
|
+
<https://bhuga.net/#ben> <http://xmlns.com/foaf/0.1/name> "Ben Lavender" <https://bhuga.net/#ben> .
|
71
|
+
<https://bhuga.net/#ben> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <https://bhuga.net/#ben> .
|
72
|
+
<https://bhuga.net/#ben> <http://xmlns.com/foaf/0.1/mbox> <mailto:blavender@gmail.com> <https://bhuga.net/#ben> .
|
73
|
+
<https://bhuga.net/#ben> <http://xmlns.com/foaf/0.1/homepage> <https://bhuga.net/> <https://bhuga.net/#ben> .
|
74
|
+
<https://greggkellogg.net/foaf#me> <http://xmlns.com/foaf/0.1/mbox_sha1sum> "35bc44e6d0070e5ad50ccbe0d24403c96af2b9bd" <https://greggkellogg.net/foaf#me> .
|
75
|
+
<https://greggkellogg.net/foaf#me> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <https://greggkellogg.net/foaf> <https://greggkellogg.net/foaf#me> .
|
76
|
+
<https://greggkellogg.net/foaf#me> <http://xmlns.com/foaf/0.1/name> "Gregg Kellogg" <https://greggkellogg.net/foaf#me> .
|
77
|
+
<https://greggkellogg.net/foaf#me> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <https://greggkellogg.net/foaf#me> .
|
78
|
+
<https://greggkellogg.net/foaf#me> <http://xmlns.com/foaf/0.1/mbox> <mailto:gregg@greggkellogg.net> <https://greggkellogg.net/foaf#me> .
|
79
|
+
<https://greggkellogg.net/foaf#me> <http://xmlns.com/foaf/0.1/homepage> <https://greggkellogg.net/> <https://greggkellogg.net/foaf#me> .
|
86
80
|
<http://example.org/xi1> <http://example.org/p> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
|
87
81
|
<http://example.org/xi2> <http://example.org/p> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
|
88
82
|
<http://example.org/xi3> <http://example.org/p> "01"^^<http://www.w3.org/2001/XMLSchema#integer> .
|
data/etc/triples.nt
CHANGED
@@ -1,88 +1,82 @@
|
|
1
|
-
_:
|
2
|
-
_:
|
3
|
-
_:
|
4
|
-
_:
|
5
|
-
_:
|
6
|
-
_:
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
<
|
29
|
-
<
|
30
|
-
<
|
31
|
-
<
|
32
|
-
<
|
33
|
-
<
|
34
|
-
<
|
35
|
-
<
|
36
|
-
<
|
37
|
-
<
|
38
|
-
<
|
39
|
-
<
|
40
|
-
<
|
41
|
-
<
|
42
|
-
|
43
|
-
<http://
|
44
|
-
<http://
|
45
|
-
<http://
|
46
|
-
|
47
|
-
<http://
|
48
|
-
|
49
|
-
|
50
|
-
<http://
|
51
|
-
<
|
52
|
-
<
|
53
|
-
<
|
54
|
-
<
|
55
|
-
<
|
56
|
-
<http://
|
57
|
-
<http://
|
58
|
-
<http://
|
59
|
-
<http://
|
60
|
-
<http://
|
61
|
-
<http://
|
62
|
-
<http://
|
63
|
-
<http://
|
64
|
-
<http://
|
65
|
-
<
|
66
|
-
<
|
67
|
-
<
|
68
|
-
<
|
69
|
-
<
|
70
|
-
<
|
71
|
-
<
|
72
|
-
<
|
73
|
-
<
|
74
|
-
<
|
75
|
-
<
|
76
|
-
<
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
<http://greggkellogg.net/foaf#me> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
81
|
-
<http://greggkellogg.net/foaf#me> <http://xmlns.com/foaf/0.1/name> "Gregg Kellogg" .
|
82
|
-
<http://greggkellogg.net/foaf#me> <http://xmlns.com/foaf/0.1/mbox> <mailto:gregg@greggkellogg.net> .
|
83
|
-
<http://greggkellogg.net/foaf#me> <http://xmlns.com/foaf/0.1/mbox_sha1sum> "35bc44e6d0070e5ad50ccbe0d24403c96af2b9bd" .
|
84
|
-
<http://greggkellogg.net/foaf#me> <http://xmlns.com/foaf/0.1/homepage> <http://greggkellogg.net/> .
|
85
|
-
<http://greggkellogg.net/foaf#me> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://greggkellogg.net/foaf> .
|
1
|
+
_:g8160 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "c69f3255ff0639543cc5edfd8116eac8df16fab8" .
|
2
|
+
_:g8160 <http://xmlns.com/foaf/0.1/name> "Hellekin O. Wolf" .
|
3
|
+
_:g8160 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
4
|
+
_:g8200 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "2b4247b6fd5bb4a1383378f325784318680d5ff9" .
|
5
|
+
_:g8200 <http://xmlns.com/foaf/0.1/name> "Keita Urashima" .
|
6
|
+
_:g8200 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
7
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#programming-language> "Ruby" .
|
8
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#shortdesc> "A Ruby library for working with Resource Description Framework (RDF) data."@en .
|
9
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#bug-database> <https://github.com/ruby-rdf/rdf/issues> .
|
10
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#download-page> <https://rubygems.org/gems/rdf/> .
|
11
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#license> <https://unlicense.org/1.0/> .
|
12
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#developer> <https://greggkellogg.net/foaf#me> .
|
13
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#developer> <https://bhuga.net/#ben> .
|
14
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#developer> <https://ar.to/#self> .
|
15
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#created> "2007-10-23" .
|
16
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#documenter> <https://greggkellogg.net/foaf#me> .
|
17
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#documenter> <https://bhuga.net/#ben> .
|
18
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#documenter> <https://ar.to/#self> .
|
19
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#name> "RDF.rb" .
|
20
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8160 .
|
21
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8200 .
|
22
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8000 .
|
23
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8220 .
|
24
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8100 .
|
25
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8120 .
|
26
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8140 .
|
27
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8080 .
|
28
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:g8180 .
|
29
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#blog> <https://greggkellogg.net/> .
|
30
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#blog> <https://ar.to/> .
|
31
|
+
<https://rubygems.org/gems/rdf> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://usefulinc.com/ns/doap#Project> .
|
32
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#implements> <http://www.w3.org/TR/n-triples/> .
|
33
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#implements> <http://www.w3.org/TR/n-quads/> .
|
34
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#implements> <http://www.w3.org/TR/rdf11-concepts/> .
|
35
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#homepage> <https://rubygems.org/gems/rdf> .
|
36
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#description> "RDF.rb is a pure-Ruby library for working with Resource Description Framework (RDF) data."@en .
|
37
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#category> <http://dbpedia.org/resource/Ruby_(programming_language)> .
|
38
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#category> <http://dbpedia.org/resource/Resource_Description_Framework> .
|
39
|
+
<https://rubygems.org/gems/rdf> <http://purl.org/dc/terms/creator> <https://ar.to/#self> .
|
40
|
+
<https://rubygems.org/gems/rdf> <http://xmlns.com/foaf/0.1/maker> <https://ar.to/#self> .
|
41
|
+
<https://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#maintainer> <https://greggkellogg.net/foaf#me> .
|
42
|
+
_:g8000 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "274bd18402fc773ffc0606996aa1fb90b603aa29" .
|
43
|
+
_:g8000 <http://xmlns.com/foaf/0.1/name> "Călin Ardelean" .
|
44
|
+
_:g8000 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
45
|
+
_:g8220 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "bedbbf2451e5beb38d59687c0460032aff92cd3c" .
|
46
|
+
_:g8220 <http://xmlns.com/foaf/0.1/name> "Pius Uzamere" .
|
47
|
+
_:g8220 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
48
|
+
_:g8100 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "f412d743150d7b27b8468d56e69ca147917ea6fc" .
|
49
|
+
_:g8100 <http://xmlns.com/foaf/0.1/name> "Joey Geiger" .
|
50
|
+
_:g8100 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
51
|
+
<https://bhuga.net/#ben> <http://xmlns.com/foaf/0.1/mbox_sha1sum> "dbf45f4ffbd27b67aa84f02a6a31c144727d10af" .
|
52
|
+
<https://bhuga.net/#ben> <http://xmlns.com/foaf/0.1/name> "Ben Lavender" .
|
53
|
+
<https://bhuga.net/#ben> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
54
|
+
<https://bhuga.net/#ben> <http://xmlns.com/foaf/0.1/mbox> <mailto:blavender@gmail.com> .
|
55
|
+
<https://bhuga.net/#ben> <http://xmlns.com/foaf/0.1/homepage> <https://bhuga.net/> .
|
56
|
+
_:g8120 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "d31fdd6af7a279a89bf09fdc9f7c44d9d08bb930" .
|
57
|
+
_:g8120 <http://xmlns.com/foaf/0.1/name> "Fumihiro Kato" .
|
58
|
+
_:g8120 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
59
|
+
_:g8140 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "5bdcd8e2af4f5952aaeeffbdd371c41525ec761d" .
|
60
|
+
_:g8140 <http://xmlns.com/foaf/0.1/name> "Naoki Kawamukai" .
|
61
|
+
_:g8140 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
62
|
+
_:g8080 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "6de43e9cf7de53427fea9765706703e4d957c17b" .
|
63
|
+
_:g8080 <http://xmlns.com/foaf/0.1/name> "Danny Gagne" .
|
64
|
+
_:g8080 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
65
|
+
<https://ar.to/#self> <http://xmlns.com/foaf/0.1/mbox_sha1sum> "a033f652c84a4d73b8c26d318c2395699dd2bdfb" .
|
66
|
+
<https://ar.to/#self> <http://xmlns.com/foaf/0.1/name> "Arto Bendiken" .
|
67
|
+
<https://ar.to/#self> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
68
|
+
<https://ar.to/#self> <http://xmlns.com/foaf/0.1/mbox> <mailto:arto@bendiken.net> .
|
69
|
+
<https://ar.to/#self> <http://xmlns.com/foaf/0.1/homepage> <https://ar.to/> .
|
70
|
+
<https://ar.to/#self> <http://xmlns.com/foaf/0.1/made> <https://rubygems.org/gems/rdf> .
|
71
|
+
<https://greggkellogg.net/foaf#me> <http://xmlns.com/foaf/0.1/mbox_sha1sum> "35bc44e6d0070e5ad50ccbe0d24403c96af2b9bd" .
|
72
|
+
<https://greggkellogg.net/foaf#me> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <https://greggkellogg.net/foaf> .
|
73
|
+
<https://greggkellogg.net/foaf#me> <http://xmlns.com/foaf/0.1/name> "Gregg Kellogg" .
|
74
|
+
<https://greggkellogg.net/foaf#me> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
75
|
+
<https://greggkellogg.net/foaf#me> <http://xmlns.com/foaf/0.1/mbox> <mailto:gregg@greggkellogg.net> .
|
76
|
+
<https://greggkellogg.net/foaf#me> <http://xmlns.com/foaf/0.1/homepage> <https://greggkellogg.net/> .
|
77
|
+
_:g8180 <http://xmlns.com/foaf/0.1/mbox_sha1sum> "f7653fc1ac0e82ebb32f092389bd5fc728eaae12" .
|
78
|
+
_:g8180 <http://xmlns.com/foaf/0.1/name> "John Fieber" .
|
79
|
+
_:g8180 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
86
80
|
<http://example.org/xi1> <http://example.org/p> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
|
87
81
|
<http://example.org/xi2> <http://example.org/p> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
|
88
82
|
<http://example.org/xi3> <http://example.org/p> "01"^^<http://www.w3.org/2001/XMLSchema#integer> .
|
data/lib/rdf/spec/enumerable.rb
CHANGED
@@ -7,25 +7,24 @@ RSpec.shared_examples 'an RDF::Enumerable' do
|
|
7
7
|
raise 'enumerable must be set with `let(:enumerable)' unless
|
8
8
|
defined? enumerable
|
9
9
|
|
10
|
-
@
|
10
|
+
@rdf_enumerable_iv_statements ||= RDF::Spec.quads
|
11
11
|
|
12
12
|
if enumerable.empty?
|
13
13
|
if (enumerable.writable? rescue false)
|
14
|
-
enumerable.insert(*@
|
14
|
+
enumerable.insert(*@rdf_enumerable_iv_statements)
|
15
15
|
elsif enumerable.respond_to?(:<<)
|
16
|
-
@
|
16
|
+
@rdf_enumerable_iv_statements.each { |statement| enumerable << statement }
|
17
17
|
else
|
18
18
|
raise "@enumerable must respond to #<< or be pre-populated with the statements in #{RDF::Spec::TRIPLES_FILE} in a before(:each) block"
|
19
19
|
end
|
20
20
|
end
|
21
|
-
|
22
|
-
@supports_named_graphs = enumerable.supports?(:graph_name) rescue true
|
23
21
|
end
|
24
22
|
|
25
|
-
let(:
|
26
|
-
let(:
|
27
|
-
let(:
|
28
|
-
let(:
|
23
|
+
let(:supports_named_graphs) {enumerable.supports?(:graph_name) rescue true}
|
24
|
+
let(:subject_count) {@rdf_enumerable_iv_statements.map(&:subject).uniq.length}
|
25
|
+
let(:bnode_subject_count) {@rdf_enumerable_iv_statements.map(&:subject).uniq.select(&:node?).length}
|
26
|
+
let(:non_bnode_statements) {@rdf_enumerable_iv_statements.reject(&:node?)}
|
27
|
+
let(:non_bnode_terms) {@rdf_enumerable_iv_statements.map(&:to_quad).flatten.compact.reject(&:node?).uniq}
|
29
28
|
|
30
29
|
subject { enumerable }
|
31
30
|
it {is_expected.to respond_to(:supports?)}
|
@@ -41,7 +40,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
|
|
41
40
|
|
42
41
|
it "returns false if any statement is invalid" do
|
43
42
|
if subject.respond_to?(:<<) && (subject.writable? rescue true)
|
44
|
-
s = RDF::Statement(RDF::URI("
|
43
|
+
s = RDF::Statement(RDF::URI("https://rubygems.org/gems/rdf"), RDF::Literal("literal"), RDF::URI("http://ar.to/#self"))
|
45
44
|
if subject.supports?(:validity)
|
46
45
|
expect(s).not_to be_valid
|
47
46
|
subject << s
|
@@ -57,9 +56,9 @@ RSpec.shared_examples 'an RDF::Enumerable' do
|
|
57
56
|
it {is_expected.to respond_to(:empty?)}
|
58
57
|
it {is_expected.to_not be_empty}
|
59
58
|
it {is_expected.to respond_to(:count)}
|
60
|
-
its(:count) {is_expected.to eq @
|
59
|
+
its(:count) {is_expected.to eq @rdf_enumerable_iv_statements.size}
|
61
60
|
it {is_expected.to respond_to(:size)}
|
62
|
-
its(:size) {is_expected.to eq @
|
61
|
+
its(:size) {is_expected.to eq @rdf_enumerable_iv_statements.size}
|
63
62
|
|
64
63
|
context "and empty" do
|
65
64
|
subject {[].extend(RDF::Enumerable)}
|
@@ -74,7 +73,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
|
|
74
73
|
its(:statements) {is_expected.to be_a(Array)}
|
75
74
|
|
76
75
|
context "#statements" do
|
77
|
-
specify {expect(subject.statements.size).to eq @
|
76
|
+
specify {expect(subject.statements.size).to eq @rdf_enumerable_iv_statements.size}
|
78
77
|
specify {expect(subject.statements).to all(be_a_statement)}
|
79
78
|
end
|
80
79
|
|
@@ -89,7 +88,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
|
|
89
88
|
end
|
90
89
|
|
91
90
|
it "does not have statement in different named graph" do
|
92
|
-
if
|
91
|
+
if supports_named_graphs
|
93
92
|
graph_name = RDF::URI.new("urn:graph_name:1")
|
94
93
|
non_bnode_statements.each do |statement|
|
95
94
|
s = statement.dup
|
@@ -132,7 +131,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
|
|
132
131
|
|
133
132
|
its(:triples) {is_expected.to be_a(Array)}
|
134
133
|
context "#triples" do
|
135
|
-
specify {expect(subject.triples.size).to eq @
|
134
|
+
specify {expect(subject.triples.size).to eq @rdf_enumerable_iv_statements.size}
|
136
135
|
specify {expect(subject.triples).to all(be_a_triple)}
|
137
136
|
end
|
138
137
|
|
@@ -176,13 +175,13 @@ RSpec.shared_examples 'an RDF::Enumerable' do
|
|
176
175
|
|
177
176
|
its(:quads) {is_expected.to be_a(Array)}
|
178
177
|
context "#quads" do
|
179
|
-
specify {expect(subject.quads.size).to eq @
|
178
|
+
specify {expect(subject.quads.size).to eq @rdf_enumerable_iv_statements.size}
|
180
179
|
specify {expect(subject.quads).to all(be_a_quad)}
|
181
180
|
end
|
182
181
|
|
183
182
|
context "#has_quad?" do
|
184
183
|
specify do
|
185
|
-
if
|
184
|
+
if supports_named_graphs
|
186
185
|
non_bnode_statements.each do |statement|
|
187
186
|
is_expected.to have_quad(statement.to_quad)
|
188
187
|
end
|
@@ -265,7 +264,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
|
|
265
264
|
end
|
266
265
|
|
267
266
|
context "when enumerating predicates" do
|
268
|
-
let(:predicates) {@
|
267
|
+
let(:predicates) {@rdf_enumerable_iv_statements.map { |s| s.predicate }.uniq}
|
269
268
|
it {is_expected.to respond_to(:predicates)}
|
270
269
|
it {is_expected.to respond_to(:has_predicate?)}
|
271
270
|
it {is_expected.to respond_to(:each_predicate)}
|
@@ -285,7 +284,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
|
|
285
284
|
context "#has_predicate?" do
|
286
285
|
specify do
|
287
286
|
checked = []
|
288
|
-
@
|
287
|
+
@rdf_enumerable_iv_statements.each do |statement|
|
289
288
|
expect(enumerable).to have_predicate(statement.predicate) unless checked.include?(statement.predicate)
|
290
289
|
checked << statement.predicate
|
291
290
|
end
|
@@ -434,8 +433,8 @@ RSpec.shared_examples 'an RDF::Enumerable' do
|
|
434
433
|
end
|
435
434
|
|
436
435
|
it "should implement #has_graph?" do
|
437
|
-
if
|
438
|
-
@
|
436
|
+
if supports_named_graphs
|
437
|
+
@rdf_enumerable_iv_statements.each do |statement|
|
439
438
|
if statement.has_graph?
|
440
439
|
expect(enumerable).to have_graph(statement.graph_name)
|
441
440
|
end
|
@@ -480,21 +479,21 @@ RSpec.shared_examples 'an RDF::Enumerable' do
|
|
480
479
|
|
481
480
|
context "non-existing graph" do
|
482
481
|
let(:graph_name) {RDF::URI.new('http://example.org/does/not/have/this/uri')}
|
483
|
-
specify {expect(subject.project_graph(graph_name)).to be_empty if
|
482
|
+
specify {expect(subject.project_graph(graph_name)).to be_empty if supports_named_graphs}
|
484
483
|
end
|
485
484
|
end
|
486
485
|
|
487
486
|
its(:each_graph) {is_expected.to be_an_enumerator}
|
488
487
|
|
489
488
|
describe "#each_graph" do
|
490
|
-
let(:graph_names) {@
|
489
|
+
let(:graph_names) {@rdf_enumerable_iv_statements.map { |s| s.graph_name }.uniq.compact}
|
491
490
|
subject { enumerable.each_graph }
|
492
491
|
it {is_expected.to be_an_enumerator}
|
493
|
-
specify {is_expected.to all(be_a_graph) if
|
492
|
+
specify {is_expected.to all(be_a_graph) if supports_named_graphs}
|
494
493
|
|
495
494
|
it "has appropriate number of graphs" do
|
496
|
-
if
|
497
|
-
graph_names = @
|
495
|
+
if supports_named_graphs
|
496
|
+
graph_names = @rdf_enumerable_iv_statements.map { |s| s.graph_name }.uniq.compact
|
498
497
|
expect(subject.to_a.size).to eq (graph_names.size + 1)
|
499
498
|
end
|
500
499
|
end
|
@@ -505,7 +504,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
|
|
505
504
|
it {is_expected.to be_an_enumerator}
|
506
505
|
it {is_expected.to be_countable}
|
507
506
|
it "enumerates the same as #each_graph" do
|
508
|
-
expect(subject.to_a).to include(*enumerable.each_graph.to_a) if
|
507
|
+
expect(subject.to_a).to include(*enumerable.each_graph.to_a) if supports_named_graphs # expect with match problematic
|
509
508
|
end
|
510
509
|
end
|
511
510
|
end
|