rdf-aggregate-repo 2.2.1 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +2 -2
- data/VERSION +1 -1
- data/lib/rdf/aggregate_repo.rb +7 -7
- data/lib/rdf/aggregate_repo/merge_graph.rb +10 -12
- metadata +22 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4718bd42949d458fc3c0e67e827d119ff756d7985863549670f1788c1de243dd
|
4
|
+
data.tar.gz: 1bd9a28963fe1dd106bcc53c2389a5ff59882a4596c3e0efe8f361ef9a7a1759
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1379ab7b442af08cb5eea60976850b7db7c675b342ebb249fe135c37362427c439bd36a9ea0683ad82d45fb34cbe446aadffbe85f3fe9083cda85dd70aa3263
|
7
|
+
data.tar.gz: 719c6a816f3726a4fc8d81a4dffa93a00b855df231781419f99062aea000e2f0883d809dc3a1283f7c04b26a4d37342baab92eb9fb7540058a910988278b5150
|
data/README.md
CHANGED
@@ -29,8 +29,8 @@ Maps named graphs from one or more `RDF::Queryable` instances into a single data
|
|
29
29
|
|
30
30
|
## Dependencies
|
31
31
|
|
32
|
-
* [Ruby](http://ruby-lang.org/) (>= 2.
|
33
|
-
* [RDF.rb][] (
|
32
|
+
* [Ruby](http://ruby-lang.org/) (>= 2.4)
|
33
|
+
* [RDF.rb][] (~> 3.1)
|
34
34
|
|
35
35
|
## Mailing List
|
36
36
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.0
|
data/lib/rdf/aggregate_repo.rb
CHANGED
@@ -52,7 +52,7 @@ module RDF
|
|
52
52
|
##
|
53
53
|
# Create a new aggregation instance.
|
54
54
|
#
|
55
|
-
# @overload initialize(queryable = [], options
|
55
|
+
# @overload initialize(queryable = [], **options)
|
56
56
|
# @param [Array<RDF::Queryable>] queryable ([])
|
57
57
|
# @param [Hash{Symbol => Object}] options ({})
|
58
58
|
# @yield aggregation
|
@@ -297,26 +297,26 @@ module RDF
|
|
297
297
|
# @yieldreturn [void] ignored
|
298
298
|
# @return [void] ignored
|
299
299
|
# @see RDF::Queryable#query_pattern
|
300
|
-
def query_pattern(pattern, options
|
301
|
-
return enum_for(:query_pattern, pattern, options) unless block_given?
|
300
|
+
def query_pattern(pattern, **options, &block)
|
301
|
+
return enum_for(:query_pattern, pattern, **options) unless block_given?
|
302
302
|
case pattern.graph_name
|
303
303
|
when nil
|
304
304
|
# Query against all graphs
|
305
|
-
each_graph {|graph| graph.send(:query_pattern, pattern, options, &block)}
|
305
|
+
each_graph {|graph| graph.send(:query_pattern, pattern, **options, &block)}
|
306
306
|
when FalseClass
|
307
307
|
# Query against default graph only
|
308
|
-
default_graph.send(:query_pattern, pattern, options, &block)
|
308
|
+
default_graph.send(:query_pattern, pattern, **options, &block)
|
309
309
|
when RDF::Query::Variable
|
310
310
|
# Query against all named graphs
|
311
311
|
each_graph do |graph|
|
312
312
|
source = sources.reverse.detect {|s| s.has_graph?(graph.graph_name)}
|
313
|
-
RDF::Graph.new(graph_name: graph.graph_name, data: source).send(:query_pattern, pattern, options, &block)
|
313
|
+
RDF::Graph.new(graph_name: graph.graph_name, data: source).send(:query_pattern, pattern, **options, &block)
|
314
314
|
end
|
315
315
|
else
|
316
316
|
# Query against a specific graph
|
317
317
|
if @named_graphs.include?(pattern.graph_name)
|
318
318
|
source = sources.reverse.detect {|s| s.has_graph?(pattern.graph_name)}
|
319
|
-
RDF::Graph.new(graph_name: pattern.graph_name, data: source).send(:query_pattern, pattern, options, &block)
|
319
|
+
RDF::Graph.new(graph_name: pattern.graph_name, data: source).send(:query_pattern, pattern, **options, &block)
|
320
320
|
end
|
321
321
|
end
|
322
322
|
end
|
@@ -40,16 +40,14 @@ module RDF
|
|
40
40
|
##
|
41
41
|
# Create a new aggregation instance.
|
42
42
|
#
|
43
|
-
# @
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
|
49
|
-
# @yieldreturn [void] ignored
|
50
|
-
def initialize(options = {}, &block)
|
43
|
+
# @param [RDF::Resource] :graph_name
|
44
|
+
# @param [RDF::Resource] :name alias for :graph_name
|
45
|
+
# @yield merger
|
46
|
+
# @yieldparam [RDF::MergeGraph] self
|
47
|
+
# @yieldreturn [void] ignored
|
48
|
+
def initialize(graph_name: nil, name: nil, &block)
|
51
49
|
@sources = []
|
52
|
-
@graph_name =
|
50
|
+
@graph_name = graph_name || name
|
53
51
|
|
54
52
|
if block_given?
|
55
53
|
case block.arity
|
@@ -186,12 +184,12 @@ module RDF
|
|
186
184
|
##
|
187
185
|
# @private
|
188
186
|
# @see RDF::Queryable#query_pattern
|
189
|
-
def query_pattern(pattern, options
|
190
|
-
return enum_for(:query_pattern, pattern, options) unless block_given?
|
187
|
+
def query_pattern(pattern, **options, &block)
|
188
|
+
return enum_for(:query_pattern, pattern, **options) unless block_given?
|
191
189
|
pattern = pattern.dup
|
192
190
|
sources.each do |(source, gn)|
|
193
191
|
pattern.graph_name = gn
|
194
|
-
source.send(:query_pattern, pattern, options, &block)
|
192
|
+
source.send(:query_pattern, pattern, **options, &block)
|
195
193
|
end
|
196
194
|
end
|
197
195
|
end
|
metadata
CHANGED
@@ -1,117 +1,99 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf-aggregate-repo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
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-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdf
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '2.2'
|
20
|
-
- - "<"
|
17
|
+
- - "~>"
|
21
18
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
19
|
+
version: '3.1'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- - "
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '2.2'
|
30
|
-
- - "<"
|
24
|
+
- - "~>"
|
31
25
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
26
|
+
version: '3.1'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: rdf-spec
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
|
-
- - "
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '2.2'
|
40
|
-
- - "<"
|
31
|
+
- - "~>"
|
41
32
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
33
|
+
version: '3.1'
|
43
34
|
type: :development
|
44
35
|
prerelease: false
|
45
36
|
version_requirements: !ruby/object:Gem::Requirement
|
46
37
|
requirements:
|
47
|
-
- - "
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '2.2'
|
50
|
-
- - "<"
|
38
|
+
- - "~>"
|
51
39
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
40
|
+
version: '3.1'
|
53
41
|
- !ruby/object:Gem::Dependency
|
54
42
|
name: rdf-turtle
|
55
43
|
requirement: !ruby/object:Gem::Requirement
|
56
44
|
requirements:
|
57
|
-
- - "
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: '2.2'
|
60
|
-
- - "<"
|
45
|
+
- - "~>"
|
61
46
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
47
|
+
version: '3.1'
|
63
48
|
type: :development
|
64
49
|
prerelease: false
|
65
50
|
version_requirements: !ruby/object:Gem::Requirement
|
66
51
|
requirements:
|
67
|
-
- - "
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '2.2'
|
70
|
-
- - "<"
|
52
|
+
- - "~>"
|
71
53
|
- !ruby/object:Gem::Version
|
72
|
-
version: '
|
54
|
+
version: '3.1'
|
73
55
|
- !ruby/object:Gem::Dependency
|
74
56
|
name: rspec
|
75
57
|
requirement: !ruby/object:Gem::Requirement
|
76
58
|
requirements:
|
77
59
|
- - "~>"
|
78
60
|
- !ruby/object:Gem::Version
|
79
|
-
version: '3.
|
61
|
+
version: '3.9'
|
80
62
|
type: :development
|
81
63
|
prerelease: false
|
82
64
|
version_requirements: !ruby/object:Gem::Requirement
|
83
65
|
requirements:
|
84
66
|
- - "~>"
|
85
67
|
- !ruby/object:Gem::Version
|
86
|
-
version: '3.
|
68
|
+
version: '3.9'
|
87
69
|
- !ruby/object:Gem::Dependency
|
88
70
|
name: rspec-its
|
89
71
|
requirement: !ruby/object:Gem::Requirement
|
90
72
|
requirements:
|
91
73
|
- - "~>"
|
92
74
|
- !ruby/object:Gem::Version
|
93
|
-
version: '1.
|
75
|
+
version: '1.3'
|
94
76
|
type: :development
|
95
77
|
prerelease: false
|
96
78
|
version_requirements: !ruby/object:Gem::Requirement
|
97
79
|
requirements:
|
98
80
|
- - "~>"
|
99
81
|
- !ruby/object:Gem::Version
|
100
|
-
version: '1.
|
82
|
+
version: '1.3'
|
101
83
|
- !ruby/object:Gem::Dependency
|
102
84
|
name: yard
|
103
85
|
requirement: !ruby/object:Gem::Requirement
|
104
86
|
requirements:
|
105
87
|
- - "~>"
|
106
88
|
- !ruby/object:Gem::Version
|
107
|
-
version:
|
89
|
+
version: 0.9.20
|
108
90
|
type: :development
|
109
91
|
prerelease: false
|
110
92
|
version_requirements: !ruby/object:Gem::Requirement
|
111
93
|
requirements:
|
112
94
|
- - "~>"
|
113
95
|
- !ruby/object:Gem::Version
|
114
|
-
version:
|
96
|
+
version: 0.9.20
|
115
97
|
description: A gem extending RDF.rb with SPARQL dataset construction semantics.
|
116
98
|
email: public-rdf-ruby@w3.org
|
117
99
|
executables: []
|
@@ -138,15 +120,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
138
120
|
requirements:
|
139
121
|
- - ">="
|
140
122
|
- !ruby/object:Gem::Version
|
141
|
-
version: 2.
|
123
|
+
version: '2.4'
|
142
124
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
125
|
requirements:
|
144
126
|
- - ">="
|
145
127
|
- !ruby/object:Gem::Version
|
146
128
|
version: '0'
|
147
129
|
requirements: []
|
148
|
-
|
149
|
-
rubygems_version: 2.6.14
|
130
|
+
rubygems_version: 3.0.6
|
150
131
|
signing_key:
|
151
132
|
specification_version: 4
|
152
133
|
summary: An aggregate RDF::Repository supporting a subset of named graphs and zero
|