solis 0.101.0 → 0.102.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/graph.rb +1 -1
- data/lib/solis/query/run.rb +8 -1
- data/lib/solis/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 108217e78e1d2a9c5ded6c35d898ff4733876fe243392ca98b4af0d71e087925
|
|
4
|
+
data.tar.gz: fdd55b2bf75f0751c4bd77571664b54a469d432523f348b2fc1edcd61614f5a3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '08cbb13f0d745f1fc8f3743e0ca732286c3f4f121122e91ab3dd684cc086fe3497c7e61a927cf1b07d04b4236cad02a31a9125fa9ba53839a809dc8b1d45602a'
|
|
7
|
+
data.tar.gz: 5c23a8c8a82f732e9657e725c72b50cb71b0bc757d61bd4f7549efd56c377bf746f953c6eb3e8953cb64468299629bfeca896e5f1514c80291d0dfa52de9f7c1
|
data/lib/solis/graph.rb
CHANGED
|
@@ -16,7 +16,7 @@ module Solis
|
|
|
16
16
|
raise "Please provide a graph_name, graph_prefix and sparql_endpoint option" if options.nil? || options.empty?
|
|
17
17
|
cloned_options = options.clone
|
|
18
18
|
|
|
19
|
-
Solis::Options.instance.set = options
|
|
19
|
+
Solis::Options.instance.set = options.merge(solis: self)
|
|
20
20
|
|
|
21
21
|
@global_resource_stack = []
|
|
22
22
|
@graph = graph
|
data/lib/solis/query/run.rb
CHANGED
|
@@ -149,7 +149,14 @@ class Solis::Query::Runner
|
|
|
149
149
|
next if key.start_with?('@') # Skip internal markers
|
|
150
150
|
next if key == '_id' || key == 'id' # Already added
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
if obj.key?('@type') &&Solis::Options.instance.get[:solis].shape?(obj['@type'])
|
|
153
|
+
entity = Solis::Options.instance.get[:solis].shape_as_model(obj['@type'])
|
|
154
|
+
entity_maxcount = entity.metadata[:attributes][key][:maxcount]
|
|
155
|
+
end
|
|
156
|
+
resolved_value = resolve_value(value, objects_index, max_depth, visited, current_depth)
|
|
157
|
+
resolved_value = [resolved_value] if (entity_maxcount.nil? || entity_maxcount > 1) && !resolved_value.is_a?(Array)
|
|
158
|
+
|
|
159
|
+
result[key] = resolved_value
|
|
153
160
|
end
|
|
154
161
|
|
|
155
162
|
result
|
data/lib/solis/version.rb
CHANGED