solis 0.110.0 → 0.112.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/query/construct.rb +2 -2
- data/lib/solis/query.rb +3 -3
- 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: 82dc7ade3450fb0d7de47a78457de162ed2cde0b4fd9e565ce54086d75e34b70
|
|
4
|
+
data.tar.gz: aa17c95bdf3d1f4b9e2f15da30934c2e56825871714d8e48cbd61601ca7efa76
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b16d71df6f49cf0de1ca943ed09f35c26e14cc648490806bc93c2e3f49af9cb50249740ac4e7a0ef8eec84c7986d24cbaa99bf6677c91fcaaa657717ef0ce8f8
|
|
7
|
+
data.tar.gz: 27dcfd4b835b56eff1993147dccdc6585ee6c80e349fa85a719d8ae054d7f44de0d499fc9ef54fc1850ce45ccf7aa6c1ea5bd8b206f88d72b5eb163695fe9611
|
|
@@ -23,7 +23,7 @@ module Solis
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def file_path
|
|
26
|
-
"#{ConfigFile.path}/constructs/#{@model.
|
|
26
|
+
"#{ConfigFile.path}/constructs/#{@model.model_class_name.tableize.singularize}.sparql"
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def file_path_hash
|
|
@@ -66,7 +66,7 @@ module Solis
|
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
def construct_graph_name
|
|
69
|
-
"#{parsed_graph_name.scheme}://#{@model.
|
|
69
|
+
"#{parsed_graph_name.scheme}://#{@model.model_class_name.underscore}.#{parsed_graph_name.host}/"
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
def created_at
|
data/lib/solis/query.rb
CHANGED
|
@@ -112,7 +112,7 @@ module Solis
|
|
|
112
112
|
per_page = params[:per_page] || 10
|
|
113
113
|
|
|
114
114
|
@offset = 0
|
|
115
|
-
@offset = current_page * per_page if current_page > 1
|
|
115
|
+
@offset = (current_page - 1) * per_page if current_page > 1
|
|
116
116
|
@limit = per_page
|
|
117
117
|
self
|
|
118
118
|
end
|
|
@@ -136,7 +136,7 @@ module Solis
|
|
|
136
136
|
private
|
|
137
137
|
|
|
138
138
|
def model_construct?
|
|
139
|
-
construct_name = @model.
|
|
139
|
+
construct_name = @model.model_class_name.tableize.singularize rescue @model.class.name.tableize.singularize
|
|
140
140
|
File.exist?("#{ConfigFile.path}/constructs/#{construct_name}.sparql")
|
|
141
141
|
rescue StandardError => e
|
|
142
142
|
false
|
|
@@ -177,7 +177,7 @@ module Solis
|
|
|
177
177
|
if core_query =~ /IN\((.*?)\)/
|
|
178
178
|
#limit = $1.gsub('"','').split(',').length
|
|
179
179
|
else
|
|
180
|
-
core_query += " LIMIT #{limit} OFFSET #{offset}"
|
|
180
|
+
core_query += "ORDER BY ?concept LIMIT #{limit} OFFSET #{offset}"
|
|
181
181
|
end
|
|
182
182
|
|
|
183
183
|
query = %(
|
data/lib/solis/version.rb
CHANGED