dynarex 1.5.29 → 1.5.30

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
  SHA1:
3
- metadata.gz: 854ef80a72bfba194853afc6feeb2dfa785077be
4
- data.tar.gz: 813fe7b14c24edb745e40011f7d2f66e7324ff5e
3
+ metadata.gz: 96ec801998f91ebcc22dc57f9b16a533ef9c7434
4
+ data.tar.gz: 1f464ee3d5adae045bb0052ade53f735d4c3867d
5
5
  SHA512:
6
- metadata.gz: b6f8e5f05a711a3c449e537eead26eae1c214efd6da43c29ef5888788fb8114fbbfd7db2ccc7c4200a11bd37a8396baf1cff7b627efef4b665557dfb7b544639
7
- data.tar.gz: 1a27311bc7113f4fe7ac9bc5a8b6fd270babbe6453f3c91ba5f7f65299a4434fc8a67033896ac33b84ac33131f3946c5a925e3251d8ab29bfae6b96db65d3b42
6
+ metadata.gz: 6223229362cfa0862fea0fb9f1bc4d5b74391c91ea551ac04164e3a7daf7bd2330277e23e389f1400dee981bf4a80e78536310a2765ff5d9fc3f48ef06c35a3d
7
+ data.tar.gz: efeebe527c2ddaf20012c31fe7b8012ed4dc556f1f21f3657c8682655f50e6d8c492a734e732c119522957d65ab78d2f96b5b5c8298754f2b2515b05fe1739dd
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -269,7 +269,7 @@ EOF
269
269
  header + "--#\n" + out.text
270
270
  elsif self.delimiter.length > 0 then
271
271
 
272
- tfo = TableFormatter.new border: false, nowrap: true, \
272
+ tfo = TableFormatter.new border: false, wrap: false, \
273
273
  divider: self.delimiter
274
274
  tfo.source = self.to_h.map{|x| x.values}
275
275
  header + tfo.display
@@ -298,13 +298,19 @@ EOF
298
298
 
299
299
  end
300
300
 
301
- def to_table()
301
+ def to_table(fields: nil)
302
302
 
303
303
  tfo = TableFormatter.new
304
304
  a = self.to_h
305
- rows = a.map{|h| h.values}
306
- tfo.source = rows
307
- tfo.labels = a.first.keys.map{|x| x.to_s.capitalize }
305
+
306
+ rows = a.map do |h|
307
+
308
+ fields ? fields.map {|x| h[x]} : h.values
309
+
310
+ end
311
+
312
+ tfo.source = rows
313
+ tfo.labels = (fields ? fields : a.first.keys).map{|x| x.to_s.capitalize }
308
314
  tfo
309
315
 
310
316
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynarex
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.29
4
+ version: 1.5.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
@@ -1,3 +1 @@
1
- ������Ѣ?��݁S�][)!fZ��Q2��� �Z��*̙��Oc8M~e�X�>��p��gr)d
2
- N�X����
3
- �W OT���&,唡}���X#��̢� (�!�aO��+�Le�ۅ�g�]�[O~��]^����+]]R�Ţ��J�;�ޏ��1�PD�s��S��"�[l}c-�)[�;^����������$C���I�p�p�^喯��_������;��ظ� ��y�K$%-*z��_��
1
+ �9�أ������A�j��S����Yb[]:yH��-V����5�Ðx�u���[UbC�����*��w������"�Z��p��"ɂdz(��y����-S�)$o��� vݾ���CKG�M'YB�G$��m4�x�Y��iI���ܕ����nc�AV}�I�I/!7��