thoughtbot/high_voltage
69.6
Adequate · 28 September 2026
247
lines of production code
Ruby
primary language
2
measurements over time
What this system is
HighVoltage is a Ruby gem that enables Rails applications to serve static pages from a dedicated content directory. It provides a configurable controller and routing system that maps page IDs to view templates, supporting both standard nested paths and root-level URLs. The system includes security validations to prevent path traversal and ensures that only existing templates are rendered.
How it got here
2009 — Rails 3 compatibility and library restructuring
7 changes.
The project underwent a significant structural overhaul to support Rails 3, migrating the routing DSL and replacing the legacy test suite with RSpec. This period established the foundational library architecture by introducing the HighVoltage::PagesController and configuration loading mechanisms, while removing obsolete controllers, rake tasks, and placeholder files.
2010–2012 — HighVoltage 5.0 architecture and testing
9 changes.
This period focused on the HighVoltage 5.0.0 release, which introduced a new configuration module, page finding architecture, and support for root-level static page routes. A comprehensive test suite was developed to verify the new controller logic, routing behavior, and security constraints, ensuring robust validation of page existence and path handling.
2013–2023 — Rails compatibility and test infrastructure
5 changes.
The project focused on enhancing test coverage by extracting static page rendering logic into a reusable concern and establishing comprehensive request and feature specs. It also expanded support for modern Rails versions (7.0 through 8.0) and introduced an automated environment setup script to streamline dependency installation.
Features
Add support for root-level static page routes
HighVoltage now supports serving static pages directly from the root domain (e.g., /about\_us) in addition to the default /pages/:id structure. This is achieved by introducing a new 'Root' route drawer that maps root-level paths to the pages controller, constrained to ensure the corresponding view file exists, alongside the existing 'Default' drawer for the standard /pages/:id pattern.
_lib/high\_voltage/route\drawers · high confidence
Added automated environment setup script
A new \bin/setup\ script has been introduced to streamline the initial project configuration. This script automates the installation of the Bundler gem (version 1.17.3) and ensures dependencies are installed via \bundle install\. It also conditionally runs \appraisal install\ to prepare the environment for testing against multiple Rails versions, but only when not running in a CI environment.
bin · high confidence
Initial library structure and configuration loading
The library now loads its core components (configuration, page handling, route drawing, and versioning) via the main entry point, replacing the previous placeholder file. This establishes the foundational module structure and requires necessary Active Support extensions for the gem to function.
lib · high confidence
Introduce HighVoltage::PagesController for static page serving
A new controller class, HighVoltage::PagesController, has been added to the application. It inherits from ApplicationController and includes the HighVoltage::StaticPage module, providing the core mechanism for rendering static pages within the HighVoltage gem.
_app/controllers/high\voltage · high confidence
Removals
Removal of PagesController
The PagesController has been removed from the application. This controller previously handled dynamic page rendering by locating and displaying templates based on the request ID, including validation to return a 404 status if the template did not exist. Its removal eliminates this specific dynamic page serving capability.
app/controllers · high confidence
Removal of placeholder rake task
The placeholder rake task file (nothing\_to\_see\_here\_move\_along\_tasks.rake) has been removed from the project. This eliminates a stubbed task that was previously available for development but contained no actual implementation logic.
tasks · high confidence
Behavioural changes
Extract static page rendering logic into a reusable concern
The static page rendering behavior previously in the PagesController has been moved into the HighVoltage::StaticPage concern. This module now handles layout assignment, template resolution, and error handling for missing or invalid page IDs, raising a RoutingError when a requested page does not exist. Controllers can now include this concern to gain consistent static page display functionality, including passing the current page object to the view via locals.
app/controllers/concerns · high confidence
High Voltage 5.0.0: Rails 8.0 support and maintenance mode
High Voltage has been updated to version 5.0.0, adding support for Rails 7.2 and 8.0 while removing support for End-of-Life Rails 6.x versions. The project has entered maintenance mode, meaning no new features are being added, but bug fixes and compatibility updates will continue. The test suite has been migrated from Travis CI to GitHub Actions, and the Rakefile now uses RSpec and Appraisal for testing. Documentation has been updated to reflect these changes, including a new SECURITY.md file and updated CONTRIBUTING.md guidelines.
(repo-wide) · high confidence
HighVoltage 5.0.0 release with new configuration and page handling architecture
HighVoltage has been updated to version 5.0.0, introducing a new configuration module that allows users to customize content paths, home pages, layouts, and routing behavior. The release replaces the previous page finding logic with a new PageFinder class that raises InvalidPageIdError for invalid or empty page IDs, and introduces a PageCollector to enumerate valid page IDs from the content directory. The engine now automatically registers the controllers/concerns path and sets a default parent engine, while the Page class validates pages based on file existence, path containment, and supported template handlers.
_lib/high\voltage · high confidence
Modernized routing to support Rails 3 and configurable home page
The gem's routing has been updated to use the Rails 3 \routes.draw\ DSL instead of the deprecated \ActionController::Routing::Routes.draw\. This change introduces a configurable home page via the \HighVoltage.home\_page\ setting, which automatically maps the specified path to the root and redirects it to the main index. Additionally, the default resource routes for pages are now conditional on the \HighVoltage.routes\ configuration option, allowing users to disable default route generation if they prefer to define their own.
config · high confidence
Root route constraint now validates view existence using Rails lookup paths
The root route constraint has been updated to verify that a corresponding view template exists for the requested path before allowing the route to match. It utilizes Rails' ActionView::LookupContext to search within the configured app/views directory, ensuring that requests to the root path are only served if a valid template is present. This change also handles .html extensions by stripping them during the lookup process, aligning the constraint behavior with standard Rails view resolution.
_lib/high\voltage/constraints · high confidence
Updated supported Rails versions in test matrix
The test matrix has been updated to include support for Rails 7.0, 7.1, 7.2, and 8.0. New gemfiles have been added for each of these versions to ensure compatibility and testing coverage across the latest Rails releases.
gemfiles · high confidence
Test coverage
Added controller specs for HighVoltage pages and subclassed controllers; Added request specs for home page routing; Added routing specification tests for HighVoltage; Added test coverage for HighVoltage configuration, page collection, and page finding; Added test fixtures and feature specs for page rendering; Added test suite and dummy application for HighVoltage; Added tests for RootRoute constraint handling; Removed legacy test suite files.
Dependencies
Update development dependencies to support Rails 7.1 and Ruby 3.1+
The gemspec and lockfile have been updated to require Ruby 3.1 or higher and align development dependencies with Rails 7.1. Key updates include rspec-rails to version 7.1.1, activesupport to 7.1.4, and capybara to 3.40.0, ensuring the test suite runs against the latest supported Rails and Ruby versions.
(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
Score
- CAI 69 → 70 (+0.3)
- Rubric changed (rubric-2026.09.8 → rubric-2026.09.16) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 62 → 62 (+0.0)
- Readiness 77 → 77 (+0.0)
- Security 82 → 86 (+3.6)
Resolved (2)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
New (2)
- Documentation: no architecture or design documentation
- Inconsistent boolean check naming and semantics. Page.valid?() returns a boolean indicating validity, while StaticPage.invalid_page() appears to be a class method that likely returns a boolean or a page object indicating if a page is invalid. The naming convention mixes instance predicate style (valid?) with a class-level negative check (invalid_page), creating confusion about whether the caller should check !page.valid? or call StaticPage.invalid_page?.
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
thoughtbot/high_voltage 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 28 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 97b61482cd012f61442e1c732a6019c6bfe9bb76 — the exact code this score is about.
- Scored under rubric-2026.09.16 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-2d9048c36d26.