tablesmith 0.6.0 → 0.7.0
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 +4 -4
- data/lib/tablesmith/delegated_array_class.rb +2 -0
- data/lib/tablesmith/hash_rows_source.rb +2 -0
- data/lib/tablesmith/version.rb +1 -1
- data/spec/active_record_table_spec.rb +2 -0
- data/spec/hash_rows_table_spec.rb +9 -8
- metadata +25 -28
- data/.gitignore +0 -5
- data/.rspec +0 -2
- data/.rubocop.yml +0 -124
- data/.ruby-version +0 -1
- data/.travis.yml +0 -22
- data/Appraisals +0 -21
- data/Gemfile +0 -6
- data/LICENSE +0 -19
- data/README.md +0 -148
- data/Rakefile +0 -19
- data/bin/console +0 -18
- data/gemfiles/activerecord_4.gemfile +0 -10
- data/gemfiles/activerecord_5.1.gemfile +0 -10
- data/gemfiles/activerecord_5.2.gemfile +0 -10
- data/gemfiles/activerecord_6.0.gemfile +0 -10
- data/tablesmith.gemspec +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 245c0f0fb45ccb1e0e9266308a7e19ffcdbb83c21ad2b74665218ccf8f6b8611
|
4
|
+
data.tar.gz: 66a282d01a6deeaf26a8f9a443897c4a303153745886440e6ac0620349796213
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c46fb59d0ac34c18fb23cb48812e46d6c7e90c6bba769a1dc97dd60e572576d2700ab47415ca0ece1198800baca4079b1ede269a558940fd7b54cd6c6635c640
|
7
|
+
data.tar.gz: de28e097e2825c7655cdf9614ba993f88e959ec4fc37e594c329884a68a395ff203e61506c1ebea56f5d3f7567ed6ea6cd86f6d9ca9a73d1496e5e79a9d144d0
|
@@ -34,6 +34,8 @@ module Tablesmith::HashRowsSource
|
|
34
34
|
when Tablesmith::Column
|
35
35
|
row[col_or_hash.display_name] = deep_hash[col_or_hash.name].to_s
|
36
36
|
when Hash
|
37
|
+
# this isn't used yet it seems
|
38
|
+
|
37
39
|
col_or_hash.each_pair do |sub_hash_key, cols_or_hash|
|
38
40
|
[cols_or_hash].flatten.each do |inner_col_or_hash|
|
39
41
|
value_from_hash(row, deep_hash[sub_hash_key], inner_col_or_hash)
|
data/lib/tablesmith/version.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
|
+
# rubocop:disable Rails/SkipsModelValidations
|
5
6
|
describe 'ActiveRecordSource' do
|
6
7
|
it 'outputs text table of multiple ActiveRecords' do
|
7
8
|
a = Person.new.tap { |c| c.first_name = 'A' }
|
@@ -360,3 +361,4 @@ describe 'ActiveRecordSource' do
|
|
360
361
|
end
|
361
362
|
end
|
362
363
|
end
|
364
|
+
# rubocop:enable Rails/SkipsModelValidations
|
@@ -64,16 +64,17 @@ describe 'HashRowsSource' do
|
|
64
64
|
+---+---+---+
|
65
65
|
TABLE
|
66
66
|
b = [{ a: 1, b: { c: 2, d: 2 } }].to_table
|
67
|
-
def b.columns
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
end
|
67
|
+
# def b.columns
|
68
|
+
# [
|
69
|
+
# Column.new(name: :a),
|
70
|
+
# { b: [
|
71
|
+
# Column.new(name: :c)
|
72
|
+
# ] }
|
73
|
+
# ]
|
74
|
+
# end
|
75
75
|
|
76
76
|
# this would be nice.
|
77
|
+
# should be able to re-use what happens with ActiveRecord
|
77
78
|
b.to_s.should == expected
|
78
79
|
end
|
79
80
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tablesmith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- chrismo
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: text-table
|
@@ -123,7 +123,21 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: rubocop-performance
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubocop-rails
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
143
|
- - ">="
|
@@ -156,37 +170,21 @@ dependencies:
|
|
156
170
|
requirements:
|
157
171
|
- - "~>"
|
158
172
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1
|
173
|
+
version: '1'
|
160
174
|
type: :development
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
178
|
- - "~>"
|
165
179
|
- !ruby/object:Gem::Version
|
166
|
-
version: 1
|
180
|
+
version: '1'
|
167
181
|
description: Minimal console table
|
168
182
|
email:
|
169
183
|
- chrismo@clabs.org
|
170
|
-
executables:
|
171
|
-
- console
|
184
|
+
executables: []
|
172
185
|
extensions: []
|
173
186
|
extra_rdoc_files: []
|
174
187
|
files:
|
175
|
-
- ".gitignore"
|
176
|
-
- ".rspec"
|
177
|
-
- ".rubocop.yml"
|
178
|
-
- ".ruby-version"
|
179
|
-
- ".travis.yml"
|
180
|
-
- Appraisals
|
181
|
-
- Gemfile
|
182
|
-
- LICENSE
|
183
|
-
- README.md
|
184
|
-
- Rakefile
|
185
|
-
- bin/console
|
186
|
-
- gemfiles/activerecord_4.gemfile
|
187
|
-
- gemfiles/activerecord_5.1.gemfile
|
188
|
-
- gemfiles/activerecord_5.2.gemfile
|
189
|
-
- gemfiles/activerecord_6.0.gemfile
|
190
188
|
- lib/tablesmith.rb
|
191
189
|
- lib/tablesmith/active_record_source.rb
|
192
190
|
- lib/tablesmith/array_rows_source.rb
|
@@ -203,11 +201,10 @@ files:
|
|
203
201
|
- spec/hash_table_spec.rb
|
204
202
|
- spec/spec_helper.rb
|
205
203
|
- spec/table_spec.rb
|
206
|
-
|
207
|
-
homepage: http://github.com/livingsocial/tablesmith
|
204
|
+
homepage: http://github.com/chrismo/tablesmith
|
208
205
|
licenses: []
|
209
206
|
metadata: {}
|
210
|
-
post_install_message:
|
207
|
+
post_install_message:
|
211
208
|
rdoc_options: []
|
212
209
|
require_paths:
|
213
210
|
- lib
|
@@ -222,8 +219,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
219
|
- !ruby/object:Gem::Version
|
223
220
|
version: '0'
|
224
221
|
requirements: []
|
225
|
-
rubygems_version: 3.
|
226
|
-
signing_key:
|
222
|
+
rubygems_version: 3.5.11
|
223
|
+
signing_key:
|
227
224
|
specification_version: 4
|
228
225
|
summary: Minimal console table
|
229
226
|
test_files:
|
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,124 +0,0 @@
|
|
1
|
-
AllCops:
|
2
|
-
TargetRubyVersion: 2.3
|
3
|
-
|
4
|
-
Layout/ClassStructure:
|
5
|
-
Enabled: true
|
6
|
-
Categories:
|
7
|
-
module_inclusion:
|
8
|
-
- include
|
9
|
-
- prepend
|
10
|
-
- extend
|
11
|
-
association:
|
12
|
-
- has_many
|
13
|
-
- has_one
|
14
|
-
- belongs_to
|
15
|
-
- has_and_belongs_to_many
|
16
|
-
validations:
|
17
|
-
- validate
|
18
|
-
- validates_inclusion_of
|
19
|
-
- validates_presence_of
|
20
|
-
callbacks:
|
21
|
-
- before_initialize
|
22
|
-
- before_validation
|
23
|
-
- before_save
|
24
|
-
- before_create
|
25
|
-
- before_update
|
26
|
-
- before_destroy
|
27
|
-
- after_save
|
28
|
-
- after_create
|
29
|
-
- after_validation
|
30
|
-
- after_initialize
|
31
|
-
- after_update
|
32
|
-
- after_destroy
|
33
|
-
enums:
|
34
|
-
- enum
|
35
|
-
scopes:
|
36
|
-
- scope
|
37
|
-
ExpectedOrder:
|
38
|
-
- association
|
39
|
-
- module_inclusion
|
40
|
-
- validations
|
41
|
-
- constants
|
42
|
-
- enums
|
43
|
-
- callbacks
|
44
|
-
- scopes
|
45
|
-
- public_class_methods
|
46
|
-
- initializer
|
47
|
-
- public_methods
|
48
|
-
- protected_methods
|
49
|
-
- private_methods
|
50
|
-
|
51
|
-
Layout/DotPosition:
|
52
|
-
EnforcedStyle: trailing
|
53
|
-
|
54
|
-
Layout/SpaceInsideHashLiteralBraces:
|
55
|
-
Enabled: false
|
56
|
-
|
57
|
-
Lint/Void:
|
58
|
-
Exclude:
|
59
|
-
- 'spec/**'
|
60
|
-
|
61
|
-
Metrics:
|
62
|
-
Enabled: true
|
63
|
-
|
64
|
-
Metrics/AbcSize:
|
65
|
-
Max: 20
|
66
|
-
|
67
|
-
Metrics/BlockLength:
|
68
|
-
Exclude:
|
69
|
-
- 'Rakefile'
|
70
|
-
- '**/*.rake'
|
71
|
-
- 'spec/**/*.rb'
|
72
|
-
- 'test/**/*.rb'
|
73
|
-
ExcludedMethods: ['included', 'namespace']
|
74
|
-
|
75
|
-
Metrics/ClassLength:
|
76
|
-
Exclude:
|
77
|
-
- 'Rakefile'
|
78
|
-
- 'spec/**/*.rb'
|
79
|
-
- 'test/**/*.rb'
|
80
|
-
|
81
|
-
Metrics/LineLength:
|
82
|
-
Enabled: false
|
83
|
-
Max: 120
|
84
|
-
AllowHeredoc: true
|
85
|
-
AllowURI: true
|
86
|
-
URISchemes: http, https
|
87
|
-
|
88
|
-
Metrics/MethodLength:
|
89
|
-
CountComments: false # count full line comments?
|
90
|
-
Max: 15
|
91
|
-
|
92
|
-
Naming/UncommunicativeMethodParamName:
|
93
|
-
Enabled: false
|
94
|
-
|
95
|
-
Rails/Date:
|
96
|
-
Enabled: true
|
97
|
-
EnforcedStyle: flexible
|
98
|
-
|
99
|
-
Rails/RefuteMethods:
|
100
|
-
Enabled: true
|
101
|
-
|
102
|
-
Rails/TimeZone:
|
103
|
-
Enabled: true
|
104
|
-
EnforcedStyle: flexible
|
105
|
-
|
106
|
-
Style/ClassAndModuleChildren:
|
107
|
-
Enabled: false
|
108
|
-
|
109
|
-
Style/Documentation:
|
110
|
-
Enabled: false
|
111
|
-
|
112
|
-
Style/DocumentationMethod:
|
113
|
-
Enabled: false
|
114
|
-
|
115
|
-
Style/FrozenStringLiteralComment:
|
116
|
-
EnforcedStyle: when_needed
|
117
|
-
Enabled: true
|
118
|
-
|
119
|
-
# Technically this performs better, and I got no problem with it.
|
120
|
-
Style/ParallelAssignment:
|
121
|
-
Enabled: false
|
122
|
-
|
123
|
-
Style/WhenThen:
|
124
|
-
Enabled: true
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.6.5
|
data/.travis.yml
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
rvm:
|
4
|
-
- 2.4.6
|
5
|
-
- 2.5.5
|
6
|
-
- 2.6.5
|
7
|
-
- 2.7.0
|
8
|
-
|
9
|
-
gemfile:
|
10
|
-
- gemfiles/activerecord_4.gemfile
|
11
|
-
- gemfiles/activerecord_5.1.gemfile
|
12
|
-
- gemfiles/activerecord_5.2.gemfile
|
13
|
-
- gemfiles/activerecord_6.0.gemfile
|
14
|
-
|
15
|
-
before_install: gem install bundler -v 2.1.2
|
16
|
-
|
17
|
-
jobs:
|
18
|
-
exclude:
|
19
|
-
- rvm: 2.4.6
|
20
|
-
gemfile: gemfiles/activerecord_6.0.gemfile
|
21
|
-
- rvm: 2.7.0
|
22
|
-
gemfile: gemfiles/activerecord_4.gemfile
|
data/Appraisals
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
appraise 'activerecord-4' do
|
4
|
-
gem 'activerecord', '~> 4.0'
|
5
|
-
gem 'sqlite3', '~> 1.3.6'
|
6
|
-
end
|
7
|
-
|
8
|
-
appraise 'activerecord-5.1' do
|
9
|
-
gem 'activerecord', '~> 5.1.0'
|
10
|
-
gem 'sqlite3', '~> 1.4'
|
11
|
-
end
|
12
|
-
|
13
|
-
appraise 'activerecord-5.2' do
|
14
|
-
gem 'activerecord', '~> 5.2.0'
|
15
|
-
gem 'sqlite3', '~> 1.4'
|
16
|
-
end
|
17
|
-
|
18
|
-
appraise 'activerecord-6.0' do
|
19
|
-
gem 'activerecord', '~> 6.0.0'
|
20
|
-
gem 'sqlite3', '~> 1.4'
|
21
|
-
end
|
data/Gemfile
DELETED
data/LICENSE
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
Copyright (c) 2012-2015 LivingSocial, Inc.
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
-
of this software and associated documentation files (the "Software"), to deal
|
5
|
-
in the Software without restriction, including without limitation the rights
|
6
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
copies of the Software, and to permit persons to whom the Software is
|
8
|
-
furnished to do so, subject to the following conditions:
|
9
|
-
|
10
|
-
The above copyright notice and this permission notice shall be included in
|
11
|
-
all copies or substantial portions of the Software.
|
12
|
-
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
|
-
SOFTWARE.
|
data/README.md
DELETED
@@ -1,148 +0,0 @@
|
|
1
|
-
[](https://travis-ci.org/livingsocial/tablesmith)
|
2
|
-
|
3
|
-
# Tablesmith
|
4
|
-
|
5
|
-
Drop-in gem for console tables for Array, Hash, and ActiveRecord.
|
6
|
-
|
7
|
-
## Installation
|
8
|
-
|
9
|
-
Add this line to your application's Gemfile:
|
10
|
-
|
11
|
-
gem 'tablesmith'
|
12
|
-
|
13
|
-
And then execute:
|
14
|
-
|
15
|
-
$ bundle
|
16
|
-
|
17
|
-
Or install it yourself as:
|
18
|
-
|
19
|
-
$ gem install tablesmith
|
20
|
-
|
21
|
-
## Usage
|
22
|
-
|
23
|
-
### In irb or pry
|
24
|
-
|
25
|
-
```
|
26
|
-
require 'tablesmith'
|
27
|
-
|
28
|
-
> [[:foo, :bar], [1,3]].to_table
|
29
|
-
=> +-----+-----+
|
30
|
-
| foo | bar |
|
31
|
-
+-----+-----+
|
32
|
-
| 1 | 3 |
|
33
|
-
+-----+-----+
|
34
|
-
|
35
|
-
> {a: 1, b: 2}.to_table
|
36
|
-
=> +---+---+
|
37
|
-
| a | b |
|
38
|
-
+---+---+
|
39
|
-
| 1 | 2 |
|
40
|
-
+---+---+
|
41
|
-
|
42
|
-
> t = [{date: '1/1/2020', amt: 35}, {date: '1/2/2020', amt: 80}].to_table
|
43
|
-
=> +----------+-----+
|
44
|
-
| date | amt |
|
45
|
-
+----------+-----+
|
46
|
-
| 1/1/2020 | 35 |
|
47
|
-
| 1/2/2020 | 80 |
|
48
|
-
+----------+-----+
|
49
|
-
|
50
|
-
> # Table delegates to Array, all Array methods are available.
|
51
|
-
> t.select! { |h| h[:amt] > 40 }
|
52
|
-
=> [{:date=>"1/2/2020", :amt=>80}]
|
53
|
-
|
54
|
-
> t
|
55
|
-
=> +----------+-----+
|
56
|
-
| date | amt |
|
57
|
-
+----------+-----+
|
58
|
-
| 1/2/2020 | 80 |
|
59
|
-
+----------+-----+
|
60
|
-
|
61
|
-
|
62
|
-
> p1 = Person.create(first_name: 'chrismo', custom_attributes: { instrument: 'piano', style: 'jazz' })
|
63
|
-
=> #<Person:0x00007fac3eb406a8 id: 1, first_name: "chrismo", last_name: nil, age: nil, custom_attributes: {:instrument=>"piano", :style=>"jazz"}>
|
64
|
-
> p2 = Person.create(first_name: 'romer', custom_attributes: { hobby: 'games' })
|
65
|
-
=> #<Person:0x00007fac3ebcbb68 id: 2, first_name: "romer", last_name: nil, age: nil, custom_attributes: {:hobby=>"games"}>
|
66
|
-
> batch = [p1, p2].to_table
|
67
|
-
=> +----+------------+-----------+-----+--------+------------+--------+
|
68
|
-
| person | custom_attributes |
|
69
|
-
+----+------------+-----------+-----+--------+------------+--------+
|
70
|
-
| id | first_name | last_name | age | hobby | instrument | style |
|
71
|
-
+----+------------+-----------+-----+--------+------------+--------+
|
72
|
-
| 1 | chrismo | | | | piano | jazz |
|
73
|
-
| 2 | romer | | | games | | |
|
74
|
-
+----+------------+-----------+-----+--------+------------+--------+
|
75
|
-
```
|
76
|
-
|
77
|
-
### In a Script
|
78
|
-
|
79
|
-
`puts` won't work because of how Kernel#puts has special case code for Arrays.
|
80
|
-
Tablesmith::Table subclasses Array, so it can't cope with puts. Try to remember
|
81
|
-
to use `print` instead.
|
82
|
-
|
83
|
-
```ruby
|
84
|
-
require 'tablesmith'
|
85
|
-
|
86
|
-
print [{date: '1/1/2020', amt: 35}, {date: '1/2/2020', amt: 80}].to_table
|
87
|
-
```
|
88
|
-
|
89
|
-
### CSV Support
|
90
|
-
```
|
91
|
-
> puts [{date: '1/1/2020', amt: 35}, {date: '1/2/2020', amt: 80}].to_table.to_csv
|
92
|
-
date,amt
|
93
|
-
1/1/2020,35
|
94
|
-
1/2/2020,80
|
95
|
-
```
|
96
|
-
|
97
|
-
### HTML Support
|
98
|
-
```
|
99
|
-
> puts [{date: '1/1/2020', amt: 35}, {date: '1/2/2020', amt: 80}].to_table.to_html
|
100
|
-
<table>
|
101
|
-
<thead>
|
102
|
-
<tr>
|
103
|
-
<th>date</th>
|
104
|
-
<th>amt</th>
|
105
|
-
</tr>
|
106
|
-
</thead>
|
107
|
-
<tbody>
|
108
|
-
<tr>
|
109
|
-
<td>1/1/2020</td>
|
110
|
-
<td>35</td>
|
111
|
-
</tr>
|
112
|
-
<tr>
|
113
|
-
<td>1/2/2020</td>
|
114
|
-
<td>80</td>
|
115
|
-
</tr>
|
116
|
-
</tbody>
|
117
|
-
</table>
|
118
|
-
```
|
119
|
-
|
120
|
-
## Troubleshooting
|
121
|
-
|
122
|
-
If you ever get a default inspection output in a console for a table, an
|
123
|
-
exception has likely occurred and been caught by IRB or Pry. Call
|
124
|
-
`.to_table.to_s` to see what the exception is.
|
125
|
-
|
126
|
-
```
|
127
|
-
[1] pry(main)> [1, [2, 3]].to_table
|
128
|
-
=> #<Tablesmith::Table:0x3fc083e14294>
|
129
|
-
[2] pry(main)> [1, [2, 3]].to_table.to_s
|
130
|
-
IndexError: element size differs (2 should be 1)
|
131
|
-
from /Users/chrismo/.bundle/ruby/2.6.0/gems/text-table-1.2.4/lib/text-table/table.rb:157:in `transpose'
|
132
|
-
```
|
133
|
-
|
134
|
-
## Why Not #{other_gem}?
|
135
|
-
|
136
|
-
Happy to learn about something else already out there, but I have struggled to
|
137
|
-
find something that doesn't require some sort of setup. I want drop-in
|
138
|
-
ready-to-go table output for Arrays, Hashes, and ActiveRecord objects.
|
139
|
-
|
140
|
-
Here's a quick list of other gems that I've tried out that are awesome and do
|
141
|
-
much more than what Tablesmith does, but don't seem to specialize in what I
|
142
|
-
want:
|
143
|
-
|
144
|
-
- [text-table](https://github.com/aptinio/text-table) _Tablesmith uses text-table underneath_
|
145
|
-
- [Hirb](https://github.com/cldwalker/hirb) _Hirb is cool, and pretty close to what I want_
|
146
|
-
- [table_print](http://tableprintgem.com/)
|
147
|
-
- [awesome_print](https://github.com/awesome-print/awesome_print)
|
148
|
-
- [tabulo](https://github.com/matt-harvey/tabulo)
|
data/Rakefile
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'rspec/core/rake_task'
|
4
|
-
require 'bundler/gem_tasks'
|
5
|
-
|
6
|
-
FileList['tasks/*.rake'].each(&method(:load))
|
7
|
-
|
8
|
-
task default: :spec
|
9
|
-
|
10
|
-
desc 'Run the specs.'
|
11
|
-
RSpec::Core::RakeTask.new do |t|
|
12
|
-
t.pattern = '*_spec.rb'
|
13
|
-
end
|
14
|
-
|
15
|
-
require 'rubocop/rake_task'
|
16
|
-
|
17
|
-
RuboCop::RakeTask.new(:rubocop)
|
18
|
-
|
19
|
-
task default: :rubocop
|
data/bin/console
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require 'bundler/setup'
|
5
|
-
require 'tablesmith'
|
6
|
-
require_relative '../spec/fixtures'
|
7
|
-
|
8
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
9
|
-
# with your gem easier. You can also use a different console, if you like.
|
10
|
-
|
11
|
-
if ARGV[0] == 'irb'
|
12
|
-
ARGV.clear
|
13
|
-
require 'irb'
|
14
|
-
IRB.start(__FILE__)
|
15
|
-
else
|
16
|
-
require 'pry'
|
17
|
-
Pry.start
|
18
|
-
end
|
data/tablesmith.gemspec
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
lib = File.expand_path('lib', __dir__)
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require 'tablesmith/version'
|
6
|
-
|
7
|
-
Gem::Specification.new do |gem|
|
8
|
-
gem.name = 'tablesmith'
|
9
|
-
gem.version = Tablesmith::VERSION
|
10
|
-
gem.authors = ['chrismo']
|
11
|
-
gem.email = ['chrismo@clabs.org']
|
12
|
-
gem.description = 'Minimal console table'
|
13
|
-
gem.summary = 'Minimal console table'
|
14
|
-
gem.homepage = 'http://github.com/livingsocial/tablesmith'
|
15
|
-
|
16
|
-
gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
17
|
-
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
18
|
-
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
|
-
gem.require_paths = ['lib']
|
20
|
-
|
21
|
-
gem.add_dependency 'text-table'
|
22
|
-
|
23
|
-
gem.add_development_dependency 'activerecord', '~> 4.0'
|
24
|
-
gem.add_development_dependency 'appraisal'
|
25
|
-
gem.add_development_dependency 'bundler', '~> 2.1'
|
26
|
-
gem.add_development_dependency 'pry'
|
27
|
-
gem.add_development_dependency 'rake', '>= 12.3.3'
|
28
|
-
gem.add_development_dependency 'rspec', '~> 3.0'
|
29
|
-
gem.add_development_dependency 'rubocop'
|
30
|
-
gem.add_development_dependency 'rubocop_lineup'
|
31
|
-
gem.add_development_dependency 'simplecov'
|
32
|
-
gem.add_development_dependency 'sqlite3', '~> 1.3.6'
|
33
|
-
end
|