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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b07aaa0e99b004c084971d3d47bec08bd7dc4b2b00ed1744516c8a936d3a770d
4
- data.tar.gz: 1354917117fe1e45a811e1e609980dbd83638a04a3cd940d5c88d80a2513b5bd
3
+ metadata.gz: 28362d972f8389e1b817f21be4fb9524ca4188761b4f4128c21a886eb67a11a5
4
+ data.tar.gz: df45a19238f82766d2abd14f08dc0f105b6bb1d66e4ddf85c46e4089f2600c8a
5
5
  SHA512:
6
- metadata.gz: 1d32f0315a748d91738e7650c4f9636535563732feb283805d3ed0ec45e4ff9efcba278315ae9c276afbc7cb6b19d847df17db99622198715363f6324a4c0337
7
- data.tar.gz: '07339c65f3bcc16f9ba435981a0f32d71348778cfdd3f2bcc6e117c51b9988d5773f0e1a4457998b57225bc52c3cd8450849996c9427f8196a5f3d55862889c8'
6
+ metadata.gz: 515c3ed54028756c1ff4a5e660f204b878b0c2098f8de61ac43096c7b3191d2a2ffaf9b8d1f0a5f8fed62d80dd22845661c2927bc40bddc5a44c02986e1b32bc
7
+ data.tar.gz: e8aa916f1ebf5118440c45d75c75ec116d64cd98215ba1a0b9d85c49d8c4d92530d7686f1833097506f6453e8370587700c1dd67aba88ab51ff4ee0c24703932
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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
- h = fields.map {|x| [x.to_sym, nil] }.to_h.merge(rawh)
99
- @records << {id: id.to_s, created: h2[:created], last_modified: nil,
100
- body: h}
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
- RecordX.new(h[:body], self, h[:id], h[:created], h[:last_modified])
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.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-29 00:00:00.000000000 Z
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