fat_core 1.2.6 → 1.2.7

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: 5c93e591807760bad4ae026e144c216d03fbe3d7
4
- data.tar.gz: 0a7bcf980e22635bdb4880e5ba140544ce03530d
3
+ metadata.gz: a7c14451e2d5f7edfd5f371cb27d40b0d2660150
4
+ data.tar.gz: 4c50850958423f3e2b35a544c89e6621e92984db
5
5
  SHA512:
6
- metadata.gz: 91bdb2d5b8cf2dc577967462433c73fa18f6de41c72ed27564e3cf5dacecc60825ecac131aea4f1a6182e24fbecd18b3b0d752a27bee0de258446baa705dd421
7
- data.tar.gz: aa85f79b609f356e333adb6816a9764b2bcf1cad2f7bd5e7ba1a00ef83c81310302d450b81d403890c9d5c808b208435d3fa10db97aa778a5938e3d5b0eba817
6
+ metadata.gz: eb202c94dbe14cdcd58383f3ed56a57864b927c89196418672f3de5111dfc5feba82b5cbb610e150e49b9596f78c2a93243b5f3fc206c53838e3141bf5848fa6
7
+ data.tar.gz: 105eef5f77140aaab7775c5d47ad6b92c3ad4beb54cf230ce207993376459559373a85c190364e52c3bb6f9eb643ae3e4072da0e4fc6d3c3642e8b2fab4c29aa
@@ -171,7 +171,7 @@ module FatCore
171
171
  case exp
172
172
  when Symbol, String
173
173
  h = exp.as_sym
174
- raise "Header #{h} does not exist" unless headers.include?(h)
174
+ raise "Column '#{h}' in select does not exist" unless column?(h)
175
175
  new_heads << h
176
176
  new_cols[h] = Column.new(header: h,
177
177
  items: column(h).items)
@@ -180,7 +180,7 @@ module FatCore
180
180
  case xp
181
181
  when Symbol
182
182
  h = xp.as_sym
183
- raise "Header #{key} does not exist" unless column?(key)
183
+ raise "Column '#{key}' in select does not exist" unless column?(key)
184
184
  new_heads << h
185
185
  new_cols[h] = Column.new(header: h,
186
186
  items: column(key).items)
@@ -326,6 +326,7 @@ module FatCore
326
326
  def add_footer(label: 'Total', aggregate: :sum, heads: [])
327
327
  foot = {}
328
328
  heads.each do |h|
329
+ raise "No #{h} column in table to #{aggregate}" unless headers.include?(h)
329
330
  foot[h] = column(h).send(aggregate)
330
331
  end
331
332
  @footers[label.as_sym] = foot
@@ -1,7 +1,7 @@
1
1
  module FatCore
2
2
  MAJOR = 1
3
3
  MINOR = 2
4
- PATCH = 6
4
+ PATCH = 7
5
5
 
6
6
  VERSION = [MAJOR, MINOR, PATCH].compact.join('.')
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fat_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.2.7
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: 2017-01-25 00:00:00.000000000 Z
11
+ date: 2017-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simplecov