solis 0.85.0 → 0.87.0
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/lib/solis/model.rb +7 -0
- data/lib/solis/shape/reader/sheet.rb +7 -7
- data/lib/solis/version.rb +1 -1
- data/solis.gemspec +1 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d5926e4dab3d02865ae5333e319a8973c79e1b0b49d1fc86ec5cd17d32204ed
|
4
|
+
data.tar.gz: d33d664a73dcb56231d1fc0364314100a114d83b0c2c75c7c11479aa00fba4b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64bc93c8a1767fc786d2c2528762e7707aad9e33cbe1ec9d9d1208ccbd12f76d65e8bbd244ae88a7a2a89147eb7facc4194d41bcf38cc04c6c0d29a055da207f
|
7
|
+
data.tar.gz: ce928eaf3a1b43bf1a93678dd5f47544265f47e71df9c61c64d5c1819056aade67fd175fc54b611e03a6e8eb0d5d7c2b9c761b812c0e3a8a2c16a2557130d5c0
|
data/lib/solis/model.rb
CHANGED
@@ -192,6 +192,7 @@ values ?s {<#{self.graph_id}>}
|
|
192
192
|
id = attributes.delete('id')
|
193
193
|
|
194
194
|
sparql = SPARQL::Client.new(self.class.sparql_endpoint)
|
195
|
+
#sparql = Solis::Store::Sparql::Client.new(self.class.sparql_endpoint, self.class.graph_name)
|
195
196
|
|
196
197
|
original_klass = self.query.filter({ language: nil, filters: { id: [id] } }).find_all.map { |m| m }&.first
|
197
198
|
raise Solis::Error::NotFoundError if original_klass.nil?
|
@@ -274,10 +275,12 @@ values ?s {<#{self.graph_id}>}
|
|
274
275
|
after_update_proc&.call(updated_klass, data)
|
275
276
|
|
276
277
|
data
|
278
|
+
#rescue EOFError => e
|
277
279
|
rescue StandardError => e
|
278
280
|
original_graph = as_graph(original_klass, false)
|
279
281
|
Solis::LOGGER.error(e.message)
|
280
282
|
Solis::LOGGER.error original_graph.dump(:ttl)
|
283
|
+
Solis::LOGGER.error delete_insert_query
|
281
284
|
sparql.insert_data(original_graph, graph: original_graph.name)
|
282
285
|
|
283
286
|
raise e
|
@@ -308,6 +311,10 @@ values ?s {<#{self.graph_id}>}
|
|
308
311
|
end
|
309
312
|
LOGGER.info("ID(#{id}) generated for #{self.name} in #{id_retries} retries") if ConfigFile[:debug]
|
310
313
|
model.instance_variable_set("@id", id)
|
314
|
+
elsif id.to_s =~ /^https?:\/\//
|
315
|
+
id = id.to_s.split('/').last
|
316
|
+
LOGGER.info("ID(#{id}) normalised for #{self.name}") if ConfigFile[:debug]
|
317
|
+
model.instance_variable_set("@id", id)
|
311
318
|
end
|
312
319
|
model
|
313
320
|
rescue StandardError => e
|
@@ -481,16 +481,16 @@ hide empty members
|
|
481
481
|
"required" => []
|
482
482
|
}
|
483
483
|
|
484
|
-
graph.query([nil, RDF.type, SHACL.NodeShape]) do |shape|
|
484
|
+
graph.query([nil, RDF.type, RDF::Vocab::SHACL.NodeShape]) do |shape|
|
485
485
|
shape_subject = shape.subject
|
486
486
|
|
487
|
-
graph.query([shape_subject, SHACL.property, nil]) do |prop_stmt|
|
487
|
+
graph.query([shape_subject, RDF::Vocab::SHACL.property, nil]) do |prop_stmt|
|
488
488
|
prop_subject = prop_stmt.object
|
489
|
-
prop_name = graph.query([prop_subject, SHACL.path, nil]).first&.object.to_s
|
490
|
-
datatype = graph.query([prop_subject, SHACL.datatype, nil]).first&.object
|
491
|
-
min_count = graph.query([prop_subject, SHACL.minCount, nil]).first&.object&.to_i
|
492
|
-
max_count = graph.query([prop_subject, SHACL.maxCount, nil]).first&.object&.to_i
|
493
|
-
pattern = graph.query([prop_subject, SHACL.pattern, nil]).first&.object&.to_s
|
489
|
+
prop_name = graph.query([prop_subject, RDF::Vocab::SHACL.path, nil]).first&.object.to_s
|
490
|
+
datatype = graph.query([prop_subject, RDF::Vocab::SHACL.datatype, nil]).first&.object
|
491
|
+
min_count = graph.query([prop_subject, RDF::Vocab::SHACL.minCount, nil]).first&.object&.to_i
|
492
|
+
max_count = graph.query([prop_subject, RDF::Vocab::SHACL.maxCount, nil]).first&.object&.to_i
|
493
|
+
pattern = graph.query([prop_subject, RDF::Vocab::SHACL.pattern, nil]).first&.object&.to_s
|
494
494
|
|
495
495
|
json_schema["properties"][prop_name] = {}
|
496
496
|
json_schema["properties"][prop_name]["type"] = datatype.to_s.split("#").last.downcase if datatype
|
data/lib/solis/version.rb
CHANGED
data/solis.gemspec
CHANGED
@@ -42,6 +42,7 @@ Gem::Specification.new do |spec|
|
|
42
42
|
spec.add_runtime_dependency 'psych', '~> 5.1'
|
43
43
|
spec.add_runtime_dependency 'csv'
|
44
44
|
spec.add_runtime_dependency 'mutex_m'
|
45
|
+
spec.add_runtime_dependency 'ostruct'
|
45
46
|
# spec.add_runtime_dependency 'rdf-edtf', '~> 1.1.2'
|
46
47
|
|
47
48
|
spec.add_development_dependency 'rake', '~> 13.0'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.87.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mehmet Celik
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: activesupport
|
@@ -219,6 +219,20 @@ dependencies:
|
|
219
219
|
- - ">="
|
220
220
|
- !ruby/object:Gem::Version
|
221
221
|
version: '0'
|
222
|
+
- !ruby/object:Gem::Dependency
|
223
|
+
name: ostruct
|
224
|
+
requirement: !ruby/object:Gem::Requirement
|
225
|
+
requirements:
|
226
|
+
- - ">="
|
227
|
+
- !ruby/object:Gem::Version
|
228
|
+
version: '0'
|
229
|
+
type: :runtime
|
230
|
+
prerelease: false
|
231
|
+
version_requirements: !ruby/object:Gem::Requirement
|
232
|
+
requirements:
|
233
|
+
- - ">="
|
234
|
+
- !ruby/object:Gem::Version
|
235
|
+
version: '0'
|
222
236
|
- !ruby/object:Gem::Dependency
|
223
237
|
name: rake
|
224
238
|
requirement: !ruby/object:Gem::Requirement
|
@@ -321,7 +335,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
321
335
|
- !ruby/object:Gem::Version
|
322
336
|
version: '0'
|
323
337
|
requirements: []
|
324
|
-
rubygems_version: 3.6.
|
338
|
+
rubygems_version: 3.6.8
|
325
339
|
specification_version: 4
|
326
340
|
summary: Turn any SHACL file into an API, ORM, documentation, ...
|
327
341
|
test_files: []
|