heartcombo/responders
59.2
Adequate · 6 November 2026
918
lines of production code
Ruby
primary language
4
measurements over time
What this system is
This system is a Ruby gem that provides a responder pattern for Rails controllers, enabling developers to manage HTTP responses, redirects, and flash messages through configurable modules. It offers generators to scaffold controllers with standardized responder logic and supports testing across multiple Rails versions from 7.0 to 8.1.
How it got here
2009 — Version 3.2.1 release and test infrastructure
5 changes.
The Responders library was upgraded to version 3.2.1, introducing new responder modules like CollectionResponder and HttpCacheResponder, along with configurable HTTP status codes. This release was supported by establishing a comprehensive test infrastructure, including mock models and view templates, while repository maintenance standardized code style and documentation.
2010–2021 — Rails 8.1 support and responder configurability
8 changes.
The project updated its dependencies to support Rails 8.1 while maintaining backward compatibility with Rails 7.0+. It introduced configurable HTTP status codes for errors and redirects, along with a new responders-based controller generator that allows for customizable flash behavior. Comprehensive test coverage was added to verify these new features across multiple Rails versions and responder types.
Features
New responders-based controller generator with configurable flash behavior
The \lib/generators/rails\ directory now includes a \RespondersControllerGenerator\ that scaffolds controllers using \respond\_with\ instead of standard \respond\_to\ blocks. This generator produces templates for both HTML (\controller.rb.tt\) and API (\api\_controller.rb.tt\) responses, supporting namespacing and module paths. A key behavioral change is the introduction of a \flash?\ method that conditionally includes flash notices in generated create/update actions based on the application's responder configuration, allowing users to opt out of automatic flash messages if their \ApplicationController\ does not use \FlashResponder\.
lib/generators/rails · high confidence
Responders library updated to version 3.2.1 with new responder modules
The library has been upgraded to version 3.2.1, introducing several new capabilities for Rails controllers. A new \responders\ controller method allows developers to cherry-pick specific responders (like \:flash\ or \:http\_cache\) to include in a controller, rather than applying them globally. The update adds \CollectionResponder\ to automatically redirect to the collection index after POST/PUT/DELETE actions, and \HttpCacheResponder\ to set HTTP Last-Modified headers for caching support. Additionally, \FlashResponder\ now supports \:flash\_now\ options and customizable status keys, enhancing how flash messages are handled for both HTML and JavaScript requests.
lib/responders · high confidence
Behavioural changes
Configurable HTTP status codes for error and redirect responses
The responder module now allows developers to explicitly configure the HTTP status codes used for error responses (defaulting to 422 Unprocessable Entity for validation failures on HTML/JS requests) and redirects (defaulting to 302 Found). This change introduces \error\_status\ and \redirect\_status\ class attributes on the responder, enabling granular control over response semantics without needing to override the entire responder class. Additionally, the \respond\_with\ method now respects the \status\ option provided for error scenarios, whereas previously it was ignored in favor of the default error status.
_lib/action\controller · high confidence
Configurable error and redirect status codes via Railtie
The Responders library now exposes configuration options for HTTP status codes used during error handling and redirects. Users can customize the default error status (defaulting to :ok) and redirect status (defaulting to :found) through the Rails application configuration, allowing for more precise control over HTTP response codes in HTML and JS responses.
lib · high confidence
Updated install generator with new default responder configuration
The responders install generator has been updated to scaffold a new default ApplicationResponder class. This generated responder now includes the HttpCacheResponder and sets specific default status codes for errors (:unprocessable\_entity) and redirects (:see\_other). Additionally, the CollectionResponder is included in the generated code but commented out, allowing users to easily enable redirection to the collection path (index action) for POST/PUT/DELETE requests if desired. The generator also ensures the application uses the responders controller for scaffolds and configures the ApplicationController to use the new responder.
lib/generators/responders · high confidence
Test coverage
Added test coverage for collection, controller method, flash, and HTTP cache responders; Added test support models for Customer and Quiz entities; Added tests for respond\_with behavior in API and standard controllers; Added view templates for responder tests; Establishes test infrastructure with Rails controller testing and mock models.
Dependencies
Add Gemfiles for Rails 7.0, 7.1, 7.2, 8.0, and main branch
New Gemfiles have been added to the gemfiles directory to support testing against specific versions of Rails (7.0, 7.1, 7.2, 8.0) as well as the main development branch. Each file pins activemodel and railties to the corresponding version or source, enabling the project to verify compatibility across these Rails releases.
gemfiles · high confidence
Update to support Rails 8.1 and modernize dependencies
The gem now targets Rails 8.1 for development and testing, with the Gemfile specifying activemodel and railties \~\> 8.1.0. The gemspec continues to require Rails 7.0+ (actionpack and railties \>= 7.0), ensuring backward compatibility while allowing users to test against the latest Rails 8.1 release. Development dependencies have been updated to include rubocop and rubocop-performance for code quality, and the lockfile reflects these changes along with updated transitive dependencies like nokogiri and rack.
(dependencies) · high confidence
Housekeeping
Project maintenance and configuration updates
This change introduces several repository-level maintenance updates: a new .gitignore file to exclude build artifacts and lock files, a comprehensive .rubocop.yml configuration to enforce code style and performance standards, and a new CHANGELOG.md documenting version history. It also adds an MIT-LICENSE file, replaces the old README.rdoc with a new README.md, and updates the Rakefile to use bundler/gem\_tasks and remove the deprecated Jeweler dependency.
(repo-wide) · 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 60 → 59 (-0.7)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 76 → 76 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 50 → 50 (+0.0)
- Readiness 65 → 65 (-0.2)
- Security 80 → 69 (-10.2)
Resolved (2)
- Ambiguous entry point: Both respond and call appear to trigger the response logic. In Ruby/Rails conventions, call is often the standard for objects acting as responders (implementing #call), while respond is more descriptive. Having both suggests redundancy or unclear responsibility.
- Inconsistent method naming for format-specific rendering: Base Responder uses to_html and to_js, but also has to_format. Subclasses use to_html, to_js, and to_format. It is unclear if to_format is a generic fallback or a specific format handler. If to_format is meant to handle arbitrary formats, it conflicts with the explicit to_html/to_js pattern. If it's a specific format, the naming is inconsistent with to_html.
New (4)
- Medium CVE: [GHSA redacted] (Gemfile.lock)
- Outdated: actionpack
- Outdated: activemodel
- Outdated: railties
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
heartcombo/responders 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 eb9b9baac1f8e2d44265e20120bdec45c0890a28 — 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.