rdf 3.2.9 → 3.2.10
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/mutable.rb +1 -1
- data/lib/rdf/ntriples/writer.rb +12 -10
- data/lib/rdf/util/cache.rb +7 -1
- data/lib/rdf/util/logger.rb +5 -5
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 948292ebb4f6e10c59b67e873d2d14884c53c5fab199e901e4e4dadf768f379f
|
4
|
+
data.tar.gz: 8731942201a15bcef71284fe0a79a3bc9a97b878ef2c53b757869cadefdadf54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41d8fca7513dc56c6447b3b40d995b04f407e986ffc4e1a7fc86de7632ca026b6effdb8e7d3d815ba7ddb27c44e6af53a08bbde43390a065170e9a58446231d8
|
7
|
+
data.tar.gz: 5c9895f52363ffee6bc408d5e476a9a345d7aec62ec8594a8ca49f5c3ef9016f307741c0ef8b537d6fc49f714a25d2a4b0bee64631951191c750ef53809533c4
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.2.
|
1
|
+
3.2.10
|
data/lib/rdf/mixin/mutable.rb
CHANGED
@@ -41,7 +41,7 @@ module RDF
|
|
41
41
|
def load(url, graph_name: nil, **options)
|
42
42
|
raise TypeError.new("#{self} is immutable") if immutable?
|
43
43
|
|
44
|
-
Reader.open(url, base_uri: url
|
44
|
+
Reader.open(url, **options.merge(base_uri: url)) do |reader|
|
45
45
|
if graph_name
|
46
46
|
statements = []
|
47
47
|
reader.each_statement do |statement|
|
data/lib/rdf/ntriples/writer.rb
CHANGED
@@ -125,16 +125,18 @@ module RDF::NTriples
|
|
125
125
|
# @see http://www.w3.org/TR/n-triples/
|
126
126
|
def self.escape_ascii(u, encoding)
|
127
127
|
case (u = u.ord)
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
128
|
+
when (0x08) then "\\b"
|
129
|
+
when (0x09) then "\\t"
|
130
|
+
when (0x0A) then "\\n"
|
131
|
+
when (0x0C) then "\\f"
|
132
|
+
when (0x0D) then "\\r"
|
133
|
+
when (0x22) then "\\\""
|
134
|
+
when (0x5C) then "\\\\"
|
135
|
+
when (0x00..0x1F) then escape_utf16(u)
|
136
|
+
when (0x7F) then escape_utf16(u)
|
137
|
+
when (0x20..0x7E) then u.chr
|
138
|
+
else
|
139
|
+
raise ArgumentError.new("expected an ASCII character in (0x00..0x7F), but got 0x#{u.to_s(16)}")
|
138
140
|
end
|
139
141
|
end
|
140
142
|
|
data/lib/rdf/util/cache.rb
CHANGED
@@ -85,7 +85,7 @@ module RDF; module Util
|
|
85
85
|
id = value.__id__
|
86
86
|
@cache[key] = id
|
87
87
|
@index[id] = key
|
88
|
-
ObjectSpace.define_finalizer(value,
|
88
|
+
ObjectSpace.define_finalizer(value, finalizer_proc)
|
89
89
|
end
|
90
90
|
value
|
91
91
|
end
|
@@ -100,6 +100,12 @@ module RDF; module Util
|
|
100
100
|
@cache.delete(key)
|
101
101
|
@index.delete(id) if id
|
102
102
|
end
|
103
|
+
|
104
|
+
private
|
105
|
+
|
106
|
+
def finalizer_proc
|
107
|
+
proc { |id| @cache.delete(@index.delete(id)) }
|
108
|
+
end
|
103
109
|
end # ObjectSpaceCache
|
104
110
|
|
105
111
|
##
|
data/lib/rdf/util/logger.rb
CHANGED
@@ -181,10 +181,10 @@ module RDF; module Util
|
|
181
181
|
end
|
182
182
|
|
183
183
|
##
|
184
|
-
# @overload log_depth(options, &block)
|
184
|
+
# @overload log_depth(depth: 1, **options, &block)
|
185
185
|
# Increase depth around a method invocation
|
186
|
+
# @param [Integer] :depth Additional recursion depth
|
186
187
|
# @param [Hash{Symbol}] options (@options || {})
|
187
|
-
# @option options [Integer] :depth Additional recursion depth
|
188
188
|
# @option options [Logger, #<<] :logger
|
189
189
|
# @yield
|
190
190
|
# Yields with no arguments
|
@@ -194,8 +194,8 @@ module RDF; module Util
|
|
194
194
|
# @overload log_depth
|
195
195
|
# # Return the current log depth
|
196
196
|
# @return [Integer]
|
197
|
-
def log_depth(**options, &block)
|
198
|
-
self.logger(**options).log_depth(&block)
|
197
|
+
def log_depth(depth: 1, **options, &block)
|
198
|
+
self.logger(**options).log_depth(depth: depth, &block)
|
199
199
|
end
|
200
200
|
|
201
201
|
private
|
@@ -244,7 +244,7 @@ module RDF; module Util
|
|
244
244
|
end
|
245
245
|
|
246
246
|
##
|
247
|
-
# @overload log_depth(options, &block)
|
247
|
+
# @overload log_depth(depth: 1, **options, &block)
|
248
248
|
# Increase depth around a method invocation
|
249
249
|
# @param [Integer] depth (1) recursion depth
|
250
250
|
# @param [Hash{Symbol}] options (@options || {})
|
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.2.
|
4
|
+
version: 3.2.10
|
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:
|
13
|
+
date: 2023-04-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: link_header
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '3.
|
117
|
+
version: '3.12'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '3.
|
124
|
+
version: '3.12'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rspec-its
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '3.
|
145
|
+
version: '3.18'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '3.
|
152
|
+
version: '3.18'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: yard
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,14 +170,14 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: '1.
|
173
|
+
version: '1.10'
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: '1.
|
180
|
+
version: '1.10'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: faraday_middleware
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -295,7 +295,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
295
295
|
- !ruby/object:Gem::Version
|
296
296
|
version: '0'
|
297
297
|
requirements: []
|
298
|
-
rubygems_version: 3.
|
298
|
+
rubygems_version: 3.4.6
|
299
299
|
signing_key:
|
300
300
|
specification_version: 4
|
301
301
|
summary: A Ruby library for working with Resource Description Framework (RDF) data.
|