-
Notifications
You must be signed in to change notification settings - Fork 1
/
fat_table.gemspec
83 lines (73 loc) · 3.92 KB
/
fat_table.gemspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'fat_table/version'
Gem::Specification.new do |spec|
spec.name = 'fat_table'
spec.version = FatTable::VERSION
spec.authors = ['Daniel E. Doherty']
spec.email = ['[email protected]']
spec.summary = 'Provides tools for working with tables as a data type.'
spec.description = <<-DESC
FatTable is a gem that treats tables as a data type. It provides methods for
constructing tables from a variety of sources, building them row-by-row,
extracting rows, columns, and cells, and performing aggregate operations on
columns. It also provides as set of SQL-esque methods for manipulating table
objects: select for filtering by columns or for creating new columns, where
for filtering by rows, order_by for sorting rows, distinct for eliminating
duplicate rows, group_by for aggregating multiple rows into single rows and
applying column aggregate methods to ungrouped columns, a collection of join
methods for combining tables, and more.
Furthermore, FatTable provides methods for formatting tables and producing
output that targets various output media: text, ANSI terminals, ruby data
structures, LaTeX tables, Emacs org-mode tables, and more. The formatting
methods can specify cell formatting in a way that is uniform across all the
output methods and can also decorate the output with any number of footers,
including group footers. FatTable applies formatting directives to the extent
they makes sense for the output medium and treats other formatting directives as
no-ops.
FatTable can be used to perform operations on data that are naturally best
conceived of as tables, which in my experience is quite often. It can also serve
as a foundation for providing reporting functions where flexibility about the
output medium can be quite useful. Finally FatTable can be used within Emacs
org-mode files in code blocks targeting the Ruby language. Org mode tables are
presented to a ruby code block as an array of arrays, so FatTable can read
them in with its .from_aoa constructor. A FatTable table can output as an
array of arrays with its .to_aoa output function and will be rendered in an
org-mode buffer as an org-table, ready for processing by other code blocks.
DESC
spec.homepage = 'https://github.com/ddoherty03/fat_table'
# Use of squiggle heredocs knocks out older versions.
spec.required_ruby_version = '>= 2.2.2'
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the
# 'allowed_push_host' to allow pushing to a single host or delete this section
# to allow pushing to any host.
if spec.respond_to?(:metadata)
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
else
raise 'RubyGems 2.0 or newer is required to protect against ' \
'public gem pushes.'
end
spec.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(test|spec|features)/})
end
spec.bindir = 'bin'
spec.executables = ['ft_console']
spec.require_paths = ['lib']
spec.metadata['yard.run'] = 'yri' # use "yard" to build full HTML docs.
spec.add_development_dependency 'bundler'
spec.add_development_dependency 'debug', '>= 1.0.0'
spec.add_development_dependency 'pry'
spec.add_development_dependency 'pry-doc'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'redcarpet'
spec.add_development_dependency 'pg'
spec.add_development_dependency 'sqlite3'
spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_development_dependency 'rubocop-rspec'
spec.add_development_dependency 'rubocop-performance'
spec.add_development_dependency 'simplecov'
spec.add_runtime_dependency 'fat_core', '>= 4.9.0'
spec.add_runtime_dependency 'rainbow'
spec.add_runtime_dependency 'sequel'
spec.add_runtime_dependency 'gem-path'
end