dxlite 0.3.3 → 0.3.4
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.tar.gz.sig +0 -0
- data/lib/dxlite.rb +9 -4
- 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: 28362d972f8389e1b817f21be4fb9524ca4188761b4f4128c21a886eb67a11a5
|
4
|
+
data.tar.gz: df45a19238f82766d2abd14f08dc0f105b6bb1d66e4ddf85c46e4089f2600c8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 515c3ed54028756c1ff4a5e660f204b878b0c2098f8de61ac43096c7b3191d2a2ffaf9b8d1f0a5f8fed62d80dd22845661c2927bc40bddc5a44c02986e1b32bc
|
7
|
+
data.tar.gz: e8aa916f1ebf5118440c45d75c75ec116d64cd98215ba1a0b9d85c49d8c4d92530d7686f1833097506f6453e8370587700c1dd67aba88ab51ff4ee0c24703932
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/dxlite.rb
CHANGED
@@ -95,11 +95,14 @@ class DxLite
|
|
95
95
|
|
96
96
|
id ||= @records.map {|x| x[:id].to_i}.max.to_i + 1
|
97
97
|
h2 = custom_attributes
|
98
|
-
|
99
|
-
|
100
|
-
|
98
|
+
h3 = fields.map {|x| [x.to_sym, nil] }.to_h.merge(rawh)
|
99
|
+
h = {id: id.to_s, created: h2[:created], last_modified: nil, body: h3}
|
100
|
+
@records << h
|
101
101
|
|
102
102
|
save() if @autosave
|
103
|
+
|
104
|
+
RecordX.new(h[:body], self, h[:id], h[:created], h[:last_modified])
|
105
|
+
|
103
106
|
end
|
104
107
|
|
105
108
|
def fields()
|
@@ -283,7 +286,9 @@ class DxLite
|
|
283
286
|
define_singleton_method ('find_by_' + x).to_sym do |value|
|
284
287
|
|
285
288
|
h = @records.find {|rec| find_record(rec[:body], value, x) }
|
286
|
-
|
289
|
+
return nil unless h
|
290
|
+
|
291
|
+
RecordX.new(h[:body], self, h[:id], h[:created], h[:last_modified])
|
287
292
|
|
288
293
|
end
|
289
294
|
|
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.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
dwbAN6/wokoLVZAiMRG1vZlI6RhtSOTHvFHbfBE5JI9rhjRtui8yeV+t8iI8G4Zs
|
36
36
|
2NszuYzdlVfzlrUiPWY5jL9P
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2021-01-
|
38
|
+
date: 2021-01-31 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: recordx
|
metadata.gz.sig
CHANGED
Binary file
|