solis 0.84.0 → 0.85.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2980fd83ee3bd59017c9831136d40f24402c80c3591578b27d3cc03ad132b90
4
- data.tar.gz: 248019990f65b20f0bfb2b605f868c2658b002e02db3c5a61a7657d83e071bd0
3
+ metadata.gz: c5ae153b954901d398a8c6a517037479a328328f73ca6be4aa09329b9a3a8520
4
+ data.tar.gz: e88033fe5e255ae465ec8b8dbfa2f41e068992096d947f8c7eef1a1725c1e714
5
5
  SHA512:
6
- metadata.gz: 720dd30ae84033d977cf04f6d6736745f24d8b32b06b3dedd01e09c05d5f72726a6ee2f2c74249ea8e87bc1bde8daf9bd2fe810bf139dc8d48e8ff70c7dd611d
7
- data.tar.gz: 82855397f33cf99f61f6a7d53b3939035305f0570b2ee7965ca353402891d6b752351d19c414c2a3ee74bda22e7774a3f70f7d223b2f974c0c227610307e41a1
6
+ metadata.gz: 127c75074573b7890e27af2563059cc74cbb87e0b8d60f8d9617619cc5028458e13feecabd64691881bc33fa990dbc67b300f2eea6f4f1ed257b6ce8ee2d1890
7
+ data.tar.gz: c197b88286906b2640d2b5bf13315cff2ceafe9c2980ba8d513c948f4520de6dd692aaf821ba22356f79937e2dace79964a4297b1b2a20ddf9025bc966a12c9b
data/lib/solis/model.rb CHANGED
@@ -499,16 +499,7 @@ values ?s {<#{self.graph_id}>}
499
499
  raise Solis::Error::InvalidAttributeError, "#{hierarchy.join('.')}~#{klass.name}.#{attribute} min=#{metadata[:mincount]} and max=#{metadata[:maxcount]}" if data.nil?
500
500
  end
501
501
 
502
- if data.nil? && metadata.key?(:maxcount) && ( metadata[:maxcount].nil? || metadata[:maxcount] > 0) && graph.query(RDF::Query.new({ attribute.to_sym => { RDF.type => metadata[:node] } })).size == 0
503
- if data.nil?
504
- uuid = id.value.split('/').last
505
- original_klass = klass.query.filter({ filters: { id: [ uuid ] } }).find_all { |f| f.id == uuid }.first || nil
506
- unless original_klass.nil?
507
- klass = original_klass
508
- data = klass.instance_variable_get("@#{attribute}")
509
- end
510
- end
511
- #if data is still nil
502
+ if data && metadata.key?(:maxcount) && ( metadata[:maxcount] && metadata[:maxcount] > 0) && graph.query(SPARQL.parse("select (count(?s) as ?max_subject) where { ?s #{self.class.graph_prefix}:#{attribute} ?p}")).first.max_subject > metadata[:maxcount].to_i
512
503
  raise Solis::Error::InvalidAttributeError, "#{hierarchy.join('.')}~#{klass.name}.#{attribute} min=#{metadata[:mincount]} and max=#{metadata[:maxcount]}" if data.nil?
513
504
  end
514
505
 
data/lib/solis/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Solis
2
- VERSION = "0.84.0"
2
+ VERSION = "0.85.0"
3
3
  end
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.84.0
4
+ version: 0.85.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mehmet Celik
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-03-24 00:00:00.000000000 Z
10
+ date: 2025-03-25 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activesupport