- Improved Unicode support via updated version of the
unicode-display_width
dependency. Thanks, Janosch Müller (@jaynetics): #24. - Cover Ruby 3.4 in CI config
- Upgrade dependency versions
- Upgrade dependency versions
- Cover Ruby 3.3 in CI config
- Require Ruby >= 3.1
- Upgrade dependency versions
- Remove "rake-version" development dependency; it's not essential, and doesn't currently work with Ruby 3.2.
- Relax dependencies to address incompatibility with recent Rubocop version. Thanks to Fabrizio Monti (@delphaber) for this fix: #23.
- Add CI coverage for Ruby 3.2
- Upgrade dependency versions in Github action to address deprecation warnings
- Upgrade dependency versions
- Minor documentation fixes
- Add
except:
param toTabulo::Table#pack
method, allowing specific columns to be excluded from the action of.pack
. Thanks to Janosch Müller (@jaynetics) for this feature: #21. - Provide method
Tabulo::Table#autosize_columns
, allowing columns to be auto-sized to fit their contents' widths, without having to call.pack
(which also has other effects on the table). This method also has anexcept:
param allowing columns to be excluded from its action. - Provide method
Tabulo::Table#shrink_to
, allowing the table's width to be reduced so as not to exceed a given target number of characters (or the argument:screen
meaning "width of terminal"), independently of the.pack
method. This method also has anexcept:
param allowing columns to be excluded from its action. - Fix
max_table_width:
param to.pack
not being respected if table title was wider than terminal. - Documentation improvements
- Fix broken documentation links. Thanks to Janosch Müller (@jaynetics): #19.
- Add Ruby 3.1 to CI config
- Fix malformed YARD documentation for
Tabulo::Table#initialize
method
- Minor documentation improvements and tweaks
- Upgrade Ruby patch versions in CI config
- Dependency version upgrades
- Minor documentation improvements and tweaks
- Add
wrap_preserve
option, allowing whole words to be preserved when wrapping. - Internal: Use GitHub actions instead of Travis
- Update dependency versions
- Ensure line break character sequences are property formatted in output, regardless of whether they are "\r\n", "\r" or "\n".
- Update dependency versions
- Minor documentation improvements
- Add an additional, optional parameter to
styler
,header_styler
andtitle_styler
callbacks, which will receive the index (0, 1 or etc.) of the line within the cell being styled. - Allow padding to be configured on a column-by-column basis.
- Minor documentation improvements.
- Add option of table title, together with options for styling and aligning the title
- Fix warnings under Ruby 2.7
- Fix minor error in README
- Minor documentation tweaks
- Add additional, optional
CellData
parameter tostyler
andformatter
callbacks - Add optional
column_index
parameter toheader_styler
callback - Add optional
row_index
parameter toextractor
callback - Add
rake yard
Rake task for generating YARD documentation - Minor documentation fixes
- Upgrade dependency version:
unicode-display_width
gem to 1.7.0
- Fix styler option on Table initializer, which had no effect
- Update Rake version to address vulnerability CVE-2020-8130
- Documentation improvements
- Update dependency versions
- Minor refactoring
- Update Ruby gem description and summary
- Provide
#remove_column
method. - Provide
before
option to#add_column
, to allow insertion of column into non-final position. - Provide
styler
andheader_styler
options in table initializer, to enable default stylers to be set for all columns. - Documentation improvements and code tidy-ups.
- New
column_formatter
option onTabulo::Table
initializer, enabling the table's default column formatter to be customized. - New
row_divider_frequency
option onTabulo::Table
initializer, to add a horizontal dividing line after every N rows.
- Fix issue where blank lines appear in table when certain border types (e.g.
:classic
) are used with a non-nilborder_styler
. - Minor documentation fix
- New
reduced_ascii
andreduced_modern
border options - Fix
column_width
option not properly inherited from original table by the new table created by calling #transpose.
- Minor documentation fixes
- Minor documentation fix
- New
border
option forTabulo::Table
initializer allows for better customization of border and divider characters, using a preset list of options, viz.::ascii
,:modern
,:markdown
,:blank
and:classic
. In particular, the:modern
border option uses smoothly drawn Unicode line characters; and the:markdown
option renders a GitHub-flavoured Markdown table. Tabulo::Table#horizontal_rule
method accepts:top
,:bottom
and:middle
options to allow the appropriate border characters to be used depending on its intended position in the table.- When iterating a
Tabulo::Row
, it's now possible to get the formatted string value of an individualTabulo::Cell
, not just its underlying "raw" value. - Column padding can now optionally be configured separately for left and right column sides, by
passing a 2-element Array to the
column_padding
option of theTabulo::Table
initializer.
- A
Tabulo::Row
is now a collection ofTabulo::Cell
, not a collection of underlying "raw" values. This makes it easier to get at both formatted string values and underlying "raw" values ofCell
s when traversing aRow
. To get at the raw underlying value, callTabulo::Cell#value
. - Remove deprecated
columns
option fromTabulo::Table
initializer (existingcols
positional parameter now renamed tocolumns
). - Remove deprecated
shrinkwrap!
method (usepack
instead). - By default, table now has a border line at the bottom. Pass
:classic
to theborder
option of theTabulo::Table
initializer to get the old behaviour. - Removal of
horizontal_rule_character
,vertical_rule_character
andintersection
character options fromTabulo::Table
initializer, and fromTabulo::Table#transpose
method. Use theborder
option instead.
- Test coverage is now at exactly 100%
hirb
gem now mentioned in README
- Dependency version upgrades
- Minor documentation fixes
- Support use of ANSI escape sequences to add colours and other styling to table elements without breaking the formatting.
- Major refactor, moving various computations into a new Cell class.
- Minor documentation fix
- New
#transpose
function to produce a new Table in which the rows and columns are transposed relative to the original one. - Properly handle multibyte characters when calculating widths, wrapping etc..
- More ergonomic Table initializer, allowing you to specify columns directly as varargs rather
than as an array passed to
columns:
option (the latter is now deprecated) - New
#pack
method to autosize table, capping total table width at width of terminal by default (replaces#shrinkwrap!
method, now deprecated) - Ability to set table-level defaults for column header and body cell alignments
- Accessor methods for
source
attribute, representing the underlying collection being tabulated, facilitating reuse of the same table to tabulate different collections - Documentation improvements
- Improve documentation.
- Improve documentation in README.
- Update Travis config.
- Change homepage in Gemspec
- Allow customization of padding.
- Allow customization of horizontal divider, vertical divider and intersection characters.
- Fix deprecation warnings.
- Update bundler version development dependency.
- Decision to release stable version!
- Minor implementation and documentation tweaks.
- Throw an exception if column labels are not unique.
- Explicitly support only Ruby >= 2.1.10.
- Fix Table#shrinkwrap! handling of newlines within header cell content.
- README now correctly formatted by rubydoc.info.
- Correctly handle newlines in cell content.
- Use keyword arguments instead of option hashes.
- Write remaining pending specs.
- Unsuccessful attempt to fix broken appearance of http://www.rubydoc.info/gems/tabulo/0.5.1
- Add Table#shrinkwrap! method to automate column widths so they "just fit".
- Improve documentation.
- Improve README.
- Fix error when printing a Table, or a Row thereof, when the Table doesn't have any columns.
- Remove unused development dependency on yard-tomdoc.
- Write more specs.
- Update README to reflect default column width of 12.
- Increase default column width from 8 to 12
- Allow default column width to be configured when initializing a Table
- Minor code tidy-ups, including removal of undocumented ability for Table#add_column to accept a Column instance directly.
- Fix width and other options ignored by Table#add_column.
- Rename Table#header_row to Table#formatted_header
- Improve documentation, and use Yardoc instead of Tomdoc
- Remove Tabulo::Column from the publicly documented API.
- Write documentation
- Code tidy-ups
- Tidy-ups and improvements to README, including adding badges for test coverage etc..
- Allow columns to be initialized with
columns
option inTable
initializer - Removed redundant
truncate
option. - Rename
wrap_cells_to
towrap_body_cells_to
. - Improve README.
Initial release.