solis 0.76.0 → 0.77.0

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: 14e23fd1f3bfd75d6c0349299ec95fd1b298224be106532bd0af5e85ea7eeef2
4
- data.tar.gz: 73e6ccc7ca60e80c6afe349c0384b416b00a9de7661509995ac7cffe7b35aa2e
3
+ metadata.gz: d19144e051731d0bebae424722a0c9ccc463b5ba7a22b00b889f8704427d97e9
4
+ data.tar.gz: ac9ba93e90607b7d676cbc8aee316ea73fc15fa0c6289cd6496f3658d81bcd41
5
5
  SHA512:
6
- metadata.gz: 6994d3c3a89e1456c71b3e09bd846c20a93076d4b3d1a179fa129ba313066ba2534b1eb3288b71c06eb5e0ea90d9a0c7d7c31270e7972e832fb7212b9b6373eb
7
- data.tar.gz: b382ce56230855d7a6716b90e43f97734bd9b82335f0cdeac14708787a551cab2c573c61d60c2b4c6df691249d1abea7a04c1da24e30097750da41e4af6b9bd1
6
+ metadata.gz: 7e09a77d9bc7576b5cf5332e2f0892c0d8995f84f3beea784662633a144d3d7d0881e1b56b15e0f07ff1efe23a7d090eed28c3c21844eaded207f9d07404e7f9
7
+ data.tar.gz: 33fe02937e9de9236ea87616fc92597e5ab95c53760e52d00e453b5a80d2bb5b4e48be9a291ac5aedde89f2d529a380664c8f81e1ef7f916a8e267a2d1266e10
data/lib/solis/model.rb CHANGED
@@ -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}/id> \"#{id}\" }")
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
@@ -1,3 +1,3 @@
1
1
  module Solis
2
- VERSION = "0.76.0"
2
+ VERSION = "0.77.0"
3
3
  end
data/lib/solis.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "bundler"
2
2
  Bundler.require
3
3
 
4
+ require 'ostruct'
4
5
  require 'logger'
5
6
  require "solis/version"
6
7
  require 'solis/config_file'
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.1'
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.6'
37
- spec.add_runtime_dependency 'hashdiff', '~> 1.0'
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.76.0
4
+ version: 0.77.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-07-03 00:00:00.000000000 Z
11
+ date: 2024-10-10 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.1'
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.1'
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.6'
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.6'
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.0'
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.0'
124
+ version: '1.1'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: iso8601
127
127
  requirement: !ruby/object:Gem::Requirement