ankane/pretender
62.7
Adequate · 6 November 2026
71
lines of production code
Ruby
primary language
4
measurements over time
What this system is
This system is a Ruby gem that enables user impersonation within Rails applications, allowing administrators to act as other users. It provides core logic for switching identities and stopping impersonation, with specific support for Action Cable and Mongoid. The library includes comprehensive test coverage and maintains compatibility with modern Rails and Ruby versions.
Behavioural changes
Refactored impersonation logic for robustness and Action Cable support
The core impersonation mechanism has been rewritten to improve security and compatibility. The library now explicitly checks if the user is logged in before attempting to restore an impersonation session, stopping impersonation if the true user is not authenticated. It also handles Mongoid compatibility by converting resource IDs to strings when necessary. Additionally, the loading pattern has been updated to use ActiveSupport hooks, ensuring the methods are available in both Action Controller and Action Cable contexts.
lib · high confidence
Test coverage
Added integration tests for the impersonation feature; Added test fixtures for user impersonation.
Dependencies
Added CI gemfiles for Rails 7.2 and 8.0 testing
New gemfiles (rails72.gemfile and rails80.gemfile) have been added to the gemfiles directory to enable testing against Rails versions 7.2.0 and 8.0.0 respectively. These files configure the necessary dependencies, including the gemspec, rake, minitest, combustion, sqlite3, and the specific Rails version constraints, allowing the CI pipeline to validate compatibility with these releases.
gemfiles · high confidence
Updated gemspec and Gemfile for Rails 8.1 and Ruby 3.3 compatibility
The gemspec and Gemfile have been updated to require Ruby 3.3+ and ActionPack 7.2+, with the Gemfile now explicitly pinning Rails 8.1.0 for development and testing. Development dependencies like rake, minitest, and combustion have been moved into the Gemfile, and the gemspec has been cleaned up to use require\_relative and specify files more precisely.
(dependencies) · high confidence
Housekeeping
Pretender library version updated to 1.0.0
The Pretender library's version constant has been updated from 0.0.1 to 1.0.0. This change reflects the current release version of the library but does not indicate any specific functional changes, new features, or behavioral modifications within the provided code diff.
lib/pretender · 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 63 → 63 (+0.0)
- 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 51 → 51 (+0.0)
- Readiness 71 → 71 (+0.0)
- Security 100 → 100 (+0.0)
Findings
- No change — the same findings as the prior survey.
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
ankane/pretender 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 8cc0f37ed7acbf0f5fe69130ae27471f0b559db4 — 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.