fat_table 0.3.3 → 0.3.4

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: d95bf4d370e8c501b679aba77975ee9404940383a0058718d4c906b491ef195d
4
- data.tar.gz: fc39721ae44a5e656bfb8d6225164aa74cf0bdf21246b1eec4c247572b73bf30
3
+ metadata.gz: b1acf502c906ac50471a86a10889b2897831c26a4a49102aa3ee18e784658122
4
+ data.tar.gz: a239367ae5b4a70a888fe1e8427f1989f0cf8369402f2e3e252b9b2d11058841
5
5
  SHA512:
6
- metadata.gz: a532d371acf8e0a8fe36e83410c646a12125af501638749bf69f6c85fedcabf7eabf6b6edd5579eb0b32df42220cdac2f7ce018447b2734749e735815ac53ff2
7
- data.tar.gz: 555e412df95d31e035debb960c5dc86bfba4ec5b4c9827ea7ec19ef2458a18b01f54d4c620e69c621800ddb31bde7ab9e4d7034c9c53380ee301322260647c49
6
+ metadata.gz: 1edd15c8c3bf469a2b2278fd96246af6154ec8d7b1190f9f8398f23db1fc6bd816ecc92467296f8d811ac21045f797fbfb62c54fb2f6e95b83b33272a5bac1a4
7
+ data.tar.gz: 8c938a602ea1a7a4f58a85265d84d80c9c7eea9dcba250a36861456f8244ab14f0f108f70d57737c43316b528d2ca373ff7ab3d0ee87eb8ae9c77637207163cd
data/fat_table.gemspec CHANGED
@@ -64,9 +64,8 @@ Gem::Specification.new do |spec|
64
64
  spec.metadata['yard.run'] = 'yri' # use "yard" to build full HTML docs.
65
65
 
66
66
  spec.add_development_dependency 'bundler'
67
- spec.add_development_dependency 'byebug'
67
+ spec.add_development_dependency 'debug', '>= 1.0.0'
68
68
  spec.add_development_dependency 'pry'
69
- spec.add_development_dependency 'pry-byebug'
70
69
  spec.add_development_dependency 'pry-doc'
71
70
  spec.add_development_dependency 'rake', '~> 13.0'
72
71
  spec.add_development_dependency 'redcarpet'
@@ -83,7 +83,7 @@ module FatTable
83
83
  # col.type #=> 'Numeric'
84
84
  # col.header #=> :prices
85
85
  # col.sum #=> 18376.75
86
- def initialize(header:, items: [])
86
+ def initialize(header:, items: [], type: 'NilClass')
87
87
  @raw_header = header
88
88
  @header =
89
89
  if @raw_header.is_a?(Symbol)
@@ -91,7 +91,7 @@ module FatTable
91
91
  else
92
92
  @raw_header.to_s.as_sym
93
93
  end
94
- @type = 'NilClass'
94
+ @type = type
95
95
  msg = "unknown column type '#{type}"
96
96
  raise UserError, msg unless TYPES.include?(@type.to_s)
97
97
 
@@ -1075,7 +1075,10 @@ module FatTable
1075
1075
  :body
1076
1076
  end
1077
1077
  table.headers.each do |h|
1078
- grp_col[h] ||= Column.new(header: h)
1078
+ # We set the column type here in case the column type was forced
1079
+ # to String.
1080
+ # grp_col[h] ||= Column.new(header: h)
1081
+ grp_col[h] ||= Column.new(header: h, type: table.type(h))
1079
1082
  grp_col[h] << row[h]
1080
1083
  istruct = format_at[location][h]
1081
1084
  new_row[h] = [row[h], format_cell(row[h], istruct,
@@ -2,5 +2,5 @@
2
2
 
3
3
  module FatTable
4
4
  # The current version of FatTable
5
- VERSION = '0.3.3'
5
+ VERSION = '0.3.4'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fat_table
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel E. Doherty
@@ -25,19 +25,19 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: byebug
28
+ name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 1.0.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 1.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pry
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: pry-byebug
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: pry-doc
71
57
  requirement: !ruby/object:Gem::Requirement