forest_admin_agent 1.0.0.pre.beta.45 → 1.0.0.pre.beta.46
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 902dc1f47c4e03c5c095ed68b4ba425fe9bc4254cadf75f9f8f6a2ecbe2518c9
|
4
|
+
data.tar.gz: f005862d1078eddd5564089e7d6c0aefa6a1a8396b66d7dc9eb0f36f80bce5a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 484f457793fd4ac6b07419d243584293a9532b1d8d2dbb1ed04b0eb5258bf1355bfcdb3b5bbbd0bc68bb444e12792e071f1061ac037d2f9cbfbe39a74f7adf8d
|
7
|
+
data.tar.gz: 789321428f95b0f2e183be61888c890ce9b9b2feef8a7928658d16d87db3a529ed1a54936ca13b73a4bf4d4fb076bc70c615ee13fe12003806bc984b1d55ad3f
|
@@ -106,15 +106,24 @@ module ForestAdminAgent
|
|
106
106
|
end
|
107
107
|
|
108
108
|
def self.parse_sort(collection, args)
|
109
|
-
|
109
|
+
raw_sort_string = args.dig(:params, :sort)
|
110
110
|
|
111
|
-
return SortUtils::SortFactory.by_primary_keys(collection) unless
|
111
|
+
return SortUtils::SortFactory.by_primary_keys(collection) unless raw_sort_string
|
112
112
|
|
113
|
-
|
114
|
-
|
115
|
-
|
113
|
+
sort_list = []
|
114
|
+
raw_sort_string.split(',').map do |sort_string|
|
115
|
+
field = sort_string.tr('.', ':')
|
116
|
+
ascending = !sort_string.start_with?('-')
|
117
|
+
field = field[1..] unless ascending
|
118
|
+
|
119
|
+
sort_list.push({ field: field, ascending: ascending })
|
120
|
+
end
|
121
|
+
|
122
|
+
sort = Sort.new(sort_list)
|
116
123
|
|
117
124
|
ForestAdminDatasourceToolkit::Validations::SortValidator.validate(collection, sort)
|
125
|
+
|
126
|
+
sort
|
118
127
|
end
|
119
128
|
end
|
120
129
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_admin_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.beta.
|
4
|
+
version: 1.0.0.pre.beta.46
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthieu
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-05-
|
12
|
+
date: 2024-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|