Skip to content
CAI
Software that uses CAICheck a score

rails/thor

59.4

Adequate · 26 September 2026

5.5k

lines of production code

Ruby

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add the 'thor' executable entry point

A new 'thor' executable script is added to the 'bin' directory, which loads the 'thor/runner' module and initiates the application. This change establishes the primary entry point for the Thor command-line interface, allowing users to invoke the tool directly from the installation directory.

bin · high confidence

Introduce HashWithIndifferentAccess with extended Hash API

A new \HashWithIndifferentAccess\ class is added to \lib/thor/core\_ext\, providing a hash implementation that supports both string and symbol keys interchangeably. This class implements several standard Hash methods to ensure compatibility, including \except\, \fetch\, \slice\, \key?\, \values\_at\, \merge\, \reverse\_merge\, and magic predicate methods (e.g., \options.foo?\).

_lib/thor/core\ext · high confidence

Project renamed from Hermes to Thor and migrated to a Thorfile-based build system

The project has been renamed from Hermes to Thor, with the README updated to reflect the new name and purpose as a command-line utility builder. The legacy Rakefile build system has been removed and replaced with a Thorfile that defines build, install, and release tasks using the Thor framework. The project also adopted RuboCop for code linting, added a CONTRIBUTING.md guide, and updated the license file to include additional authors.

(repo-wide) · high confidence

Replace Hermes CLI framework with Thor

The library has migrated from the Hermes CLI framework to Thor. This change replaces the vendored \getopt.rb\ and \hermes.rb\ with \lib/thor.rb\ and \lib/thor/base.rb\, introducing a new invocation system, task registration, and option parsing. Users will now interact with the CLI using Thor's command structure, including support for subcommands, grouped options, and improved help output formatting.

lib · high confidence

Architecture

Refactor file and directory actions into dedicated classes

The file and directory manipulation actions in \lib/thor/actions\ have been refactored into dedicated classes: \CreateFile\, \CreateLink\, \Directory\, \EmptyDirectory\, \InjectIntoFile\, and \FileManipulation\. This change introduces a more modular structure where each action type is encapsulated in its own file (e.g., \create\_file.rb\, \create\_link.rb\, \directory.rb\, \empty\_directory.rb\, \inject\_into\_file.rb\). The \FileManipulation\ module now delegates to these new classes, improving code organization and maintainability. Users will see no functional change, but the internal implementation is now more explicit and easier to extend or modify.

lib/thor/actions · high confidence

Refactored Thor's internal architecture into modular components

The Thor library's codebase has been reorganized into distinct, autoloaded modules including Thor::Actions, Thor::Base, Thor::Command, Thor::Error, Thor::Group, Thor::Invocation, Thor::LineEditor, Thor::NestedContext, Thor::Parser, Thor::RakeCompat, and Thor::Runner. This refactoring separates concerns, making the codebase more maintainable and allowing for lazy loading of components like the line editor and shell implementations.

lib/thor · high confidence

Behavioural changes

Refactored CLI argument and option parsing with new Argument/Option classes

The parser logic has been refactored into dedicated \Argument\ and \Option\ classes, introducing support for \:hash\, \:array\, and \:numeric\ argument types alongside the existing string and boolean types. This change enables more robust validation, including enum checks for arguments, handling of repeatable options, and stricter type checking for default values. The \Options\ class now tracks parsing state to correctly handle trailing arguments and unknown options, while the \Arguments\ class provides a cleaner interface for parsing positional arguments with support for hashes and arrays.

lib/thor/parser · high confidence

Refactored line editor into Basic and Readline implementations

The line editing functionality has been restructured into two distinct classes: Thor::LineEditor::Basic, which handles standard input/output with optional echo suppression, and Thor::LineEditor::Readline, which provides advanced features like history support and tab completion. This change introduces path completion capabilities, allowing users to navigate and complete file paths directly within the CLI, while maintaining backward compatibility for environments where the Readline library is unavailable.

_lib/thor/line\editor · high confidence

Refactored the shell output system into a modular architecture with new print capabilities

