heartcombo/responders
62.0
Adequate · 19 September 2026
918
lines of production code
Ruby
primary language
1
measurement over time
What this system is
This system is the Responders library for Ruby on Rails, which provides a set of responders to simplify controller response handling. It offers configurable HTTP status codes for errors and redirects, automatic flash message management, and HTTP caching support. The library includes generators for scaffolding controllers and supports 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+. Significant changes included introducing configurable HTTP status codes for errors and redirects, and enhancing the install generator to scaffold a new default ApplicationResponder with customizable flash behavior. Comprehensive test coverage was added to verify these new responder features and multi-version compatibility.
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 through 8.1 and main branch
New Gemfile variants have been added to the gemfiles directory to enable testing and usage against specific Rails versions. These include dedicated files for Rails 7.0, 7.1, 7.2, 8.0, and 8.1, pinning activemodel and railties to their respective minor versions, as well as a Gemfile-rails-main that pulls activemodel and railties directly from the rails/rails repository's main branch.
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 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 62.
Lenses
- Code Health 100
- Architecture 69
- Maturity 55
- Readiness 63
- Security 67
Changes since last survey
- 300 commits — 280 feature/other, 20 fixes
By area
- (root) — 151 commits
- (repo) — 70 commits
- lib/action_controller — 15 commits
- lib/responders — 12 commits
- .github/workflows — 11 commits
- test/action_controller — 11 commits
- lib/generators — 10 commits
- test/test_helper.rb — 6 commits
- lib/responders.rb — 3 commits
- gemfiles/Gemfile-rails.6.0.x — 2 commits
- test/support — 2 commits
- .github/code-scanning.yml — 1 commit
- gemfiles/Gemfile-rails-5-0 — 1 commit
- gemfiles/Gemfile-rails-7-0 — 1 commit
- gemfiles/Gemfile-rails-main — 1 commit
- gemfiles/Gemfile-rails.5.0.x — 1 commit
- test/flash_responder_test.rb — 1 commit
- test/views — 1 commit
Notable commits
- fix: Fix build status badge [ci skip]
- fix: Fix deprecation warning with new Errors object in Rails 6.1
- fix: Fix example url
- fix: Fix link to old Rails 3 blog post (#247)
- fix: Fix minitest warnings
- fix: Fix rendering in Rails 5 API controllers.
- fix: Fix rubocop configuration
- fix: Fix syntax error in case the responder is explicitly included.
- fix: Fix test added in #234
- fix: Fix/silence warnings from rake test output.
- fix: Fixes redirect_status config
- fix: Merge pull request #111 from ests/syntax-error-fix
- fix: Merge pull request #201 from plataformatec/revert-197-rails_6_undefined_local_variable_or_method_mimes_for_respond_to
- fix: Merge pull request #220 from marco-nicola/fix-typo-in-respond_with-documentation
- fix: Merge pull request #236 from excid3/fix-redirect-status-config
- fix: Merge pull request #256 from Shopify/fix-renderers-public-api
- fix: Revert "Allow rails 6"
- fix: Update dependencies to Rails 4.1 and fix failures
- fix: fix small application_ instead app_
- fix: fix translation-missing in rails 4
- …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
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 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 615011b9354f7e3ccaeb8b94e15c58828d980fbe — 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.