Skip to content
CAI
Software that uses CAICheck a score

brendon/acts_as_list

58.9

Adequate · 6 November 2026

813

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 the acts\_as\_list Ruby gem, which provides functionality for sorting and reordering objects within a list. It manages list positioning through configurable scopes, supports various insertion strategies like top or bottom addition, and handles complex scenarios such as composite foreign keys and zero-based indexing. The library is designed for integration with ActiveRecord, offering callbacks and configuration options to control update behaviors and ensure compatibility with modern Rails versions.

Behavioural changes

Acts As List gem initialization and documentation overhaul

The gem's initialization has been updated to use \frozen\_string\_literal: true\ and explicitly load the library via \require "acts\_as\_list"\ instead of directly including the module. The legacy \README\ file has been replaced with a comprehensive \README.md\ that documents installation, usage examples, instance methods, scoping options, and configuration settings. Additionally, a \CHANGELOG.md\ has been introduced to track version history, and a \.gemtest\ file has been added to support gem testing workflows.

(repo-wide) · high confidence

Refactor acts\_as\_list into modular components

The library's internal structure has been reorganized to improve maintainability and load efficiency. The monolithic \lib/list.rb\ file, which previously contained all class and instance methods for the \acts\_as\_list\ extension, has been removed and replaced by \lib/acts\_as\_list.rb\. This new entry point requires a set of specialized modules (such as \position\_column\_method\_definer\, \scope\_method\_definer\, and \callback\_definer\) that break the functionality into smaller, focused components. This change supports lazy loading via \ActiveSupport.on\_load\ and allows for more granular control over which parts of the list functionality are loaded, while preserving the existing public API for sorting and reordering objects.

lib · high confidence

Refactored acts\_as\_list into modular definers and modernized ActiveRecord integration

The acts\_as\_list implementation has been restructured to use dedicated module definers (for callbacks, scope, position columns, and configuration) instead of a single monolithic file, improving maintainability. The library now hooks into ActiveRecord via ActiveSupport.on\_load and uses with\_connection for database access, ensuring compatibility with modern Rails versions. Key behavioral updates include exposing configuration via a class-level acts\_as\_list\_options method, adding a public current\_position instance method, and refining scope-change detection to correctly handle array-based scopes and composite foreign keys. The no\_update feature now supports nested blocks and allows specifying additional classes to exclude from updates.

_lib/acts\_as\_list/active\record · high confidence

Test coverage

Migrated test suite to Minitest with shared test modules

The test suite has been refactored from Test::Unit to Minitest, introducing a centralized test helper and a suite of shared modules (List, ListSub, ZeroBased, ArrayScopeList, TopAddition, NoAddition, Quoting) to reduce duplication across test cases. This change also adds comprehensive coverage for new and existing features, including array-based scopes, zero-based positioning, top/bottom insertion options, no-update blocks, composite foreign keys, and default scope interactions.

test · high confidence

Dependencies

ActsAsList gem version updated to 1.2.6

The acts\_as\_list gem has been updated to version 1.2.6. This release includes the addition of the frozen\_string\_literal pragma to Ruby files to improve performance and memory usage.

_lib/acts\_as\list · high confidence

Updated dependencies for Ruby 3.4+ and Rails 7.2+ compatibility

The gem now explicitly requires external gems that were removed from Ruby's default gems in versions 3.3 and 3.4 (base64, benchmark, bigdecimal, logger, mutex\_m) to prevent runtime errors. It also pins the mysql2 gem to version 0.5.6 and conditionally selects the sqlite3 gem version (1.7.3 for older Rails, 2.7.3 for Rails 7.2+) to ensure compatibility with modern Rails versions. The gemspec has been updated to require ActiveRecord and ActiveSupport versions 6.1 or higher.

(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.1)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 74 → 74 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 43 → 43 (+0.0)
  • Readiness 74 → 74 (+0.0)
  • Security 96 → 95 (-1.7)

Resolved (1)

  • Inconsistent naming convention for boolean predicates. Most methods use the ? suffix (e.g., first?, last?, in_list?), but default_position? is inconsistent with the likely intent of default_position being a value accessor, or if it is a predicate, it breaks the pattern of has_default_position?. More critically, not_in_list? is a double-negative pattern compared to in_list?, which is generally discouraged in favor of positive assertions or clear negation methods like out_of_list? or relying on !in_list?.

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

Survey your own repository

brendon/acts_as_list 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 d20179cf785e1aec1fbdedbbd7339afe956eec09 — 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.