ryanb/letter_opener
54.7
Adequate · 28 September 2026
176
lines of production code
Ruby
primary language
2
measurements over time
What this system is
This system is the Letter Opener gem, a development tool for Rails applications that intercepts outgoing emails and displays them in the browser. It provides a configurable API to customize email preview rendering, including support for rich and plain text parts, attachment handling, and UTF-8 encoding. The system integrates with the Rails environment by cleaning up temporary preview files and supports modern Ruby versions with updated dependencies.
Behavioural changes
Integrate Letter Opener cleanup with Rails tmp:clear task
The gem now registers a Rake task that automatically deletes files in the tmp/letter\_opener directory when the standard Rails tmp:clear task is executed. This ensures that temporary email preview files generated by Letter Opener are cleaned up alongside other temporary application data, preventing disk space accumulation from stale preview files.
_lib/letter\opener/tasks · high confidence
Introduction of configuration API and removal of legacy view template
The library now exposes a configuration API, allowing users to customize behavior via \LetterOpener.configure\ and \LetterOpener.configuration\, with lazy loading for core components like \Message\, \DeliveryMethod\, and \Configuration\. Additionally, the legacy \index.html.erb\ view template has been removed, indicating a shift in how email previews are rendered or managed within the application.
lib · high confidence
Letter Opener 1.10.0: Ruby 3.0+ only, Launchy 3.0+ support, and file URI scheme configuration
This release updates Letter Opener to require Ruby 3.0+ (dropping support for Ruby 2 and earlier) and allows Launchy 3.0+. It introduces a new \file\_uri\_scheme\ configuration option, allowing users to customize the file URI scheme used to open emails (useful for environments like WSL), and removes the \nkf\ gem dependency. Additionally, it includes fixes for attachment filename sanitization to preserve non-ASCII characters and ensures mail subjects are correctly converted to UTF-8.
(repo-wide) · high confidence
Refactored email rendering into a dedicated Message class with configurable templates
The email preview rendering logic has been extracted from the delivery method into a new \LetterOpener::Message\ class, which handles generating HTML files for rich and plain text parts, sanitizing attachment filenames, and managing inline image URLs. This change introduces a \message\_template\ configuration option (defaulting to 'default', with a 'light' variant also provided) that allows users to customize the appearance of the preview page. The \DeliveryMethod\ now delegates rendering to this class and validates SMTP envelope addresses before opening the preview in the browser.
_lib/letter\opener · high confidence
Test coverage
Added comprehensive test coverage for LetterOpener message parsing and delivery; Updated spec helper configuration.
Dependencies
Update letter\_opener to 1.10.0 with Ruby 3.1+ support and dependency upgrades
The letter\_opener gem has been updated to version 1.10.0, adding support for Ruby 3.1 and later by conditionally requiring the \net-imap\, \net-pop\, and \net-smtp\ gems in the Gemfile. The \launchy\ dependency has been loosened to allow versions 2.2 through 3.x, and development dependencies for \rspec\ and \mail\ have been upgraded. Additionally, the gem source URL has been switched to HTTPS, and metadata such as license and issue tracker URIs have been added to the gemspec.
(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 58 → 55 (-3.4)
- 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 42 → 42 (+0.0)
- Readiness 62 → 65 (+2.7)
- Security 98 → 98 (+0.6)
- Accessibility 56 (new)
Resolved (3)
- Documentation: no contributor guidance (README.md)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
New (2)
- Ambiguous distinction between getter and setter. In Ruby conventions, configuration typically implies a getter (reading the config object), while configure often implies a setter or a block-based configuration method. However, without seeing the implementation, it is unclear if configuration() returns the config and configure() sets it, or if they are redundant aliases for the same operation. This naming collision creates confusion about intent.
- Semantic overlap. In email contexts, 'from' and 'sender' are often used interchangeably, though technically 'sender' can differ from 'from' in RFC 5322 (e.g., in case of mailing lists or bounces). However, for a library like LetterOpener which is primarily for viewing/debugging, exposing both without clear distinction suggests redundancy. If they return the same value, one is unnecessary.
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
ryanb/letter_opener 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 4d1b6acbc95ed30fd775899c53bd02d9624c6564 — 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.