Skip to content
CAI
Software that uses CAICheck a score

tj/terminal-table

59.2

Adequate · 6 November 2026

1.1k

lines of production code

Ruby

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Ruby library designed for generating ASCII and Unicode formatted tables within terminal environments. It provides a modular object model for constructing tables with features such as column alignment, multiline cell support, and customizable border styles. The library includes utilities for rendering complex layouts, including colspan handling and separator management, alongside example scripts for common use cases like CSV conversion.

Features

Initial release of Terminal Table 4.0.0

This entry marks the initial commit and release of the Terminal Table gem (version 4.0.0). It introduces a Ruby library for generating ASCII and Unicode formatted tables in the terminal. The package includes core components for managing table structure (rows, cells, separators, styles) and provides a public API for creating tables with features like column alignment, multiline cell support, and custom border styles. The release also establishes the project's foundational documentation (README, History), licensing (MIT), and build/test infrastructure (Rake tasks, RSpec specs).

(repo-wide) · high confidence

New example scripts demonstrating advanced table features

The examples directory now includes several new scripts that demonstrate specific capabilities of the terminal-table library. These include \show\_csv\_table.rb\ for converting CSV data into formatted tables, \strong\_separator.rb\ for creating tables with emphasized separators (such as footers), and \issue95.rb\ for applying custom colors and border styles. Additional examples (\issue100.rb\, \issue111.rb\, \issue118.rb\) showcase border customization options like Unicode, Markdown, and selective border removal, while \examples\_unicode.rb\ provides a comprehensive suite of Unicode rendering examples.

examples · high confidence

Removals

Removal of legacy Rake task definitions

The project has removed the \docs\, \gemspec\, and \spec\ Rake tasks, eliminating the ability to build documentation, generate the gemspec file, or run specifications via these specific legacy commands. This change reflects a shift away from the older \spec/rake/spectask\ and manual doc-building workflows, likely as part of a broader modernization of the build and testing infrastructure.

tasks · high confidence

Behavioural changes

Terminal-table v4.0.0: Complete object model refactor and Unicode border support

The library has been refactored from a single-file structure into a modular object model, introducing dedicated classes for Cell, Row, Separator, and Style to manage table rendering. This change updates the namespace from the global \TerminalTable\ class to the \Terminal::Table\ module, requiring users to adjust their require paths and class references. The update introduces a new \Style\ system that supports advanced Unicode border styles (including thick, heavy, and rounded variants) and allows for granular control over separators. Additionally, the \Cell\ class now handles alignment and colspan logic internally, and the \Separator\ class manages complex intersection logic for borders between rows with different column spans.

lib/terminal-table · high confidence

Test coverage

Add comprehensive RSpec test suite for Terminal::Table components

Added new specification files (cell\_spec.rb, import\_spec.rb, row\_spec.rb, style\_spec.rb, table\_spec.rb, unicode\_table\_spec.rb) to verify the behavior of Terminal::Table, including cell alignment, multiline content, colorization, column selection, colspan handling, separator rendering, and various border styles (markdown, ascii, unicode). Updated spec\_helper.rb to configure RSpec syntax and improved the String\#deindent helper. Removed the legacy terminal-table\_spec.rb file.

spec · high confidence

Dependencies

Initial gem packaging with dependency constraints

The project introduces its first Gemfile and gemspec, establishing the package structure for 'terminal-table'. This change defines runtime dependencies, specifically constraining 'unicode-display\_width' to versions \>= 1.1.1 and \< 4, and adds 'tins' (\~\> 1.0.0) to the Gemfile for Ruby 1.9 compatibility. Development dependencies for bundler (\~\> 2), rake (\~\> 13.0), rspec (\>= 3.0), and pry are also specified.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 59 → 59 (+0.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 75 → 75 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 43 → 43 (+0.0)
  • Readiness 75 → 75 (+0.0)
  • Security 95 → 95 (+0.0)

Resolved (3)

  • Conflicting naming for setting alignment. alignment= is a standard Ruby setter for a property. align is a method that takes multiple arguments (val, position, length), suggesting it might perform rendering or complex alignment logic rather than just setting a state. However, the name align is often used as a synonym for 'set alignment' in other libraries, causing confusion about whether it is a setter or a rendering helper.
  • Inconsistent and unclear naming for border style setters. border_x, border_y, and border_i are cryptic abbreviations. border_x and border_y likely refer to horizontal and vertical lines, but border_i is unclear (possibly 'inner' or 'index'?). This contrasts with the explicit border_top=, border_bottom=, etc., which are clear.
  • Redundant getter signatures. The presence of both alignment?() (likely returning nil if not set) and alignment() (likely returning a default or the value) creates ambiguity. In Ruby, alignment() is the standard getter. If alignment? is intended to be a predicate (boolean), it conflicts with the name alignment. If it is an optional getter, it duplicates the intent of alignment with a different return contract.

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

tj/terminal-table was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit f43fe052623c897a07784438f58063138166c3f8 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.