The shell output logic has been restructured into separate, reusable classes: \Basic\ handles core output methods like \say\, \ask\, and \indent\; \Color\ and \HTML\ provide themed output with color/HTML styling; and dedicated printer classes (\ColumnPrinter\, \TablePrinter\, \WrappedPrinter\) handle formatted output for columns, tables (including borders and indentation), and word-wrapped text. This refactoring introduces new public APIs for printing tables with borders, printing in columns, and wrapping long text, while maintaining backward compatibility through the \Basic\ base class.

lib/thor/shell · high confidence

Removed legacy script generators

The 'script/generate' and 'script/destroy' Ruby scripts, which previously invoked the RubiGen framework for code generation and deletion tasks, have been removed from the repository.

script · high confidence

Test coverage

Add fixture files for testing Thor commands and groups; Added comprehensive test coverage for Thor components; Added comprehensive test coverage for the argument and option parsers; Added empty directory fixture for doc/components; Added specs for basic and Readline-based line editors; Added test coverage for HashWithIndifferentAccess; Added test fixture for ERB template stacktraces; Added test fixture for file exclusion patterns; Added test fixtures for file mode preservation; Added test fixtures for template and file actions; Added tests for Thor::Shell::Basic, Thor::Shell::Color, and Thor::Shell::HTML; Expanded test coverage for file and directory actions.

Dependencies

Adopts Gemfile and updates development dependencies

The project now uses a Gemfile to manage development and test dependencies, replacing the previous gemspec-only approach. Key updates include requiring Ruby 2.6.0 or higher, adding RuboCop 1.30 for linting, and updating test tools such as RSpec 3.2+, SimpleCov, and WebMock. This change improves dependency management and enforces modern Ruby standards.

(dependencies) · high confidence

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

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 45 → 59 (+14.6)
  • Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 99 → 96 (-3.6)
  • Architecture 94 → 100 (+5.9)
  • Maturity 57 → 52 (-5.0)
  • Readiness 32 → 51 (+19.0)
  • Security 37 → 67 (+30.0)

Resolved (18)

  • Coverage not measured — test suite did not build
  • Dimension evaluation failed
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • No exposed public API
  • No tests found
  • Test reliability not included
  • The README is a single-file description of Thor's purpose and usage; there is no architecture or design doc explaining the command parsing model, file processing flow, or integration with Rails. (README.md)

New (34)

  • Duplicated block (6 lines × 2) (lib/thor/actions/file_manipulation.rb)
  • Further orphaned files (smaller)
  • HackComment (lib/thor/rake_compat.rb)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Inconsistent entry points and help mechanisms. Thor.help takes a shell and subcommand, Thor.Runner.help takes a method, and Thor::Base::ClassMethods.start is the primary entry point but doesn't expose help directly. This makes it unclear how to programmatically trigger help in different contexts.
  • Inconsistent naming and arity for stop_on_unknown_option. The Thor module has both ! and ? variants with different argument counts (array vs single command). The Thor::Base::ClassMethods only has the ? variant with a single command argument. This creates confusion about whether the method is a setter, a getter, or a configuration toggle, and inconsistent argument expectations.
  • Inconsistent naming and arity for configuration methods. The Thor class exposes check_unknown_options! and check_unknown_options? with different argument signatures (options vs config). The Thor.Base.ClassMethods module duplicates this pattern but adds a third variant check_unknown_options() with no suffix and no arguments, creating three distinct ways to configure the same behavior across two different scopes (module vs class method).
  • Inconsistent naming and arity for strict args position configuration. Thor has strict_args_position!, while Thor::Base::ClassMethods has strict_args_position!, strict_args_position(), and strict_args_position?(config). The presence of three variants in Base with different arities and suffixes is confusing and inconsistent with the Thor module.
  • Inconsistent naming for default type checking configuration. Thor has check_default_type!, while Thor::Base::ClassMethods has both check_default_type! and check_default_type(). The no-suffix version in Base is redundant and inconsistent with the Thor module.
  • Medium: security finding (details withheld)
  • …and 14 more

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

Survey your own repository

rails/thor 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 26 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit cb11e8e87b3cfe6bc9f6d4b092897f0dfda2476d — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-7c1cb6328e11.