dxlite 0.3.2 → 0.3.3

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: a11055ac19ac37f39d446b07bb28d1cc907a368e5c37a9535d59fe85d5c176a9
4
- data.tar.gz: 2764eddbddbae683431653acd277bf32fcbbaa681ca0d6205619f0518c0bbc3a
3
+ metadata.gz: b07aaa0e99b004c084971d3d47bec08bd7dc4b2b00ed1744516c8a936d3a770d
4
+ data.tar.gz: 1354917117fe1e45a811e1e609980dbd83638a04a3cd940d5c88d80a2513b5bd
5
5
  SHA512:
6
- metadata.gz: d05fee5c4205047d1dc7eb84cd30a148ad662f1ce5f68bc939cd6d8fa52f6fa8ed296a6b460c92b3205d55f66951aa961105df4b5540b158f6326022a2feed5f
7
- data.tar.gz: 40bdd8815580e774d5068b8373e3bc2656eadd3b39a9f63c7d271bad412304a134d6957b817f7441c27c1ce47b34f6e447d3ce9b67870714b6b780f329edc38b
6
+ metadata.gz: 1d32f0315a748d91738e7650c4f9636535563732feb283805d3ed0ec45e4ff9efcba278315ae9c276afbc7cb6b19d847df17db99622198715363f6324a4c0337
7
+ data.tar.gz: '07339c65f3bcc16f9ba435981a0f32d71348778cfdd3f2bcc6e117c51b9988d5773f0e1a4457998b57225bc52c3cd8450849996c9427f8196a5f3d55862889c8'
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -249,7 +249,7 @@ class DxLite
249
249
  private
250
250
 
251
251
  def find_record(rec, value, x)
252
- value.is_a?(Regexp) ? rec[x.to_sym] =~ value : rec[x.to_sym] == value
252
+ r = value.is_a?(Regexp) ? rec[x.to_sym] =~ value : rec[x.to_sym] == value
253
253
  end
254
254
 
255
255
  def make_methods()
@@ -272,13 +272,18 @@ class DxLite
272
272
 
273
273
  define_singleton_method ('find_all_by_' + x).to_sym do |value|
274
274
 
275
- @records.select {|rec| find_record(rec[:body], value, x) }
275
+ a = @records.select {|rec| find_record(rec[:body], value, x) }
276
+
277
+ a.map do |h|
278
+ RecordX.new(h[:body], self, h[:id], h[:created], h[:last_modified])
279
+ end
276
280
 
277
281
  end
278
282
 
279
283
  define_singleton_method ('find_by_' + x).to_sym do |value|
280
284
 
281
- @records.find {|rec| find_record(rec[:body], value, x) }
285
+ h = @records.find {|rec| find_record(rec[:body], value, x) }
286
+ RecordX.new(h[:body], self, h[:id], h[:created], h[:last_modified])
282
287
 
283
288
  end
284
289
 
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.2
4
+ version: 0.3.3
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-28 00:00:00.000000000 Z
38
+ date: 2021-01-29 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: recordx
metadata.gz.sig CHANGED
Binary file