rdf-trig 3.0.1 → 3.1.0
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/trig/streaming_writer.rb +7 -7
- data/lib/rdf/trig/writer.rb +4 -5
- metadata +22 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed8064b3aab791a8c475659172e9e6e46e70f4aca09138226f4b221f6e4017ca
|
4
|
+
data.tar.gz: e010f71f33a08b0ddc4b9a9737972036e256beff89ac16224b49be49a73ac516
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db9f90e829bccf4ada3be5f41a3998b7acde186f9b4c5a9124ca62da1e2ae660bfbd497ba17dd3848c65c698107dad28b1c2d544c198bb9d9c9d649d36ab060e
|
7
|
+
data.tar.gz: 5435db3b105daad03cc844a334d029b12e1b6ff118713db9c295c540f7d48bafa6767f7ed420ab2bedd2800a2116ffb2e9c543b3cbf36f7b09d8672dc356c1ce
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0
|
1
|
+
3.1.0
|
@@ -11,24 +11,24 @@ module RDF::TriG
|
|
11
11
|
if statement.graph_name != @streaming_graph
|
12
12
|
stream_epilogue
|
13
13
|
if statement.graph_name
|
14
|
-
@output.write "#{format_term(statement.graph_name, options)} {"
|
14
|
+
@output.write "#{format_term(statement.graph_name, **options)} {"
|
15
15
|
end
|
16
16
|
@streaming_graph, @streaming_subject, @streaming_predicate = statement.graph_name, statement.subject, statement.predicate
|
17
|
-
@output.write "#{format_term(statement.subject, options)} "
|
18
|
-
@output.write "#{statement.predicate == RDF.type ? 'a' : format_term(statement.predicate, options)} "
|
17
|
+
@output.write "#{format_term(statement.subject, **options)} "
|
18
|
+
@output.write "#{statement.predicate == RDF.type ? 'a' : format_term(statement.predicate, **options)} "
|
19
19
|
elsif statement.subject != @streaming_subject
|
20
20
|
@output.puts " ." if @previous_statement
|
21
21
|
@output.write "#{indent(@streaming_subject ? 1 : 0)}"
|
22
22
|
@streaming_subject, @streaming_predicate = statement.subject, statement.predicate
|
23
|
-
@output.write "#{format_term(statement.subject, options)} "
|
24
|
-
@output.write "#{statement.predicate == RDF.type ? 'a' : format_term(statement.predicate, options)} "
|
23
|
+
@output.write "#{format_term(statement.subject, **options)} "
|
24
|
+
@output.write "#{statement.predicate == RDF.type ? 'a' : format_term(statement.predicate, **options)} "
|
25
25
|
elsif statement.predicate != @streaming_predicate
|
26
26
|
@streaming_predicate = statement.predicate
|
27
|
-
@output.write ";\n#{indent(@streaming_subject ? 2 : 1)}#{statement.predicate == RDF.type ? 'a' : format_term(statement.predicate, options)} "
|
27
|
+
@output.write ";\n#{indent(@streaming_subject ? 2 : 1)}#{statement.predicate == RDF.type ? 'a' : format_term(statement.predicate, **options)} "
|
28
28
|
else
|
29
29
|
@output.write ",\n#{indent(@streaming_subject ? 3 : 2)}"
|
30
30
|
end
|
31
|
-
@output.write("#{format_term(statement.object, options)}")
|
31
|
+
@output.write("#{format_term(statement.object, **options)}")
|
32
32
|
@previous_statement = statement
|
33
33
|
end
|
34
34
|
|
data/lib/rdf/trig/writer.rb
CHANGED
@@ -87,7 +87,7 @@ module RDF::TriG
|
|
87
87
|
# @yieldreturn [void]
|
88
88
|
# @yield [writer]
|
89
89
|
# @yieldparam [RDF::Writer] writer
|
90
|
-
def initialize(output = $stdout, options
|
90
|
+
def initialize(output = $stdout, **options, &block)
|
91
91
|
super do
|
92
92
|
# Set both @repo and @graph to a new repository.
|
93
93
|
@repo = @graph = RDF::Repository.new
|
@@ -100,7 +100,6 @@ module RDF::TriG
|
|
100
100
|
end
|
101
101
|
end
|
102
102
|
|
103
|
-
|
104
103
|
##
|
105
104
|
# Adds a triple to be serialized
|
106
105
|
# @param [RDF::Resource] subject
|
@@ -197,8 +196,8 @@ module RDF::TriG
|
|
197
196
|
end
|
198
197
|
|
199
198
|
def resource_in_single_graph?(resource)
|
200
|
-
graph_names = @repo.query(subject: resource).map(&:graph_name)
|
201
|
-
graph_names += @repo.query(object: resource).map(&:graph_name)
|
199
|
+
graph_names = @repo.query({subject: resource}).map(&:graph_name)
|
200
|
+
graph_names += @repo.query({object: resource}).map(&:graph_name)
|
202
201
|
graph_names.uniq.length <= 1
|
203
202
|
end
|
204
203
|
|
@@ -208,7 +207,7 @@ module RDF::TriG
|
|
208
207
|
graph_names = @repo.graph_names.to_a.sort
|
209
208
|
|
210
209
|
# include default graph, if necessary
|
211
|
-
graph_names.unshift(nil) unless @repo.query(graph_name: false).to_a.empty?
|
210
|
+
graph_names.unshift(nil) unless @repo.query({graph_name: false}).to_a.empty?
|
212
211
|
|
213
212
|
graph_names
|
214
213
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf-trig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregg Kellogg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdf
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '3.
|
19
|
+
version: '3.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '3.
|
26
|
+
version: '3.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ebnf
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,118 +44,112 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3.
|
48
|
-
- - ">="
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: 3.0.3
|
47
|
+
version: '3.1'
|
51
48
|
type: :runtime
|
52
49
|
prerelease: false
|
53
50
|
version_requirements: !ruby/object:Gem::Requirement
|
54
51
|
requirements:
|
55
52
|
- - "~>"
|
56
53
|
- !ruby/object:Gem::Version
|
57
|
-
version: '3.
|
58
|
-
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: 3.0.3
|
54
|
+
version: '3.1'
|
61
55
|
- !ruby/object:Gem::Dependency
|
62
56
|
name: json-ld
|
63
57
|
requirement: !ruby/object:Gem::Requirement
|
64
58
|
requirements:
|
65
59
|
- - "~>"
|
66
60
|
- !ruby/object:Gem::Version
|
67
|
-
version: '3.
|
61
|
+
version: '3.1'
|
68
62
|
type: :development
|
69
63
|
prerelease: false
|
70
64
|
version_requirements: !ruby/object:Gem::Requirement
|
71
65
|
requirements:
|
72
66
|
- - "~>"
|
73
67
|
- !ruby/object:Gem::Version
|
74
|
-
version: '3.
|
68
|
+
version: '3.1'
|
75
69
|
- !ruby/object:Gem::Dependency
|
76
70
|
name: rspec
|
77
71
|
requirement: !ruby/object:Gem::Requirement
|
78
72
|
requirements:
|
79
73
|
- - "~>"
|
80
74
|
- !ruby/object:Gem::Version
|
81
|
-
version: '3.
|
75
|
+
version: '3.9'
|
82
76
|
type: :development
|
83
77
|
prerelease: false
|
84
78
|
version_requirements: !ruby/object:Gem::Requirement
|
85
79
|
requirements:
|
86
80
|
- - "~>"
|
87
81
|
- !ruby/object:Gem::Version
|
88
|
-
version: '3.
|
82
|
+
version: '3.9'
|
89
83
|
- !ruby/object:Gem::Dependency
|
90
84
|
name: rspec-its
|
91
85
|
requirement: !ruby/object:Gem::Requirement
|
92
86
|
requirements:
|
93
87
|
- - "~>"
|
94
88
|
- !ruby/object:Gem::Version
|
95
|
-
version: '1.
|
89
|
+
version: '1.3'
|
96
90
|
type: :development
|
97
91
|
prerelease: false
|
98
92
|
version_requirements: !ruby/object:Gem::Requirement
|
99
93
|
requirements:
|
100
94
|
- - "~>"
|
101
95
|
- !ruby/object:Gem::Version
|
102
|
-
version: '1.
|
96
|
+
version: '1.3'
|
103
97
|
- !ruby/object:Gem::Dependency
|
104
98
|
name: rdf-isomorphic
|
105
99
|
requirement: !ruby/object:Gem::Requirement
|
106
100
|
requirements:
|
107
101
|
- - "~>"
|
108
102
|
- !ruby/object:Gem::Version
|
109
|
-
version: '3.
|
103
|
+
version: '3.1'
|
110
104
|
type: :development
|
111
105
|
prerelease: false
|
112
106
|
version_requirements: !ruby/object:Gem::Requirement
|
113
107
|
requirements:
|
114
108
|
- - "~>"
|
115
109
|
- !ruby/object:Gem::Version
|
116
|
-
version: '3.
|
110
|
+
version: '3.1'
|
117
111
|
- !ruby/object:Gem::Dependency
|
118
112
|
name: yard
|
119
113
|
requirement: !ruby/object:Gem::Requirement
|
120
114
|
requirements:
|
121
115
|
- - "~>"
|
122
116
|
- !ruby/object:Gem::Version
|
123
|
-
version: 0.9.
|
117
|
+
version: 0.9.20
|
124
118
|
type: :development
|
125
119
|
prerelease: false
|
126
120
|
version_requirements: !ruby/object:Gem::Requirement
|
127
121
|
requirements:
|
128
122
|
- - "~>"
|
129
123
|
- !ruby/object:Gem::Version
|
130
|
-
version: 0.9.
|
124
|
+
version: 0.9.20
|
131
125
|
- !ruby/object:Gem::Dependency
|
132
126
|
name: rdf-spec
|
133
127
|
requirement: !ruby/object:Gem::Requirement
|
134
128
|
requirements:
|
135
129
|
- - "~>"
|
136
130
|
- !ruby/object:Gem::Version
|
137
|
-
version: '3.
|
131
|
+
version: '3.1'
|
138
132
|
type: :development
|
139
133
|
prerelease: false
|
140
134
|
version_requirements: !ruby/object:Gem::Requirement
|
141
135
|
requirements:
|
142
136
|
- - "~>"
|
143
137
|
- !ruby/object:Gem::Version
|
144
|
-
version: '3.
|
138
|
+
version: '3.1'
|
145
139
|
- !ruby/object:Gem::Dependency
|
146
140
|
name: rake
|
147
141
|
requirement: !ruby/object:Gem::Requirement
|
148
142
|
requirements:
|
149
143
|
- - "~>"
|
150
144
|
- !ruby/object:Gem::Version
|
151
|
-
version: '
|
145
|
+
version: '13.0'
|
152
146
|
type: :development
|
153
147
|
prerelease: false
|
154
148
|
version_requirements: !ruby/object:Gem::Requirement
|
155
149
|
requirements:
|
156
150
|
- - "~>"
|
157
151
|
- !ruby/object:Gem::Version
|
158
|
-
version: '
|
152
|
+
version: '13.0'
|
159
153
|
description: RDF::TriG is an TriG reader/writer for the RDF.rb library suite.
|
160
154
|
email: public-rdf-ruby@w3.org
|
161
155
|
executables: []
|
@@ -185,15 +179,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
185
179
|
requirements:
|
186
180
|
- - ">="
|
187
181
|
- !ruby/object:Gem::Version
|
188
|
-
version: 2.
|
182
|
+
version: '2.4'
|
189
183
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
184
|
requirements:
|
191
185
|
- - ">="
|
192
186
|
- !ruby/object:Gem::Version
|
193
187
|
version: '0'
|
194
188
|
requirements: []
|
195
|
-
|
196
|
-
rubygems_version: 2.7.6
|
189
|
+
rubygems_version: 3.0.6
|
197
190
|
signing_key:
|
198
191
|
specification_version: 4
|
199
192
|
summary: TriG reader/writer for Ruby.
|