rdf 2.2.1 → 2.2.3
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/mixin/enumerable.rb +4 -1
- data/lib/rdf/model/statement.rb +4 -1
- data/lib/rdf/model/uri.rb +4 -1
- data/lib/rdf/query/solution.rb +4 -1
- data/lib/rdf/query/variable.rb +4 -1
- data/lib/rdf/reader.rb +2 -2
- data/lib/rdf/repository.rb +5 -5
- data/lib/rdf/transaction.rb +7 -7
- data/lib/rdf/writer.rb +1 -1
- data/lib/rdf.rb +2 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0c4f107a087cbcd8828a9db8826cf54e7746ac3
|
4
|
+
data.tar.gz: 8d98e00d3290c1483a19a46c5596fe1e74411f30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cc293fc0d360d0f936452cf97e759dd86485ba26de3c84087936248d7d2a490a89a53e7c9a6aef1380c340faeb7335124b6d25ffb54426887c549138b59a931
|
7
|
+
data.tar.gz: eba1d1738c875b2d862dfff870eb5ceb714004cc2be9899104641250006e5c86a6bceaf6a91562db6f298addfe8f3c6a8d305e1be5ce1ded16a4d805a51e2b8f
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.3
|
data/lib/rdf/mixin/enumerable.rb
CHANGED
@@ -765,7 +765,10 @@ module RDF
|
|
765
765
|
def method_missing(meth, *args)
|
766
766
|
case meth
|
767
767
|
when :to_hash
|
768
|
-
warn "[DEPRECATION] Enumerable#to_hash is deprecated, use Enumerable#to_h instead
|
768
|
+
warn "[DEPRECATION] RDF::Enumerable#to_hash is deprecated, use RDF::Enumerable#to_h instead.\n" +
|
769
|
+
"This is due to the introduction of keyword arugments that attempt to turn the last argument into a hash using #to_hash.\n" +
|
770
|
+
"This can be avoided by explicitly passing an options hash as the last argument.\n" +
|
771
|
+
"Called from #{Gem.location_of_caller.join(':')}"
|
769
772
|
return self.to_h
|
770
773
|
end
|
771
774
|
writer = RDF::Writer.for(meth.to_s[3..-1].to_sym) if meth.to_s[0,3] == "to_"
|
data/lib/rdf/model/statement.rb
CHANGED
@@ -426,7 +426,10 @@ module RDF
|
|
426
426
|
def method_missing(meth, *args)
|
427
427
|
case meth
|
428
428
|
when :to_hash
|
429
|
-
warn "[DEPRECATION] Statement#to_hash is deprecated, use Statement#to_h instead
|
429
|
+
warn "[DEPRECATION] RDF::Statement#to_hash is deprecated, use RDF::Statement#to_h instead.\n" +
|
430
|
+
"This is due to the introduction of keyword arugments that attempt to turn the last argument into a hash using #to_hash.\n" +
|
431
|
+
"This can be avoided by explicitly passing an options hash as the last argument.\n" +
|
432
|
+
"Called from #{Gem.location_of_caller.join(':')}"
|
430
433
|
self.to_h
|
431
434
|
else
|
432
435
|
super
|
data/lib/rdf/model/uri.rb
CHANGED
@@ -1299,7 +1299,10 @@ module RDF
|
|
1299
1299
|
def method_missing(meth, *args)
|
1300
1300
|
case meth
|
1301
1301
|
when :to_hash
|
1302
|
-
warn "[DEPRECATION] URI#to_hash is deprecated, use URI#to_h instead
|
1302
|
+
warn "[DEPRECATION] RDF::URI#to_hash is deprecated, use RDF::URI#to_h instead.\n" +
|
1303
|
+
"This is due to the introduction of keyword arugments that attempt to turn the last argument into a hash using #to_hash.\n" +
|
1304
|
+
"This can be avoided by explicitly passing an options hash as the last argument.\n" +
|
1305
|
+
"Called from #{Gem.location_of_caller.join(':')}"
|
1303
1306
|
self.to_h
|
1304
1307
|
else
|
1305
1308
|
super
|
data/lib/rdf/query/solution.rb
CHANGED
@@ -277,7 +277,10 @@ class RDF::Query
|
|
277
277
|
# @return [RDF::Term]
|
278
278
|
def method_missing(name, *args, &block)
|
279
279
|
if name == :to_hash
|
280
|
-
warn "[DEPRECATION] Solution#to_hash is deprecated, use Solution#to_h instead
|
280
|
+
warn "[DEPRECATION] RDF::Query::Solution#to_hash is deprecated, use RDF::Query::Solution#to_h instead.\n" +
|
281
|
+
"This is due to the introduction of keyword arugments that attempt to turn the last argument into a hash using #to_hash.\n" +
|
282
|
+
"This can be avoided by explicitly passing an options hash as the last argument.\n" +
|
283
|
+
"Called from #{Gem.location_of_caller.join(':')}"
|
281
284
|
self.to_h
|
282
285
|
elsif args.empty? && @bindings.has_key?(name.to_sym)
|
283
286
|
@bindings[name.to_sym]
|
data/lib/rdf/query/variable.rb
CHANGED
@@ -229,7 +229,10 @@ class RDF::Query
|
|
229
229
|
# @deprecated Use {#to_h} instead.
|
230
230
|
def method_missing(name, *args, &block)
|
231
231
|
if name == :to_hash
|
232
|
-
warn "[DEPRECATION] Variable#to_hash is deprecated, use Variable#to_h instead
|
232
|
+
warn "[DEPRECATION] RDF::Query::Variable#to_hash is deprecated, use RDF::Query::Variable#to_h instead.\n" +
|
233
|
+
"This is due to the introduction of keyword arugments that attempt to turn the last argument into a hash using #to_hash.\n" +
|
234
|
+
"This can be avoided by explicitly passing an options hash as the last argument.\n" +
|
235
|
+
"Called from #{Gem.location_of_caller.join(':')}"
|
233
236
|
self.to_h
|
234
237
|
elsif args.empty? && @bindings.has_key?(name.to_sym)
|
235
238
|
@bindings[name.to_sym]
|
data/lib/rdf/reader.rb
CHANGED
@@ -50,7 +50,7 @@ module RDF
|
|
50
50
|
# @yieldparam [Class] klass
|
51
51
|
# @return [Enumerator]
|
52
52
|
def self.each(&block)
|
53
|
-
|
53
|
+
RDF::Format.map(&:reader).reject(&:nil?).each(&block)
|
54
54
|
end
|
55
55
|
|
56
56
|
##
|
@@ -195,7 +195,7 @@ module RDF
|
|
195
195
|
if reader
|
196
196
|
reader.new(file, options, &block)
|
197
197
|
else
|
198
|
-
raise FormatError, "unknown RDF format: #{format_options.inspect}\nThis may be resolved with a require of the 'linkeddata' gem."
|
198
|
+
raise FormatError, "unknown RDF format: #{format_options.inspect}#{"\nThis may be resolved with a require of the 'linkeddata' gem." unless Object.const_defined?(:LinkedData)}"
|
199
199
|
end
|
200
200
|
end
|
201
201
|
end
|
data/lib/rdf/repository.rb
CHANGED
@@ -43,8 +43,8 @@ module RDF
|
|
43
43
|
# Repositories support transactions with a variety of ACID semantics:
|
44
44
|
#
|
45
45
|
# Atomicity is indicated by `#supports?(:atomic_write)`. When atomicity is
|
46
|
-
# supported, writes through
|
47
|
-
#
|
46
|
+
# supported, writes through {#transaction}, {#apply_changeset} and
|
47
|
+
# {#delete_insert} are applied atomically.
|
48
48
|
#
|
49
49
|
# Consistency should be guaranteed, in general. Repositories that don't
|
50
50
|
# support consistency, or that have specialized definitions of consistency
|
@@ -52,7 +52,7 @@ module RDF
|
|
52
52
|
# their documentation.
|
53
53
|
#
|
54
54
|
# Isolation may be supported at various levels, indicated by
|
55
|
-
#
|
55
|
+
# {#isolation_level}:
|
56
56
|
# - `:read_uncommitted`: Inserts & deletes in an uncommitted transaction
|
57
57
|
# scope may be visible to other transactions (or via `#each`, etc...)
|
58
58
|
# - `:read_committed`: Inserts & deletes may be visible to other
|
@@ -64,8 +64,8 @@ module RDF
|
|
64
64
|
# When two or more transactions attempt conflicting writes, only one of
|
65
65
|
# them may succeed.
|
66
66
|
#
|
67
|
-
# Durability is noted via
|
68
|
-
#
|
67
|
+
# Durability is noted via {RDF::Durable} support and {#durable?}
|
68
|
+
# /{#nondurable?}.
|
69
69
|
#
|
70
70
|
# @example Transational read from a repository
|
71
71
|
# repository.transaction do |tx|
|
data/lib/rdf/transaction.rb
CHANGED
@@ -39,21 +39,21 @@ module RDF
|
|
39
39
|
# end
|
40
40
|
#
|
41
41
|
# The base class provides an atomic write implementation depending on
|
42
|
-
#
|
42
|
+
# {RDF::Changeset} and using {Changeset#apply}. Custom {Repository} classes
|
43
43
|
# can implement a minimial write-atomic transactions by overriding
|
44
|
-
#
|
44
|
+
# {#apply_changeset}.
|
45
45
|
#
|
46
46
|
# Reads within a transaction run against the live repository by default
|
47
|
-
# (
|
48
|
-
# for snapshots by implementing
|
47
|
+
# ({#isolation_level} is `:read_committed`). Repositories may provide support
|
48
|
+
# for snapshots by implementing {Repository#snapshot} and responding `true` to
|
49
49
|
# `#supports?(:snapshots)`. In this case, the transaction will use the
|
50
|
-
#
|
50
|
+
# {RDF::Dataset} returned by {#snapshot} for reads (`:repeatable_read`).
|
51
51
|
#
|
52
52
|
# For datastores that support transactions natively, implementation of a
|
53
|
-
# custom
|
53
|
+
# custom {Transaction} subclass is recommended. The {Repository} is
|
54
54
|
# responsible for specifying snapshot support and isolation level as
|
55
55
|
# appropriate. Note that repositories may provide the snapshot isolation level
|
56
|
-
# without implementing
|
56
|
+
# without implementing {#snapshot}.
|
57
57
|
#
|
58
58
|
# @example A repository with a custom transaction class
|
59
59
|
# class MyRepository < RDF::Repository
|
data/lib/rdf/writer.rb
CHANGED
data/lib/rdf.rb
CHANGED
@@ -89,18 +89,12 @@ module RDF
|
|
89
89
|
end
|
90
90
|
|
91
91
|
##
|
92
|
-
#
|
92
|
+
# Cast to a URI. If already a URI, return the passed argument.
|
93
93
|
#
|
94
94
|
# @param (see RDF::URI#initialize)
|
95
95
|
# @return [RDF::URI]
|
96
96
|
def self.URI(*args, &block)
|
97
|
-
|
98
|
-
when RDF::URI then uri
|
99
|
-
else case
|
100
|
-
when uri.respond_to?(:to_uri) then uri.to_uri
|
101
|
-
else URI.new(*args, &block)
|
102
|
-
end
|
103
|
-
end
|
97
|
+
(uri = args.first).respond_to?(:to_uri) ? uri.to_uri : URI.new(*args, &block)
|
104
98
|
end
|
105
99
|
|
106
100
|
##
|
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: 2.2.
|
4
|
+
version: 2.2.3
|
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: 2017-01-
|
13
|
+
date: 2017-01-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: link_header
|