marty 2.7.2 → 2.7.3

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: 803d233d1eca573e9cf368dc8592895e9a4f237117842472e59d35dff646f8d5
4
- data.tar.gz: 31aa8139cf13387596b37e4e934a59837b9e6dff7ca8eff801ff2b5bdc0dfde2
3
+ metadata.gz: 3f0011e12fd48a4e14d470ba22c2293428a0607316a8b278ffec4d651deaa0e3
4
+ data.tar.gz: 49430e4e1cf9936c10d42cdb6fd0d71ac45856c53c9f28330a8ceb1d97e2cc71
5
5
  SHA512:
6
- metadata.gz: 82fa093b9db78af2ebe9b47a27673a023b4eafdeb46d2eb5f835113dc142ce12e16486a51098b1cbadf5e93022c28d636457ac01ccbce619fc362ee94832a568
7
- data.tar.gz: 0db7610f06f94b2e6c48fcdee37b5c024361a8501659d01983892471677738f1c937c47c65c3eb529aa3399c1dc265072e6b9cc279544782dab58e9cf35a7e9e
6
+ metadata.gz: 56459fc03c3ed9a6240cb7bf593bb6e0ced8badfa6eb665f1b51289bbdb6bae1dcf17ce545ebbd490dd4cc452da008e77395610409fc4cdc8c8f88c548102952
7
+ data.tar.gz: 28893152b14ece8002bccfbb6c90077b5018764c6343fadd4e469e68721dfd32a9e65f8d29e682c85ae42411e2685fed3947681a28e132a9a2c123abe431d444
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- marty (2.7.2)
4
+ marty (2.7.3)
5
5
  aws-sigv4 (~> 1.0, >= 1.0.2)
6
6
  axlsx (= 3.0.0pre)
7
7
  coderay
@@ -222,11 +222,16 @@ class Marty::DataGrid < Marty::Base
222
222
  raise "#{dgn} grid not found" unless dgh
223
223
  raise "non-hash arg #{h}" unless Hash === h
224
224
 
225
- attrs = dgh['metadata'].map { |a| a['attr'] }
225
+ if dgh['data_type'] != 'Marty::DataGrid'
226
+ # Narrow hash to needed attrs -- makes the cache work a lot
227
+ # better in case the hash includes items not in grid
228
+ # attrs. Can't do this for multi-grids since they pass down
229
+ # their params.
230
+ attrs = dgh['metadata'].map { |a| a['attr'] }
231
+ h = h.slice(*attrs)
232
+ end
226
233
 
227
- # Narrow hash to needed attrs -- makes the cache work a lot better
228
- # in case the hash includes items not in grid attrs.
229
- lookup_grid_h_priv(pt, dgh, h.slice(*attrs), distinct)
234
+ lookup_grid_h_priv(pt, dgh, h, distinct)
230
235
  end
231
236
 
232
237
  # private method used to cache lookup_grid_distinct_entry_h result
@@ -1,3 +1,3 @@
1
1
  module Marty
2
- VERSION = '2.7.2'
2
+ VERSION = '2.7.3'
3
3
  end
@@ -578,6 +578,11 @@ describe 'lookups for infinity' do
578
578
  res = lookup_grid_helper('infinity', 'G8', h, true)
579
579
 
580
580
  expect(g1_res).to eq res
581
+
582
+ # make sure lookup_grid_h works too
583
+ res_h = Marty::DataGrid.lookup_grid_h('infinity', 'G8', h, true)
584
+
585
+ expect(g1_res[0]).to eq res_h
581
586
  end
582
587
 
583
588
  it 'should handle DataGrid typed data grids' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marty
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.2
4
+ version: 2.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arman Bostani