AaronLasseigne/active_interaction
66.6
Adequate · 19 September 2026
2k
lines of production code
Ruby
primary language
1
measurement over time
What this system is
This system is the ActiveInteraction Ruby gem, a library designed to define and execute structured interactions with explicit input validation and filtering. It provides a modular architecture for processing complex inputs, including nested arrays and hashes, while supporting type coercion, error handling, and integration with ActiveModel and ActiveRecord. The codebase focuses on maintaining compatibility across a wide range of Rails versions and ensuring robust test coverage for its diverse filter and input types.
How it got here
2013 — Input and filter architecture overhaul
11 changes.
The project underwent a major structural refactoring of its input and filter systems, replacing the previous caster and filter concepts with a new modular Input and Filter architecture. This period involved extensive development of new abstract base classes, expanded type support, and comprehensive test coverage to validate the new processing logic and error handling mechanisms.
2014–2022 — Core refactoring and test expansion
5 changes.
The project focused on restructuring its internal architecture by extracting core logic into modular concerns and refining filter error handling with dedicated classes. This period also involved significantly expanding test coverage for these new components and broading the compatibility matrix to support Rails versions up to 8.1.
Features
Added executable bin scripts for interactive console and environment setup
The project now includes two new executable scripts in the bin directory to streamline developer workflows. The bin/console script provides an interactive Ruby IRB session pre-loaded with the Bundler environment and the active\_interaction library, allowing for immediate code experimentation. The bin/setup script automates the initial environment configuration by running bundle install with strict error handling, ensuring dependencies are correctly installed before use.
bin · high confidence
New validation module for processing input filters
A new \ActiveInteraction::Validation\ module has been added to \lib/active\_interaction/modules/validation.rb\. This module provides a \validate\ method that iterates through defined input filters, processes the corresponding inputs using the interaction's context, and aggregates any resulting errors into a structured list of error details (name, type, and options).
_lib/active\interaction/modules · high confidence
Architecture
Refactor core logic into reusable concerns
The library's internal structure has been reorganized by extracting key functionalities into dedicated concerns: \Runnable\ now encapsulates the execution flow (run, run!, compose, and callbacks), \ActiveModelable\ provides minimal ActiveModel integration (validations, naming, and persistence stubs), \ActiveRecordable\ adds attribute introspection methods (has\_attribute?, column\_for\_attribute), \Hashable\ handles hash method delegation, and \Missable\ manages method\_missing for filter access. This change improves code modularity and maintainability without altering the public API surface.
_lib/active\interaction/concerns · high confidence
Behavioural changes
ActiveInteraction v2.2.0: Major API overhaul with new Input/Filter architecture
This release introduces a significant structural change to the library, replacing the previous 'caster' and 'filter' concepts with a new 'Input' and 'Filter' system. The main entry point now explicitly requires a comprehensive set of new components, including \GroupedInput\, \Input\, \ArrayInput\, \HashInput\, and \Inputs\, alongside a reorganized filter hierarchy (e.g., \AbstractDateTimeFilter\, \AbstractNumericFilter\, \InterfaceFilter\, \ObjectFilter\, \RecordFilter\). The library also integrates \ActiveModel\ and \ActiveSupport\ core extensions, adds i18n support by loading locale files, and introduces new concerns like \ActiveModelable\, \ActiveRecordable\, \Hashable\, \Missable\, and \Runnable\. This represents a breaking change in how interactions are defined and validated, moving towards a more explicit and modular input processing model.
lib · high confidence
ActiveInteraction v5.5.0 release
The library has been updated to version 5.5.0. This release introduces a new input processing architecture, including dedicated \ArrayInput\ and \HashInput\ classes to handle nested structures and improve error reporting for arrays and hashes. It also adds an \Inputs\#given?\ method to check if specific inputs (including nested keys and array indices) were provided, and enhances the \Errors\ class to support merging detailed error information from other sources.
_lib/active\interaction · high confidence
Refactor filter error handling and column type abstraction
The filter module now uses a dedicated \ActiveInteraction::Filter::Column\ class to represent database column types (e.g., integer, float, string) with an interned caching mechanism, replacing the previous implicit handling. Additionally, validation errors are now unified under a new \ActiveInteraction::Filter::Error\ class, which supports specific error types like \:invalid\_type\ and \:missing\ for better error message localization and structured error reporting.
_lib/active\interaction/filter · high confidence
Refactored filter architecture with new abstract base classes and expanded type support
The filter system has been restructured to improve code reuse and type handling. Abstract base classes, AbstractDateTimeFilter and AbstractNumericFilter, now centralize conversion logic for date/time and numeric types respectively. This enables new capabilities such as implicit string-to-integer conversion (respecting a configurable base), implicit string-to-float conversion, and implicit string-to-decimal conversion. Date and time filters now support GroupedInput objects (e.g., multi-part date inputs) and automatically use Time.zone when available for time zone awareness. The ArrayFilter now supports nested sub-filters with optional indexed error reporting, and the HashFilter allows nested filters with configurable key stripping. New filters include InterfaceFilter (validating against classes/modules or method sets) and SymbolFilter (converting strings to symbols). Additionally, the RecordFilter now treats blank strings as nil, and the FileFilter has been generalized to accept any object responding to \#rewind.
_lib/active\interaction/filters · high confidence
Standardize development environment with EditorConfig, RuboCop, and RSpec configurations
The project now enforces consistent code style and development workflows by introducing \.editorconfig\ (Unix-style line endings, 2-space indentation for Ruby), \.rubocop.yml\ (targeting Ruby 2.7, enforcing specific layout and style rules, excluding vendor/tmp), \.rspec\ (enabling color and randomized test order), and \.gitattributes\ (auto-detecting text files). A \Rakefile\ update adds default tasks for running RSpec specs and RuboCop checks, ensuring style compliance before submission.
(repo-wide) · high confidence
Test coverage
Added comprehensive test coverage for all filter types; Added comprehensive test coverage for input processing and error handling; Added integration tests for input types; Added shared test support for filters and interactions; Added test coverage for interaction concerns; Expanded test matrix for Rails 5.2 through 8.1; Initialize RSpec test suite with shared configuration.
Dependencies
Modernizes gemspec and updates dependencies for Rails 5.2–8 and Ruby 2.7+
The gemspec has been rewritten to explicitly declare runtime dependencies on activemodel and activesupport (versions \>= 5.2 and \< 9), replacing the previous implicit gemspec-based dependency resolution. Development dependencies have been updated to include rubocop 1.68.0, rspec 3.5, kramdown 2.1, and rake 13.0, while dropping support for Ruby versions below 2.7 and Rails versions below 5.2. The gem now also includes metadata for homepage, source code, and changelog URIs, and explicitly lists required files.
(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
Baseline
- First survey — no prior run to compare against. CAI 67.
Lenses
- Code Health 100
- Architecture 100
- Maturity 49
- Readiness 65
- Security 100
Changes since last survey
- 300 commits — 257 feature/other, 43 fixes
By area
- (root) — 137 commits
- lib/active_interaction — 92 commits
- spec/active_interaction — 32 commits
- (repo) — 22 commits
- .github/workflows — 12 commits
- lib/active_interaction.rb — 2 commits
- bin/console — 1 commit
- gemfiles/rails-5.2.gemfile — 1 commit
- spec/spec_helper.rb — 1 commit
Notable commits
- fix: Fix errors on callbacks #486
- fix: Fix how to upgrade #predicate-methods in CHANGELOG 4.0.0
- fix: Fix string strip documentation
- fix: Merge pull request #536 from spencersteiner/fix-compose-inputs
- fix: TEST: Fix error "undefined method `silence_warnings'"
- fix: adding a changelog entry for the prior bug fix
- fix: fix #411 by always setting the result
- fix: fix #435, allow for the :message option when adding an error
- fix: fix #457 by making sure merged errors happen before executing the after callback
- fix: fix #479 by improving composed error backtraces and bump to 3.8.2
- fix: fix #480 by treating nils as non-values (as they should be)
- fix: fix #493 by allowing Inputs as a param to compose
- fix: fix #495 by respecting time zones
- fix: fix #499 by recognizing multi-part date inputs
- fix: fix #505 by allowing the :methods option to be used in a nested filter
- fix: fix #511 by making sure we set the class when options are passed and :class is not one of them
- fix: fix #537 by correcting nested array values
- fix: fix #539 by not caching defaults
- fix: fix #553 by implementing a better error and updating the README
- fix: fix changelog
- …and 280 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
AaronLasseigne/active_interaction 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 19 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 97667c8283a4479c7ffc021be31f168d17b20b72 — 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-13a154b7f5d1.