solis 0.75.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: d927fa3a6e648f3d4359df7bc05f60d3ac2cdd62e36ae8a3c1bd7b9845c6c13c
4
- data.tar.gz: 92475ada9028fa045fe7f8f5b07a9ccd8b03db2ecb81f67a978dbecdd6eef714
3
+ metadata.gz: d19144e051731d0bebae424722a0c9ccc463b5ba7a22b00b889f8704427d97e9
4
+ data.tar.gz: ac9ba93e90607b7d676cbc8aee316ea73fc15fa0c6289cd6496f3658d81bcd41
5
5
  SHA512:
6
- metadata.gz: cb0e60d9e4d347e488bac8429e6c1481ad3344cdf1acc5170da37079d82cdc5a1e412ca28b648edaf4db642d6481a3fa07afb45bb176688cbef142b32c9d96b3
7
- data.tar.gz: 8fab47cd98128888ed69e3c1af21df1a19bc2872dc05be70fd23a66fc25b2738b344353b28ebce4e7a7d26fb81647d1bc8b0e61ad5bd70fbfaa633fe7d45e57c
6
+ metadata.gz: 7e09a77d9bc7576b5cf5332e2f0892c0d8995f84f3beea784662633a144d3d7d0881e1b56b15e0f07ff1efe23a7d090eed28c3c21844eaded207f9d07404e7f9
7
+ data.tar.gz: 33fe02937e9de9236ea87616fc92597e5ab95c53760e52d00e453b5a80d2bb5b4e48be9a291ac5aedde89f2d529a380664c8f81e1ef7f916a8e267a2d1266e10
data/lib/solis/graph.rb CHANGED
@@ -309,7 +309,8 @@ module Solis
309
309
  remote_resource.id =~ /^http/ ? remote_resource.id.split('/').last : remote_resource.id
310
310
  end
311
311
  end
312
- "#{resource.class.graph_name.gsub(/\/$/,'')}/#{belongs_to_resource.name.tableize}?filter[id]=#{resource_ids.join(',')}" unless remote_resources.nil? || resource_ids.empty?
312
+ #"#{resource.class.graph_name.gsub(/\/$/,'')}/#{belongs_to_resource.name.tableize}?filter[id]=#{resource_ids.join(',')}" unless remote_resources.nil? || resource_ids.empty?
313
+ "#{resource.class.graph_name.gsub(/\/$/,'')}/#{remote_resources.first.name.tableize}?filter[id]=#{resource_ids.join(',')}" unless remote_resources.nil? || resource_ids.empty?
313
314
  end
314
315
  end
315
316
  #
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
@@ -394,6 +397,10 @@ values ?s {<#{self.graph_id}>}
394
397
  m
395
398
  end
396
399
 
400
+ def self.construct(level = 0)
401
+ raise 'to bo implemented'
402
+ end
403
+
397
404
  def self.model_before_read(&blk)
398
405
  self.before_read_proc = blk
399
406
  end
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.75.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'
32
- spec.add_runtime_dependency 'graphiti', '~> 1.3'
31
+ spec.add_runtime_dependency 'http', '~> 5.2'
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.75.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-03-27 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,28 +30,28 @@ 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
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.3'
47
+ version: '1.7'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.3'
54
+ version: '1.7'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: moneta
57
57
  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
@@ -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.5.6
298
+ rubygems_version: 3.5.10
299
299
  signing_key:
300
300
  specification_version: 4
301
301
  summary: Turn any SHACL file into an API, ORM, documentation, ...