fat_table 0.9.2 → 0.9.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: 9a9f4d886a3104ef55f2a6d1a2e60d6b3a30e17af08ba2444305eabb4cbd959c
4
- data.tar.gz: 15e91fddb4a24bd0818ac8ed8e917af7f3596c0b43c8a8b01aac6bf445c8baa8
3
+ metadata.gz: c938654651af21d509d2a71fe8a7a9c36747f33e04d1be8eab4c020c1400a26e
4
+ data.tar.gz: 6d9191d19b79a70a963eb16eaabfaefb2643cd0df7b9dec7a77c5d36f2c836b0
5
5
  SHA512:
6
- metadata.gz: 1530fa23467b0f47b6822d7d3bc557b9b9244187d4cc94e8b246dcdbb60b00be35ed8947a7f9340c1f080baaaccd28e72f80d7cbaec9aca9cded6f7fdee67c84
7
- data.tar.gz: 599d3e41f4fe0ad7f5c5cb853f1c1ba6c9d338fabe3df0fb8279837765aa2afba9058f1e63954431db76122a86950a172bcf63ab2993e8c91746c705d5886da5
6
+ metadata.gz: 38371b27911a835c34e7536bc6226b08a20225d399b4feaa6e6bb6e1dbb6031292d10ea6673c4dabb77c2576294188ce6ab6d76186f6d0a8c803a175e2db3907
7
+ data.tar.gz: 69a13614617e0423cb7739ec47939841bb96eb5c460d0711528e2163969b70339a14a129a96ed5d68f8908a86479c4ee596799197423cf2cbf3d56f7afe5ba90
data/README.org CHANGED
@@ -2614,19 +2614,22 @@ parameter. See below at [[*Table Locations][Table Locations]] for an explanatio
2614
2614
  locations available.
2615
2615
 
2616
2616
  Other than that first parameter, the two methods take the same types of
2617
- parameters. The remaining parameters are hash-like parameters that use either a
2618
- column name or a type as the key and a string with the formatting directives to
2619
- apply as the value. The following example says to set the formatting for all
2620
- locations in the table and to format all numeric fields as strings that are
2621
- rounded to whole numbers (the '0.0' part), that are right-aligned (the 'R'
2622
- part), and have grouping commas inserted (the ',' part). But the ~:id~ column is
2623
- numeric, and the second parameter overrides the formatting for numerics in
2624
- general and calls for the ~:id~ column to be padded to three digits with zeros
2625
- on the left (the '3.0' part) and to be centered (the 'C' part).
2617
+ parameters. The remaining parameters are hash-like parameters that use either
2618
+ a column name or a type as the key and a string with the formatting directives
2619
+ to apply as the value. If a key represents neither a column name nor a valid
2620
+ type, it is silently ignored. The following example says to set the
2621
+ formatting for all locations in the table and to format all numeric fields as
2622
+ strings that are rounded to whole numbers (the '0.0' part), that are
2623
+ right-aligned (the 'R' part), and have grouping commas inserted (the ','
2624
+ part). But the ~:id~ column is numeric, and the second parameter overrides the
2625
+ formatting for numerics in general and calls for the ~:id~ column to be padded
2626
+ to three digits with zeros on the left (the '3.0' part) and to be centered
2627
+ (the 'C' part).
2626
2628
 
2627
2629
  #+BEGIN_SRC ruby :wrap EXAMPLE
2628
2630
  tab_a.to_text do |f|
2629
- f.format(numeric: '0.0,R', id: '3.0C')
2631
+ # Note: blat: is silently ignored
2632
+ f.format(numeric: '0.0,R', id: '3.0C', blat: 'B')
2630
2633
  f.format_for(:body, string: 'R')
2631
2634
  f.format_for(:header, string: 'C')
2632
2635
  end
@@ -648,12 +648,6 @@ module FatTable
648
648
  k
649
649
  end
650
650
  end
651
- valid_keys = table.headers + %i[string numeric datetime boolean nil]
652
- invalid_keys = (fmts.keys - valid_keys).uniq
653
- unless invalid_keys.empty?
654
- msg = "invalid #{location} column or type: #{invalid_keys.join(', ')}"
655
- raise UserError, msg
656
- end
657
651
 
658
652
  @format_at[location] ||= {}
659
653
  table.headers.each do |h|
@@ -2,5 +2,5 @@
2
2
 
3
3
  module FatTable
4
4
  # The current version of FatTable
5
- VERSION = '0.9.2'
5
+ VERSION = '0.9.3'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fat_table
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel E. Doherty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-22 00:00:00.000000000 Z
11
+ date: 2023-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler