rdf 3.1.12 → 3.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rdf/cli.rb +3 -2
- data/lib/rdf/query/solution.rb +10 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a8a5a69a203cf83628099c927675bbc4abe122bd8568bb69fa06bae0cbcb94b
|
4
|
+
data.tar.gz: eba5377c635a6b05c25cd2b88107521c494d557dbfde6c0de5dbe52646ee1401
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51af08617cb541333344b88a968c2d5699439baa7a4263154f7ccbdce06b635491b1cb93b9fb0e4dbca8711d9b71926ff22b60ab92f3f0cad9e205f86d1a3177
|
7
|
+
data.tar.gz: 8abc461f8937d46d3e75634764bc8bbaaf6f54ba07e39fa94c1400b62a59f20436ffd07c50a428aea7c2a01e292acbedb8f94bd5d07560e2523a00fef19174d1
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.1.
|
1
|
+
3.1.13
|
data/lib/rdf/cli.rb
CHANGED
@@ -256,8 +256,7 @@ module RDF
|
|
256
256
|
lambda: ->(argv, opts) do
|
257
257
|
writer_class = RDF::Writer.for(opts[:output_format]) || RDF::NTriples::Writer
|
258
258
|
out = opts[:output]
|
259
|
-
|
260
|
-
writer_opts = opts.merge(standard_prefixes: true)
|
259
|
+
writer_opts = {prefixes: {}, standard_prefixes: true}.merge(opts)
|
261
260
|
writer_class.new(out, **writer_opts) do |writer|
|
262
261
|
writer << repository
|
263
262
|
end
|
@@ -536,6 +535,8 @@ module RDF
|
|
536
535
|
count = 0
|
537
536
|
self.parse(args, **options) do |reader|
|
538
537
|
reader.each_statement {|st| @repository << st}
|
538
|
+
# Remember prefixes from reading
|
539
|
+
options[:prefixes] ||= reader.prefixes
|
539
540
|
end
|
540
541
|
secs = Time.new - start
|
541
542
|
options[:logger].info "Parsed #{repository.count} statements with #{@readers.join(', ')} in #{secs} seconds @ #{count/secs} statements/second."
|
data/lib/rdf/query/solution.rb
CHANGED
@@ -23,10 +23,13 @@ class RDF::Query
|
|
23
23
|
class Solution
|
24
24
|
# Undefine all superfluous instance methods:
|
25
25
|
alias_method :__send, :send
|
26
|
+
|
27
|
+
# Temporarily remember instance method for deprecation message in `method_missing`.
|
28
|
+
INSTANCE_METHODS = instance_methods
|
26
29
|
undef_method(*instance_methods.
|
27
30
|
map(&:to_s).
|
28
31
|
select {|m| m.match?(/^\w+$/)}.
|
29
|
-
reject {|m| %w(object_id dup instance_eval inspect to_s private_methods class
|
32
|
+
reject {|m| %w(object_id dup instance_eval inspect to_s private_methods public_methods class method pretty_print).include?(m) || m[0,2] == '__'}.
|
30
33
|
map(&:to_sym))
|
31
34
|
|
32
35
|
include Enumerable
|
@@ -344,6 +347,12 @@ class RDF::Query
|
|
344
347
|
# @return [RDF::Term]
|
345
348
|
def method_missing(name, *args, &block)
|
346
349
|
if args.empty? && @bindings.key?(name.to_sym)
|
350
|
+
if INSTANCE_METHODS.include?(name)
|
351
|
+
warn "[DEPRECATION] RDF::Query::Solution##{name} is an overridden instance method.\n" +
|
352
|
+
"Its use as a solution accessor is deprecated and will be removed in a future version.\n" +
|
353
|
+
"Use #[] for safe access.\n" +
|
354
|
+
"Called from #{Gem.location_of_caller.join(':')}"
|
355
|
+
end
|
347
356
|
@bindings[name.to_sym]
|
348
357
|
else
|
349
358
|
super # raises NoMethodError
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arto Bendiken
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-03-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: link_header
|