tablesmith 0.4.0 → 0.6.2
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 +5 -5
- data/lib/tablesmith.rb +3 -0
- data/lib/tablesmith/active_record_source.rb +4 -2
- data/lib/tablesmith/array_rows_source.rb +3 -1
- data/lib/tablesmith/delegated_array_class.rb +39 -0
- data/lib/tablesmith/hash_rows_base.rb +4 -1
- data/lib/tablesmith/hash_rows_source.rb +8 -8
- data/lib/tablesmith/html_formatter.rb +3 -5
- data/lib/tablesmith/table.rb +53 -40
- data/lib/tablesmith/version.rb +3 -1
- data/spec/active_record_table_spec.rb +53 -49
- data/spec/array_table_spec.rb +69 -2
- data/spec/fixtures.rb +2 -0
- data/spec/hash_rows_table_spec.rb +15 -12
- data/spec/hash_table_spec.rb +23 -1
- data/spec/spec_helper.rb +6 -2
- data/spec/table_spec.rb +21 -9
- metadata +98 -24
- data/.gitignore +0 -4
- data/.rspec +0 -2
- data/.rubocop.yml +0 -11
- data/.ruby-version +0 -1
- data/.travis.yml +0 -1
- data/Gemfile +0 -4
- data/LICENSE +0 -19
- data/README.md +0 -35
- data/Rakefile +0 -11
- data/tablesmith.gemspec +0 -28
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.3.4
|
data/.travis.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
language: ruby
|
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,35 +0,0 @@
|
|
1
|
-
# Tablesmith
|
2
|
-
|
3
|
-
Drop-in gem for console tables for Hash, Array and ActiveRecord.
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
Add this line to your application's Gemfile:
|
8
|
-
|
9
|
-
gem 'tablesmith'
|
10
|
-
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
$ bundle
|
14
|
-
|
15
|
-
Or install it yourself as:
|
16
|
-
|
17
|
-
$ gem install tablesmith
|
18
|
-
|
19
|
-
## Usage
|
20
|
-
|
21
|
-
TODO: Write usage instructions here
|
22
|
-
|
23
|
-
## Why Not #{other_gem}?
|
24
|
-
|
25
|
-
Happy to learn about something else already out there, but have struggled to find something
|
26
|
-
that doesn't require some sort of setup. I want drop-in ready-to-go table output for Hashes,
|
27
|
-
Arrays and ActiveRecord objects.
|
28
|
-
|
29
|
-
Here's a quick list of other gems that I've tried out that are awesome and do much more than what Tablesmith does,
|
30
|
-
but don't seem to specialize in what I want:
|
31
|
-
|
32
|
-
- Hirb
|
33
|
-
- text-table
|
34
|
-
- table_print
|
35
|
-
- awesome_print
|
data/Rakefile
DELETED
data/tablesmith.gemspec
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'tablesmith/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |gem|
|
7
|
-
gem.name = 'tablesmith'
|
8
|
-
gem.version = Tablesmith::VERSION
|
9
|
-
gem.authors = ['chrismo']
|
10
|
-
gem.email = ['chrismo@clabs.org']
|
11
|
-
gem.description = %q{Minimal console table}
|
12
|
-
gem.summary = %q{Minimal console table}
|
13
|
-
gem.homepage = 'http://github.com/livingsocial/tablesmith'
|
14
|
-
|
15
|
-
gem.files = `git ls-files`.split($/)
|
16
|
-
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
-
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
-
gem.require_paths = ['lib']
|
19
|
-
|
20
|
-
gem.add_dependency 'text-table'
|
21
|
-
|
22
|
-
gem.add_development_dependency 'activerecord', '~> 3.0'
|
23
|
-
gem.add_development_dependency 'pry'
|
24
|
-
gem.add_development_dependency 'rake', '~> 10.0'
|
25
|
-
gem.add_development_dependency 'rspec', '~> 2.0'
|
26
|
-
gem.add_development_dependency 'simplecov'
|
27
|
-
gem.add_development_dependency 'sqlite3'
|
28
|
-
end
|