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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73bbb2bcc84c974f9ecfe2b1f9a41cf445273e76cfdbd6fd84b6141790b85092
4
- data.tar.gz: 5a339b4166238e83c491555bc084e9132491da17c54234252b4bc60b5b8451db
3
+ metadata.gz: 948292ebb4f6e10c59b67e873d2d14884c53c5fab199e901e4e4dadf768f379f
4
+ data.tar.gz: 8731942201a15bcef71284fe0a79a3bc9a97b878ef2c53b757869cadefdadf54
5
5
  SHA512:
6
- metadata.gz: d083cfe87a7894a616966a8d0bdc9a4d0b11814fde48a95bf94f83cc0fcc6ffd939b0ddd765079e0ca2514fbc7df182bebea0870d4a7d8f2817bba72cb7c4bab
7
- data.tar.gz: ce59b7a5f8340f9fee88ad374c1452df356312ad3621e64e678054508616b32648e7cb49fc9fd42563cc8c8079d99500d9c779a9dcf1924e0804ca97e17ea69e
6
+ metadata.gz: 41d8fca7513dc56c6447b3b40d995b04f407e986ffc4e1a7fc86de7632ca026b6effdb8e7d3d815ba7ddb27c44e6af53a08bbde43390a065170e9a58446231d8
7
+ data.tar.gz: 5c9895f52363ffee6bc408d5e476a9a345d7aec62ec8594a8ca49f5c3ef9016f307741c0ef8b537d6fc49f714a25d2a4b0bee64631951191c750ef53809533c4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.9
1
+ 3.2.10
@@ -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, **options) do |reader|
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|
@@ -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
- when (0x00..0x07) then escape_utf16(u)
129
- when (0x0A) then "\\n"
130
- when (0x0D) then "\\r"
131
- when (0x0E..0x1F) then escape_utf16(u)
132
- when (0x22) then "\\\""
133
- when (0x5C) then "\\\\"
134
- when (0x7F) then escape_utf16(u)
135
- when (0x00..0x7F) then u.chr
136
- else
137
- raise ArgumentError.new("expected an ASCII character in (0x00..0x7F), but got 0x#{u.to_s(16)}")
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
 
@@ -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, proc {|id| @cache.delete(@index.delete(id))})
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
  ##
@@ -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.9
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: 2022-08-07 00:00:00.000000000 Z
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.10'
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.10'
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.14'
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.14'
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.8'
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.8'
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.3.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.