cypriss/mutations
58.4
Adequate · 19 September 2026
972
lines of production code
Ruby
primary language
1
measurement over time
What this system is
Mutations is a Ruby gem designed to compose business logic by sanitizing and validating input for Rails applications. It provides a comprehensive suite of input filters for various data types, including strings, numbers, dates, files, and custom objects, along with configurable error handling and validation rules. The system structures execution outcomes and supports extensibility through custom filter registration and inheritance.
Features
Initial release of Mutations gem with comprehensive changelog and documentation
This release introduces the Mutations gem, a library for composing business logic into commands that sanitize and validate input for Ruby and Rails applications. The package includes a full changelog documenting features from v0.5.10 through v0.9.2, such as various input filters (string, integer, date, time, symbol, array, hash, model, duck, file), options like \empty\_is\_nil\ and \discard\_empty\, and support for Ruby 2.1+. It also provides an MIT license, a Rakefile for testing, and updated README documentation with installation instructions and usage examples.
(repo-wide) · high confidence
Behavioural changes
Expanded input filtering and configurable error handling
The library now supports a broader range of input types through new filters for dates, times, files, symbols, floats, and duck-typed objects, alongside existing string, integer, boolean, model, array, and hash filters. This expansion is enabled by adding dependencies on ActiveSupport and the Date/Time/BigDecimal standard libraries. Additionally, users can now customize error message generation by injecting a custom error message creator via the new \error\_message\_creator\ accessor, and the library enables constant caching by default to improve performance.
lib · high confidence
New date, time, file, symbol, and duck-type filters with improved error handling and array validation
The library introduces several new input filters: DateFilter and TimeFilter for parsing and validating dates and times (with range checks), FileFilter for validating uploaded files (with size limits), SymbolFilter for restricting values to specific symbols, and DuckFilter for validating that objects respond to specific methods. Existing filters have been updated: BooleanFilter and IntegerFilter now check for the Integer class instead of the deprecated Fixnum, and StringFilter now supports min/max length, control character stripping, and an empty\_is\_nil option. ArrayFilter now supports min\_length and max\_length constraints and allows custom filters to be registered via the new AdditionalFilter base class. The Command class now exposes raw\_inputs, validates without executing via a new validate method, and returns a structured Outcome object containing the filtered inputs. Error reporting has been overhauled to use a DefaultErrorMessageCreator for full-sentence messages and ErrorAtom/ErrorHash structures, replacing the previous HashWithIndifferentAccess-based errors.
lib/mutations · high confidence
Test coverage
Comprehensive test coverage for input filters and commands
Added extensive test suites for the core input filtering system, including \AdditionalFilter\, \ArrayFilter\, \BooleanFilter\, \DateFilter\, \DuckFilter\, \FileFilter\, \FloatFilter\, \HashFilter\, \IntegerFilter\, \ModelFilter\, \StringFilter\, \SymbolFilter\, and \TimeFilter\. These tests validate type coercion, validation rules (such as \min\/\max\, \in\, \nils\, \empty\_is\_nil\), and error handling. Additionally, tests were added for \Command\ execution flows, including custom validation methods, error reporting structures, and inheritance behavior.
spec · high confidence
Dependencies
Adopts gemspec for dependency management
The project now manages its dependencies through the newly created mutations.gemspec file instead of the previous Gemfile. This change consolidates the runtime dependency on activesupport and development dependencies (minitest, rake) into the gemspec, removes the explicit minitest version constraint from the Gemfile, and deletes the Gemfile.lock to allow for more flexible testing across different Ruby versions and VMs.
(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 58.
Lenses
- Code Health 92
- Architecture 69
- Maturity 44
- Readiness 62
- Security 99
Changes since last survey
- 272 commits — 256 feature/other, 16 fixes
By area
- lib/mutations — 104 commits
- (root) — 81 commits
- (repo) — 54 commits
- spec/array_filter_spec.rb — 8 commits
- spec/command_spec.rb — 5 commits
- spec/date_filter_spec.rb — 3 commits
- spec/errors_spec.rb — 3 commits
- spec/string_filter_spec.rb — 3 commits
- .github/workflows — 2 commits
- spec/inheritance_spec.rb — 2 commits
- lib/mutations.rb — 1 commit
- spec/boolean_filter_spec.rb — 1 commit
- spec/default_spec.rb — 1 commit
- spec/hash_filter_spec.rb — 1 commit
- spec/mutations_spec.rb — 1 commit
- spec/spec_helper.rb — 1 commit
- spec/symbol_filter_spec.rb — 1 commit
Notable commits
- fix: Bug fix: merging empty errors shouldn't make the command invalid
- fix: Fix Rubinius build. Update Rubinius label in .travis.yml. Remove Gemfile.lock to allow testing with different VMs. Add .ruby-version to .gitignore
- fix: Fix bug related to stripping whitespace on empty params.
- fix: Fix readme
- fix: Fix readme. iterative
- fix: Fix readme. iterative
- fix: Fix readme. iterative
- fix: Fix some MD
- fix: Fix tests on 1.8.7 :(
- fix: Fix warnings caused by redefining ErrorfulCommand
- fix: Merge pull request #108 from olleolleolle/fix/avoid-warnings-in-specs
- fix: Merge pull request #98 from cypriss/patrickod/fix-1.9.3-build-bump-bundler-version
- fix: Revert "Allow the specification of general hashes". I want to implement it in a different way that lets me specific wildcard keys using more filters.
- fix: Revert "Revert "Titleize id as ID in error messages""
- fix: Revert "Titleize id as ID in error messages"
- fix: make a note of a bug
- change: 1. Document options for date filter 2. Allow coercion of things that respond to to_date
- change: 422 status
- change: Ability to inject yer dependencies for errors
- change: Ability to validate inputs without running execute
- …and 252 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
cypriss/mutations 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 475d011463a48075a01081bf26f632d1fc681652 — 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-b51f968c9b10.