rdf-n3 1.1.1 → 1.1.2
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/n3.rb +0 -1
- data/lib/rdf/n3/writer.rb +1 -1
- metadata +20 -7
- data/lib/rdf/n3/patches/list.rb +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52f269bad46965076928bf59a23b63e2dd230335
|
4
|
+
data.tar.gz: a54ec4234bac636703917a624fc1e0d0c4a380cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b447008e39b1026d9b64befee67516165fee2297a1da3b51dd1dc0b11430d0b6602596e2431e5ea8ffcbf6a202b30439f1cbb81dbe927680fba7d4a4e7ba5a6
|
7
|
+
data.tar.gz: 38637b57a3d93a427e761e730455f061f28fbad974b1782af466939fa99b1a637942533cde647b41b0c49eca7484e1e117db05befd8d09f67057a9cc54fc01d3
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.2
|
data/lib/rdf/n3.rb
CHANGED
data/lib/rdf/n3/writer.rb
CHANGED
@@ -419,7 +419,7 @@ module RDF::N3
|
|
419
419
|
# Checks if l is a valid RDF list, i.e. no nodes have other properties.
|
420
420
|
def is_valid_list(l)
|
421
421
|
#add_debug {"is_valid_list: #{l.inspect}"}
|
422
|
-
return RDF::List.new(l, @graph).valid?
|
422
|
+
return (l.node? && RDF::List.new(l, @graph).valid?) || l == RDF.nil
|
423
423
|
end
|
424
424
|
|
425
425
|
def do_list(l)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf-n3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregg
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-08-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdf
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
version: '1.1'
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 1.1.
|
23
|
+
version: 1.1.5
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
version: '1.1'
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.1.
|
33
|
+
version: 1.1.5
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: open-uri-cached
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
@@ -71,14 +71,28 @@ dependencies:
|
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
74
|
+
version: '3.0'
|
75
75
|
type: :development
|
76
76
|
prerelease: false
|
77
77
|
version_requirements: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
81
|
+
version: '3.0'
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: rspec-its
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1.0'
|
89
|
+
type: :development
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '1.0'
|
82
96
|
- !ruby/object:Gem::Dependency
|
83
97
|
name: rdf-spec
|
84
98
|
requirement: !ruby/object:Gem::Requirement
|
@@ -149,7 +163,6 @@ files:
|
|
149
163
|
- lib/rdf/n3.rb
|
150
164
|
- lib/rdf/n3/format.rb
|
151
165
|
- lib/rdf/n3/patches/array_hacks.rb
|
152
|
-
- lib/rdf/n3/patches/list.rb
|
153
166
|
- lib/rdf/n3/reader.rb
|
154
167
|
- lib/rdf/n3/reader/meta.rb
|
155
168
|
- lib/rdf/n3/reader/parser.rb
|
data/lib/rdf/n3/patches/list.rb
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
module RDF
|
2
|
-
class List
|
3
|
-
##
|
4
|
-
# Validate the list ensuring that
|
5
|
-
# * rdf:rest values are all BNodes are nil
|
6
|
-
# * rdf:type, if it exists, is rdf:List
|
7
|
-
# * each subject has no properties other than single-valued rdf:first, rdf:rest
|
8
|
-
# other than for the first node in the list
|
9
|
-
# @return [Boolean]
|
10
|
-
def valid?
|
11
|
-
li = subject
|
12
|
-
while li != RDF.nil do
|
13
|
-
rest = nil
|
14
|
-
firsts = rests = 0
|
15
|
-
@graph.query(:subject => li) do |st|
|
16
|
-
case st.predicate
|
17
|
-
when RDF.type
|
18
|
-
# Be tollerant about rdf:type entries, as some OWL vocabularies use it excessively
|
19
|
-
when RDF.first
|
20
|
-
firsts += 1
|
21
|
-
when RDF.rest
|
22
|
-
rest = st.object
|
23
|
-
return false unless rest.node? || rest == RDF.nil
|
24
|
-
rests += 1
|
25
|
-
else
|
26
|
-
# First node may have other properties
|
27
|
-
return false unless li == subject
|
28
|
-
end
|
29
|
-
end
|
30
|
-
return false unless firsts == 1 && rests == 1
|
31
|
-
li = rest
|
32
|
-
end
|
33
|
-
true
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|