solis 0.76.0 → 0.78.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/solis/model.rb +10 -7
- data/lib/solis/query.rb +1 -1
- data/lib/solis/shape/data_types.rb +1 -1
- data/lib/solis/version.rb +1 -1
- data/lib/solis.rb +1 -0
- data/solis.gemspec +3 -3
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 424ee1c91533e6fe3238285da382f034457c338c7bbd4e8f44c9a6cb2bfffd88
|
4
|
+
data.tar.gz: fbe89a99f3a7c162dba2446769127779f988163051331913cf7be44f7dd51b00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02a9645e8fa481276cfaa6320de404482be850035930d54df7c214a420746710afadd5ced2ec23bc7df3c06a1c08f47759fd641aff20cbd9e2904fc8e1bef4a5
|
7
|
+
data.tar.gz: 0af8c1358122caff1c2ecd36b2994cec8730d5db6f9cf5d59db367cd76f1eb20edf154629c97788a295df8db37bbec5b8816c3e5119510220c1dae062b3ab513
|
data/lib/solis/model.rb
CHANGED
@@ -175,8 +175,8 @@ values ?s {<#{self.graph_id}>}
|
|
175
175
|
result = sparql.insert_data(graph, graph: graph.name)
|
176
176
|
end
|
177
177
|
|
178
|
-
after_create_proc&.call(
|
179
|
-
|
178
|
+
after_create_proc&.call(self)
|
179
|
+
self
|
180
180
|
rescue StandardError => e
|
181
181
|
Solis::LOGGER.error e.message
|
182
182
|
Solis::LOGGER.error e.message
|
@@ -210,7 +210,7 @@ values ?s {<#{self.graph_id}>}
|
|
210
210
|
embedded_data = properties_to_hash(embedded)
|
211
211
|
embedded.update(embedded_data, validate_dependencies, false)
|
212
212
|
else
|
213
|
-
embedded.save(validate_dependencies, false)
|
213
|
+
value = embedded.save(validate_dependencies, false)
|
214
214
|
end
|
215
215
|
else
|
216
216
|
Solis::LOGGER.info("#{embedded.class.name} is embedded not allowed to change. Skipping")
|
@@ -245,9 +245,9 @@ values ?s {<#{self.graph_id}>}
|
|
245
245
|
|
246
246
|
insert_graph = as_graph(updated_klass, true)
|
247
247
|
|
248
|
-
# puts delete_graph.dump(:ttl)
|
249
|
-
# puts insert_graph.dump(:ttl)
|
250
|
-
# puts where_graph.dump(:ttl)
|
248
|
+
# puts delete_graph.dump(:ttl) if ConfigFile[:debug]
|
249
|
+
# puts insert_graph.dump(:ttl) if ConfigFile[:debug]
|
250
|
+
# puts where_graph.dump(:ttl) if ConfigFile[:debug]
|
251
251
|
|
252
252
|
# if ConfigFile[:debug]
|
253
253
|
delete_insert_query = SPARQL::Client::Update::DeleteInsert.new(delete_graph, insert_graph, where_graph, graph: insert_graph.name).to_s
|
@@ -296,7 +296,7 @@ values ?s {<#{self.graph_id}>}
|
|
296
296
|
if id.nil? || (id.is_a?(String) && id&.empty?)
|
297
297
|
id_retries = 0
|
298
298
|
|
299
|
-
while id.nil? || sparql.query("ASK WHERE { ?s <#{self.graph_name}
|
299
|
+
while id.nil? || sparql.query("ASK WHERE { ?s <#{self.graph_name}id> \"#{id}\" }")
|
300
300
|
id = SecureRandom.uuid
|
301
301
|
id_retries+=1
|
302
302
|
end
|
@@ -304,6 +304,9 @@ values ?s {<#{self.graph_id}>}
|
|
304
304
|
model.instance_variable_set("@id", id)
|
305
305
|
end
|
306
306
|
model
|
307
|
+
rescue StandardError => e
|
308
|
+
Solis::LOGGER.error(e.message)
|
309
|
+
raise Solis::Error::GeneralError, "Error generating id for #{@model_name}"
|
307
310
|
end
|
308
311
|
|
309
312
|
def self.metadata
|
data/lib/solis/query.rb
CHANGED
@@ -119,7 +119,7 @@ module Solis
|
|
119
119
|
core_query = core_query(relationship)
|
120
120
|
count_query = core_query.gsub(/SELECT .* WHERE/, 'SELECT (COUNT(distinct ?concept) as ?count) WHERE')
|
121
121
|
|
122
|
-
count_query = count_query.split('a ?type')[0]+'a ?type }'
|
122
|
+
# count_query = count_query.split('a ?type')[0]+'a ?type }'
|
123
123
|
result = sparql_client.query(count_query)
|
124
124
|
solution = result.first
|
125
125
|
solution.nil? ? 0 : solution[:count].object || 0
|
@@ -219,7 +219,7 @@ read_lang_string_array_type = lang_string_array_definition.constructor do |i|
|
|
219
219
|
# i = i.is_a?(String) ? {:"@value" => i, :"@language" => language} : i
|
220
220
|
# i[:"@value"]=[i[:"@value"]] unless i[:"@value"].is_a?(Array)
|
221
221
|
|
222
|
-
i
|
222
|
+
i.is_a?(Array) ? i : [i]
|
223
223
|
rescue StandardError => e
|
224
224
|
i
|
225
225
|
end
|
data/lib/solis/version.rb
CHANGED
data/lib/solis.rb
CHANGED
data/solis.gemspec
CHANGED
@@ -28,13 +28,13 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.require_paths = ['lib']
|
29
29
|
|
30
30
|
spec.add_runtime_dependency 'activesupport', '~> 7.0'
|
31
|
-
spec.add_runtime_dependency 'http', '~> 5.
|
31
|
+
spec.add_runtime_dependency 'http', '~> 5.2'
|
32
32
|
spec.add_runtime_dependency 'graphiti', '~> 1.7'
|
33
33
|
spec.add_runtime_dependency 'moneta', '~> 1.6'
|
34
34
|
spec.add_runtime_dependency 'linkeddata', '~> 3.3'
|
35
35
|
spec.add_runtime_dependency 'google_drive', '~> 3.0'
|
36
|
-
spec.add_runtime_dependency 'json', '~> 2.
|
37
|
-
spec.add_runtime_dependency 'hashdiff', '~> 1.
|
36
|
+
spec.add_runtime_dependency 'json', '~> 2.7'
|
37
|
+
spec.add_runtime_dependency 'hashdiff', '~> 1.1'
|
38
38
|
spec.add_runtime_dependency 'iso8601', '~> 0.13.0'
|
39
39
|
spec.add_runtime_dependency 'connection_pool', '~> 2.4'
|
40
40
|
spec.add_runtime_dependency 'uuidtools', '~> 2.2.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.78.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mehmet Celik
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '5.
|
33
|
+
version: '5.2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '5.
|
40
|
+
version: '5.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: graphiti
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,28 +100,28 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '2.
|
103
|
+
version: '2.7'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '2.
|
110
|
+
version: '2.7'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: hashdiff
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '1.
|
117
|
+
version: '1.1'
|
118
118
|
type: :runtime
|
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: '1.
|
124
|
+
version: '1.1'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: iso8601
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|