tableizer 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1796c1ab96e6b2abbaf4c0547e7b79dbc2b8247b
4
+ data.tar.gz: e954982826dc44a7e386ad6d81db9d41983410c9
5
+ SHA512:
6
+ metadata.gz: 7c31177e585bbf4f020585cb9f6ec4567bb75c70df7844fbc45ea2d22053032610bf437addce186c0ee44a208a82dca0c60293788d72000a73c668b553700303
7
+ data.tar.gz: 8b993d0b826ac76a955deabcdaa988427fbdefc11ada0f9076c87ca2be850ff9a0a587fdb7f6d92413ae86eb63e055a02bf2d970d9363dfa037ab3648fb54a7c
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ *.swp
1
2
  *.gem
2
3
  *.rbc
3
4
  .bundle
@@ -1,30 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tableizer (0.0.3)
4
+ tableizer (0.0.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- binding_of_caller (0.6.8)
10
9
  coderay (1.0.8)
11
- columnize (0.3.6)
12
- debugger (1.2.1)
13
- columnize (>= 0.3.1)
14
- debugger-linecache (~> 1.1.1)
15
- debugger-ruby_core_source (~> 1.1.4)
16
- debugger-linecache (1.1.2)
17
- debugger-ruby_core_source (>= 1.1.1)
18
- debugger-ruby_core_source (1.1.4)
19
- guard (1.5.4)
20
- listen (>= 0.4.2)
21
- lumberjack (>= 1.0.2)
22
- pry (>= 0.9.10)
23
- thor (>= 0.14.6)
24
- guard-minitest (0.5.0)
25
- guard (>= 0.4)
26
- listen (0.5.3)
27
- lumberjack (1.0.2)
28
10
  method_source (0.8.1)
29
11
  minitest (4.3.2)
30
12
  minitest_should (0.3.1)
@@ -32,43 +14,21 @@ GEM
32
14
  coderay (~> 1.0.5)
33
15
  method_source (~> 0.8)
34
16
  slop (~> 3.3.1)
35
- pry-doc (0.4.4)
36
- pry (>= 0.9.9.6)
37
- yard (~> 0.8.1)
38
17
  pry-nav (0.2.2)
39
18
  pry (~> 0.9.10)
40
- pry-rails (0.2.1)
41
- pry (>= 0.9.10)
42
- pry-remote (0.1.6)
43
- pry (~> 0.9)
44
- slop (~> 3.0)
45
- pry-stack_explorer (0.4.6)
46
- binding_of_caller (~> 0.6.2)
47
19
  rake (10.0.2)
48
- rb-fsevent (0.9.2)
49
- ruby-prof (0.11.2)
50
- ruby_gntp (0.3.4)
51
20
  slop (3.3.3)
52
- thor (0.16.0)
53
- yard (0.8.2.1)
54
21
 
55
22
  PLATFORMS
56
23
  ruby
57
24
 
58
25
  DEPENDENCIES
59
26
  bundler (~> 1.0)
60
- debugger
61
- guard
62
- guard-minitest
63
27
  minitest
64
28
  minitest_should
65
- pry-doc
66
29
  pry-nav
67
- pry-rails
68
- pry-remote
69
- pry-stack_explorer
70
30
  rake
71
- rb-fsevent
72
- ruby-prof
73
- ruby_gntp
74
31
  tableizer!
32
+
33
+ BUNDLED WITH
34
+ 1.16.0.pre.2
data/README.md CHANGED
@@ -1,29 +1,2 @@
1
1
  # Tableizer
2
-
3
- TODO: Write a gem description
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- gem 'tableizer'
10
-
11
- And then execute:
12
-
13
- $ bundle
14
-
15
- Or install it yourself as:
16
-
17
- $ gem install tableizer
18
-
19
- ## Usage
20
-
21
- TODO: Write usage instructions here
22
-
23
- ## Contributing
24
-
25
- 1. Fork it
26
- 2. Create your feature branch (`git checkout -b my-new-feature`)
27
- 3. Commit your changes (`git commit -am 'Add some feature'`)
28
- 4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
2
+ This gem is only an experimentation. Use it at your own risk!
@@ -1,5 +1,8 @@
1
1
  require "tableizer/version"
2
2
 
3
3
  module Tableizer
4
- # Your code goes here...
4
+ autoload :Table, 'tableizer/table'
5
+ autoload :ColInfo, 'tableizer/col_info'
6
+ autoload :CsvTable, 'tableizer/csv_table'
7
+ autoload :TextTable, 'tableizer/text_table'
5
8
  end
@@ -0,0 +1,23 @@
1
+ require 'csv'
2
+
3
+ module Tableizer
4
+ class CsvTable
5
+ def to_s(cols_info, rows)
6
+ CSV.generate do |csv|
7
+ csv << cols_info.map{|col_info| col_info.header}
8
+ rows.each do |row|
9
+ csv << row.map { |col| convert(col) }
10
+ end
11
+ end
12
+ end
13
+
14
+ def convert(data)
15
+ case data
16
+ when Time
17
+ data.strftime("%Y-%m-%d %H:%M:%S")
18
+ else
19
+ data
20
+ end
21
+ end
22
+ end
23
+ end
@@ -1,8 +1,7 @@
1
- require 'csv'
2
-
3
1
  class ColInfo
4
2
  attr_reader :header
5
3
  attr_accessor :width, :col_type
4
+
6
5
  def initialize(header, col_type = nil, width = 0)
7
6
  @header = header
8
7
  @col_type = col_type
@@ -10,96 +9,8 @@ class ColInfo
10
9
  end
11
10
  end
12
11
 
13
-
14
- class DataTable
15
- attr_reader :rows, :cols_info
16
-
17
- def initialize(cols_info, rows)
18
- @rows = rows
19
- @cols_info = cols_info
20
- end
21
-
22
- def to_csv
23
- CSV.generate do |csv|
24
- csv << cols_info.map{|col_info| col_info.header}
25
- rows.each do |row|
26
- conv_row = row.map do |a|
27
- a.class == Time ? a.strftime("%Y-%m-%d %H:%M:%S") : a
28
- end
29
- csv << conv_row
30
- end
31
- end
32
- end
33
-
34
- def to_text
35
- text = ""
36
- text << cols_info.map{|a| "%#{a.width}s" % a.header.strip }.join("|") + "\n"
37
- text << rows.map do |row|
38
- row.zip(cols_info).map{|(col, col_info)| "%#{col_info.width}s" % col.to_s.strip}.join("|")
39
- end.join( "\n" )
40
- end
41
-
42
- def to_html
43
- text = "<table border=\"1\">\n"
44
- text += "<thead>\n"
45
- text += "<tr>\n"
46
- text << cols_info.map{|a| "<th>#{a.header.strip}</th>" }.join("\n")
47
- text += "</tr>\n"
48
- text += "</thead>"
49
- text += "<tbody>"
50
- text << rows.map do |row|
51
- "<tr>" + row.map{|col| "<td>#{col}</td>"}.join("\n") + "</tr>"
52
- end.join( "\n" )
53
- text += "</tbody>"
54
- text += "</table>"
55
- end
56
-
57
- def to_google_table
58
- GoogleVisualization.render( rows, cols_info.map{|col| [col.col_type, col.header]} )
59
- end
60
-
61
- # def to_pdf
62
- # pdf = Prawn::Document.new(:top_margin => 50, :page_layout => :landscape)
63
-
64
- # data = rows.map do |row|
65
- # row.zip(cols_info).map do |(col, col_info)|
66
- # col
67
- # end
68
- # end
69
- # data
70
- # pdf.table( data, :border_style => :grid,
71
- # :headers => cols_info.map{|col_info| col_info.header},
72
- # :font_size => 7,
73
- # :vertical_padding => 1
74
- # )
75
- # pdf.render
76
- # end
77
- end
78
-
79
-
80
12
  module Enumerable
81
- def table
82
- rows = []
83
- cols_info = []
84
- gen = nil
85
- each do |elem|
86
- ret = yield elem
87
- rows << ret.map{|col| col[1]}
88
- unless cols_info.empty?
89
- ret.zip(cols_info).each do |(row, col_info)|
90
- # Detect the type of the current column
91
- if col_info.col_type == NilClass && row[1].class != NilClass
92
- col_info.col_type = row[1].class
93
- end
94
- # Detect the max width the current column
95
- col_info.width = [ col_info.width, row[1].to_s.strip.length ].max
96
- end
97
- else
98
- cols_info = ret.map do |(header, val)|
99
- ColInfo.new( header.to_s, val.class, [ header.to_s.strip.length, val.to_s.strip.length ].max )
100
- end
101
- end
102
- end
103
- DataTable.new(cols_info,rows)
13
+ def table(&block)
14
+ Tableizer::Table.create(self, &block)
104
15
  end
105
16
  end
@@ -0,0 +1,72 @@
1
+ require 'csv'
2
+
3
+ module Tableizer
4
+ class NullObject
5
+ def method_missing(*args, &block)
6
+ self
7
+ end
8
+
9
+ def nil?
10
+ true
11
+ end
12
+ end
13
+
14
+ class Table
15
+ attr_reader :rows, :cols_info
16
+
17
+ def initialize(cols_info, rows)
18
+ @rows = rows
19
+ @cols_info = cols_info
20
+ end
21
+
22
+ def self.create(elems)
23
+ rows = []
24
+ cols_info = []
25
+ gen = nil
26
+
27
+ elems = [NullObject] if elems.first.nil?
28
+ elems.each do |elem|
29
+ yielded = yield elem
30
+ rows << yielded.map{|col| col[1]}
31
+ unless cols_info.empty?
32
+ yielded.zip(cols_info).each do |(row, col_info)|
33
+ # Detect the type of the current column
34
+ if col_info.col_type == NilClass && row[1].class != NilClass
35
+ col_info.col_type = row[1].class
36
+ end
37
+ end
38
+ else
39
+ cols_info = yielded.map do |(header, val)|
40
+ ColInfo.new( header.to_s, val.class, [ header.to_s.strip.length, val.to_s.strip.length ].max )
41
+ end
42
+ end
43
+ end
44
+ self.new(cols_info,rows)
45
+ end
46
+
47
+ def to(table_type)
48
+ mapper = {:csv => CsvTable,
49
+ :text => TextTable}
50
+ mapper.fetch(table_type).new.to_s(cols_info, rows)
51
+ end
52
+
53
+ def to_html
54
+ text = "<table border=\"1\">\n"
55
+ text += "<thead>\n"
56
+ text += "<tr>\n"
57
+ text << cols_info.map{|a| "<th>#{a.header.strip}</th>" }.join("\n")
58
+ text += "</tr>\n"
59
+ text += "</thead>"
60
+ text += "<tbody>"
61
+ text << rows.map do |row|
62
+ "<tr>" + row.map{|col| "<td>#{col}</td>"}.join("\n") + "</tr>"
63
+ end.join( "\n" )
64
+ text += "</tbody>"
65
+ text += "</table>"
66
+ end
67
+
68
+ def to_google_table
69
+ GoogleVisualization.render( rows, cols_info.map{|col| [col.col_type, col.header]} )
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,35 @@
1
+ module Tableizer
2
+ class TextTable
3
+ def to_s(cols_info, rows)
4
+ headers = cols_info.map(&:header)
5
+ widths = col_widths(headers, rows)
6
+ text = ""
7
+ text << row_str(headers, widths) + "\n"
8
+ text << rows.map do |cols|
9
+ row_str(cols, widths)
10
+ end.join( "\n" )
11
+ end
12
+
13
+ def row_str(row, col_widths)
14
+ row.each_with_index.map do |val, index|
15
+ value_to_str(val, col_widths.fetch(index))
16
+ end.join('|')
17
+ end
18
+
19
+ def value_to_str(value, width)
20
+ "%#{width}s" % value.to_s.strip
21
+ end
22
+
23
+ def col_widths(headers, rows)
24
+ rows = [headers] + rows
25
+ widths = Array.new(headers.length, 0)
26
+ rows.each do |row|
27
+ row.each_with_index do |col, index|
28
+ width = col.to_s.length || 0
29
+ widths[index] = width if width > widths.fetch(index)
30
+ end
31
+ end
32
+ widths
33
+ end
34
+ end
35
+ end
@@ -1,3 +1,3 @@
1
1
  module Tableizer
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -11,19 +11,8 @@ Gem::Specification.new do |gem|
11
11
  gem.add_development_dependency "bundler", "~> 1.0"
12
12
  gem.add_development_dependency 'minitest'
13
13
  gem.add_development_dependency 'minitest_should'
14
- gem.add_development_dependency "bundler", "~> 1.0"
15
- gem.add_development_dependency 'pry-rails'
16
14
  gem.add_development_dependency 'pry-nav'
17
- gem.add_development_dependency 'pry-doc'
18
- gem.add_development_dependency 'pry-stack_explorer'
19
- gem.add_development_dependency 'pry-remote'
20
15
 
21
- gem.add_development_dependency "guard"
22
- gem.add_development_dependency "guard-minitest"
23
- gem.add_development_dependency 'rb-fsevent'
24
- gem.add_development_dependency 'ruby_gntp'
25
- gem.add_development_dependency 'ruby-prof'
26
- gem.add_development_dependency 'debugger'
27
16
  gem.authors = ["Martin Chabot"]
28
17
  gem.email = ["chabotm@gmail.com"]
29
18
  gem.description = %q{Adds the ability to Enumerable to generate tables into different formats}
@@ -0,0 +1,10 @@
1
+ class ColInfo
2
+ attr_reader :header
3
+ attr_accessor :col_type
4
+
5
+ def initialize(header, col_type = nil, width = 0)
6
+ @header = header
7
+ @col_type = col_type
8
+ end
9
+ end
10
+
@@ -1,67 +1,95 @@
1
1
  $LOAD_PATH << (File.join(File.expand_path(File.dirname(__FILE__)),'..', 'lib'))
2
+
2
3
  require_relative '../test_helper'
4
+
3
5
  require 'tableizer/data_table'
4
6
 
5
- class TestDataTable < MiniTest::Should::TestCase
6
- context "A enumerable" do
7
- should "return a DataTable" do
8
- assert_kind_of( DataTable, [ 1,2,3 ].table{|a| [[ "Col1", a ],["Col2", a + 1] ]})
9
- end
10
- end
7
+ module Tableizer
8
+ class TestDataTable < MiniTest::Should::TestCase
11
9
 
12
- context "A valid DataTable" do
13
- setup do
14
- @table = [ 1,2,3 ].table{|elem| [ ["col1",elem * 2], ["col2", elem == 3 ? "60000" : (elem * 2 + 1).to_s] ] }
10
+ context "A enumerable" do
11
+ should "return a DataTable" do
12
+ assert_kind_of(Table, [1, 2, 3].table{|a| [["Col1", a], ["Col2", a + 1]]})
13
+ end
15
14
  end
16
15
 
17
- should "return the collected rows" do
18
- assert_equal( [[2,"3"],[4,"5"],[6,"60000"]], @table.rows )
19
- end
16
+ context "A valid DataTable" do
17
+ setup do
18
+ @table = [1, 2, 3].table{ |elem| [ ["col1", elem * 2], ["col2", elem == 3 ? "60000" : (elem * 2 + 1).to_s] ] }
19
+ end
20
20
 
21
- should "return the headers" do
22
- assert_equal( ["col1","col2"], @table.cols_info.map{|col| col.header} )
23
- end
21
+ should "return the collected rows" do
22
+ assert_equal( [[2, "3"], [4, "5"],[ 6, "60000"]], @table.rows )
23
+ end
24
24
 
25
- should "detect the column types" do
26
- assert_equal( [Fixnum, String], @table.cols_info.map{|col| col.col_type} )
27
- end
28
- should "detect the columns width" do
29
- assert_equal([4,5], @table.cols_info.map{|col| col.width} )
25
+ should "return the headers" do
26
+ assert_equal( ["col1", "col2"], @table.cols_info.map{|col| col.header} )
27
+ end
28
+
29
+ should "detect the column types" do
30
+ assert_equal( [Fixnum, String], @table.cols_info.map{|col| col.col_type} )
31
+ end
32
+ end
33
+
34
+ context "An empty enumerable" do
35
+ setup do
36
+ enum = []
37
+ @table = enum.table{|a| [[:name, a.name]]}
38
+ end
39
+
40
+ should 'generate header' do
41
+ assert_equal 'name', @table.cols_info.first.header
42
+ # assert_equal 0, @table.rows.length
43
+ end
30
44
  end
31
- end
32
45
 
33
- context "A Valid table with containing nil value" do
34
- setup do
35
- @table = [1, 2, 3].table do |elem|
46
+ context "A Valid table with containing nil value" do
47
+ setup do
48
+ @table = [1, 2, 3].table do |elem|
36
49
  [ [ "col1", elem ],
37
50
  [ "col2", elem == 2 ? nil : (elem + 1).to_s ] ]
51
+ end
38
52
  end
39
- end
40
- should "detect the column type" do
41
- assert_equal( [Fixnum, String], @table.cols_info.map{|col_info| col_info.col_type })
42
- end
43
- should "be convertable to csv" do
44
- expected = <<EOF
53
+
54
+ should "detect the column type" do
55
+ assert_equal( [Fixnum, String], @table.cols_info.map{|col_info| col_info.col_type })
56
+ end
57
+
58
+ should "be convertable to csv" do
59
+ expected = <<EOF
45
60
  col1,col2
46
61
  1,2
47
62
  2,
48
63
  3,4
49
64
  EOF
50
- assert_equal( expected, @table.to_csv )
51
- end
52
- end
65
+ assert_equal( expected, @table.to(:csv) )
66
+ end
53
67
 
54
- context "A Valid table containing Time value should be convert to ISO 8601 string" do
55
- @table = [Time.local(2009,12,1, 13,44,23)].table do |elem|
56
- [ [ "col1", elem ]]
68
+ should "convert to text" do
69
+ expected = <<EOF
70
+ col1|col2
71
+ 1| 2
72
+ 2|
73
+ 3| 4
74
+ EOF
75
+ assert_equal expected.chomp, @table.to(:text)
76
+ end
57
77
  end
58
- should "Convert time to UTC" do
59
- expected = <<EOF
78
+
79
+ context "A Valid table containing Time value should be convert to ISO 8601 string" do
80
+ setup do
81
+ @table = [Time.local(2009, 12, 1, 13, 44, 23)].table do |elem|
82
+ [ [ "col1", elem ]]
83
+ end
84
+ end
85
+
86
+ should "Convert time to UTC" do
87
+ expected = <<EOF
60
88
  col1
61
- 2009-12-01 18:44:31
89
+ 2009-12-01 13:44:23
62
90
  EOF
91
+ assert_equal expected, @table.to(:csv)
92
+ end
63
93
  end
64
94
  end
65
-
66
95
  end
67
-
File without changes
@@ -1,5 +1,6 @@
1
- $:.unshift File.expand_path('..', __FILE__)
2
- $:.unshift File.expand_path('../../lib', __FILE__)
1
+ require 'bundler'
2
+ Bundler.require(:default, :development)
3
+
3
4
  require 'minitest/unit'
4
5
  require 'minitest/autorun'
5
6
  require 'minitest/should'
metadata CHANGED
@@ -1,270 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tableizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
- prerelease:
4
+ version: 0.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Martin Chabot
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-12-06 00:00:00.000000000 Z
11
+ date: 2017-12-22 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: bundler
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: '1.0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
40
  version: '1.0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: minitest
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: minitest_should
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- - !ruby/object:Gem::Dependency
79
- name: bundler
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ~>
84
- - !ruby/object:Gem::Version
85
- version: '1.0'
86
- type: :development
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ~>
92
- - !ruby/object:Gem::Version
93
- version: '1.0'
94
- - !ruby/object:Gem::Dependency
95
- name: pry-rails
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: '0'
102
- type: :development
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
66
+ - - ">="
108
67
  - !ruby/object:Gem::Version
109
68
  version: '0'
110
69
  - !ruby/object:Gem::Dependency
111
70
  name: pry-nav
112
71
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
125
- version: '0'
126
- - !ruby/object:Gem::Dependency
127
- name: pry-doc
128
- requirement: !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
131
- - - ! '>='
132
- - !ruby/object:Gem::Version
133
- version: '0'
134
- type: :development
135
- prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: '0'
142
- - !ruby/object:Gem::Dependency
143
- name: pry-stack_explorer
144
- requirement: !ruby/object:Gem::Requirement
145
- none: false
146
- requirements:
147
- - - ! '>='
148
- - !ruby/object:Gem::Version
149
- version: '0'
150
- type: :development
151
- prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - ! '>='
156
- - !ruby/object:Gem::Version
157
- version: '0'
158
- - !ruby/object:Gem::Dependency
159
- name: pry-remote
160
- requirement: !ruby/object:Gem::Requirement
161
- none: false
162
- requirements:
163
- - - ! '>='
164
- - !ruby/object:Gem::Version
165
- version: '0'
166
- type: :development
167
- prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
- requirements:
171
- - - ! '>='
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- - !ruby/object:Gem::Dependency
175
- name: guard
176
- requirement: !ruby/object:Gem::Requirement
177
- none: false
178
- requirements:
179
- - - ! '>='
180
- - !ruby/object:Gem::Version
181
- version: '0'
182
- type: :development
183
- prerelease: false
184
- version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
- requirements:
187
- - - ! '>='
188
- - !ruby/object:Gem::Version
189
- version: '0'
190
- - !ruby/object:Gem::Dependency
191
- name: guard-minitest
192
- requirement: !ruby/object:Gem::Requirement
193
- none: false
194
- requirements:
195
- - - ! '>='
196
- - !ruby/object:Gem::Version
197
- version: '0'
198
- type: :development
199
- prerelease: false
200
- version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
- requirements:
203
- - - ! '>='
204
- - !ruby/object:Gem::Version
205
- version: '0'
206
- - !ruby/object:Gem::Dependency
207
- name: rb-fsevent
208
- requirement: !ruby/object:Gem::Requirement
209
- none: false
210
- requirements:
211
- - - ! '>='
212
- - !ruby/object:Gem::Version
213
- version: '0'
214
- type: :development
215
- prerelease: false
216
- version_requirements: !ruby/object:Gem::Requirement
217
- none: false
218
- requirements:
219
- - - ! '>='
220
- - !ruby/object:Gem::Version
221
- version: '0'
222
- - !ruby/object:Gem::Dependency
223
- name: ruby_gntp
224
- requirement: !ruby/object:Gem::Requirement
225
- none: false
226
- requirements:
227
- - - ! '>='
228
- - !ruby/object:Gem::Version
229
- version: '0'
230
- type: :development
231
- prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
233
- none: false
234
- requirements:
235
- - - ! '>='
236
- - !ruby/object:Gem::Version
237
- version: '0'
238
- - !ruby/object:Gem::Dependency
239
- name: ruby-prof
240
- requirement: !ruby/object:Gem::Requirement
241
- none: false
242
- requirements:
243
- - - ! '>='
244
- - !ruby/object:Gem::Version
245
- version: '0'
246
- type: :development
247
- prerelease: false
248
- version_requirements: !ruby/object:Gem::Requirement
249
- none: false
250
- requirements:
251
- - - ! '>='
252
- - !ruby/object:Gem::Version
253
- version: '0'
254
- - !ruby/object:Gem::Dependency
255
- name: debugger
256
- requirement: !ruby/object:Gem::Requirement
257
- none: false
258
72
  requirements:
259
- - - ! '>='
73
+ - - ">="
260
74
  - !ruby/object:Gem::Version
261
75
  version: '0'
262
76
  type: :development
263
77
  prerelease: false
264
78
  version_requirements: !ruby/object:Gem::Requirement
265
- none: false
266
79
  requirements:
267
- - - ! '>='
80
+ - - ">="
268
81
  - !ruby/object:Gem::Version
269
82
  version: '0'
270
83
  description: Adds the ability to Enumerable to generate tables into different formats
@@ -274,7 +87,7 @@ executables: []
274
87
  extensions: []
275
88
  extra_rdoc_files: []
276
89
  files:
277
- - .gitignore
90
+ - ".gitignore"
278
91
  - Gemfile
279
92
  - Gemfile.lock
280
93
  - Guardfile
@@ -282,46 +95,45 @@ files:
282
95
  - README.md
283
96
  - Rakefile
284
97
  - lib/tableizer.rb
98
+ - lib/tableizer/csv_table.rb
285
99
  - lib/tableizer/data_table.rb
100
+ - lib/tableizer/table.rb
101
+ - lib/tableizer/text_table.rb
286
102
  - lib/tableizer/version.rb
287
103
  - tableizer.gemspec
288
104
  - test/.DS_Store
105
+ - test/tableizer/col_info.rb
289
106
  - test/tableizer/data_table_test.rb
107
+ - test/tableizer/tableizer.rb
290
108
  - test/tableizer_test.rb
291
109
  - test/test_helper.rb
292
110
  homepage: ''
293
111
  licenses: []
112
+ metadata: {}
294
113
  post_install_message:
295
114
  rdoc_options: []
296
115
  require_paths:
297
116
  - lib
298
117
  required_ruby_version: !ruby/object:Gem::Requirement
299
- none: false
300
118
  requirements:
301
- - - ! '>='
119
+ - - ">="
302
120
  - !ruby/object:Gem::Version
303
121
  version: '0'
304
- segments:
305
- - 0
306
- hash: 1797285074806435226
307
122
  required_rubygems_version: !ruby/object:Gem::Requirement
308
- none: false
309
123
  requirements:
310
- - - ! '>='
124
+ - - ">="
311
125
  - !ruby/object:Gem::Version
312
126
  version: '0'
313
- segments:
314
- - 0
315
- hash: 1797285074806435226
316
127
  requirements: []
317
128
  rubyforge_project:
318
- rubygems_version: 1.8.24
129
+ rubygems_version: 2.6.13
319
130
  signing_key:
320
- specification_version: 3
131
+ specification_version: 4
321
132
  summary: Adds the ability to Enumerable to generate tables into different formats
322
133
  test_files:
323
134
  - test/.DS_Store
135
+ - test/tableizer/col_info.rb
324
136
  - test/tableizer/data_table_test.rb
137
+ - test/tableizer/tableizer.rb
325
138
  - test/tableizer_test.rb
326
139
  - test/test_helper.rb
327
- has_rdoc: