dxlite 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/dxlite.rb +22 -2
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f01e71eb6492777d8d892c3ba33c662de229a26adb5141aa946355a7202c0a0
|
4
|
+
data.tar.gz: f84b22c52e8decf1a0cf870e322463d1de725523ed02acf0d545c52ea5a167c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee41e2b9acd447bb03536592dce815cbd7c803805bcefd9676392fde951446aab689748614031d1e5405d263f5429b91767cc72f1b39924b728b141f4bcd2fcb
|
7
|
+
data.tar.gz: 51d67cc2d50bcd0111ef60571cf2421d2854245f3408e287f375502aaf49ef824d6ec2bc34e0c3b61612b47206ea807965780b1fc3c0a42ea6da8241c22f4442
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/dxlite.rb
CHANGED
@@ -94,8 +94,16 @@ class DxLite
|
|
94
94
|
if key then
|
95
95
|
|
96
96
|
r = records.find {|x| x[:body][key.to_sym] == rawh[key.to_sym]}
|
97
|
+
|
97
98
|
if r then
|
99
|
+
|
100
|
+
# if the client is using create() instead of update() to update a
|
101
|
+
# record then update the record
|
102
|
+
#
|
103
|
+
r[:body].merge!(rawh)
|
98
104
|
r[:last_modified] = Time.now.to_s
|
105
|
+
save() if @autosave
|
106
|
+
|
99
107
|
return false
|
100
108
|
end
|
101
109
|
|
@@ -225,13 +233,24 @@ class DxLite
|
|
225
233
|
record_name = schema()[/(?<=\/)[^\(]+/]
|
226
234
|
|
227
235
|
records = @records.map {|h| {record_name.to_sym => h} }
|
228
|
-
|
236
|
+
|
237
|
+
a = if @summary[:order] == 'descending' then
|
238
|
+
|
239
|
+
records.sort_by do |x|
|
240
|
+
x[:last_modified] || x[:created]
|
241
|
+
end.reverse
|
242
|
+
|
243
|
+
else
|
244
|
+
|
245
|
+
records
|
246
|
+
|
247
|
+
end
|
229
248
|
|
230
249
|
h = {
|
231
250
|
root_name.to_sym =>
|
232
251
|
{
|
233
252
|
summary: @summary,
|
234
|
-
records:
|
253
|
+
records: a
|
235
254
|
}
|
236
255
|
}
|
237
256
|
|
@@ -285,6 +304,7 @@ class DxLite
|
|
285
304
|
if r then
|
286
305
|
|
287
306
|
r[:body].merge!(obj)
|
307
|
+
r[:last_modified] = Time.now
|
288
308
|
save() if @autosave
|
289
309
|
|
290
310
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dxlite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
9pK+pqislEMFrWscGeMsc6YMS7ALxEujTuwTWyxmWAXnYft4ff2O1Zh2sPmdOlgf
|
36
36
|
camg7d8q+VZZzAtz0cFc4pip
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2022-03-
|
38
|
+
date: 2022-03-21 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: recordx
|
metadata.gz.sig
CHANGED
Binary file
|