norman/friendly_id
68.4
Adequate · 26 September 2026
2.2k
lines of production code
Ruby
primary language
4
measurements over time
What this system is
This system is the FriendlyId gem, a Ruby library that provides slugging and pretty-URL generation for Active Record models. It features a modular addon architecture that allows developers to compose specific functionalities such as scoped uniqueness, history tracking, and sequential slugs. The library includes generators for setup, comprehensive testing, and benchmarks to ensure performance and compatibility across modern Rails versions.
Features
Added generator for FriendlyId slugs and initializer
A new Rails generator has been introduced to streamline the setup of the FriendlyId History addon. Running this generator creates a migration file to add the \friendly\_id\_slugs\ table and an initializer configuration file. Users can now opt out of generating either component by passing the \--skip-migration\ or \--skip-initializer\ flags, providing flexibility in how the gem is integrated into an existing application.
lib/generators · high confidence
Removals
Removal of friendly\_id Rake task template
The placeholder Rake task file for friendly\_id has been removed from the project. Users will no longer have access to the default 'friendly\_id' rake task template provided in this location.
tasks · high confidence
Removed legacy FriendlyId migration generator
The legacy \FriendlyIdMigrationGenerator\ and its associated \create\_slugs\ migration template have been removed. This eliminates the ability to generate the old-style slugs table structure (which included \updated\_at\ and lacked \sequence\/\scope\ fields) via the generator, aligning the codebase with the updated slug schema and modern Rails conventions.
generators · high confidence
Architecture
Refactored FriendlyId into modular addons and removed legacy slug model
The library has been restructured from a monolithic implementation into a modular architecture using distinct addons (such as Slugged, Finders, History, and Scoped) loaded via autoloading. The legacy \lib/slug.rb\ ActiveRecord model, which previously handled slug storage and normalization, has been removed in favor of a new internal \FriendlyId::Slug\ class and a centralized \Configuration\ system. This change isolates feature behaviors per model instance, preventing global monkey-patching conflicts and allowing developers to compose specific functionalities (like reserved words or sequential slugs) rather than relying on the older \has\_friendly\_id\ options.
lib · high confidence
Behavioural changes
FriendlyId 5.6.0 release with Ruby 2.7+ requirement and slug generation fixes
This release updates the gem to version 5.6.0, raising the minimum Ruby version requirement to 2.7.0. It introduces new \FriendlyId.friendly\_id?\ and \FriendlyId.unfriendly\_id?\ methods for checking slug status. Several bugs are fixed: leading-zero slugs are now treated as numeric conflicts, sequential slugs no longer repeat when separators contain regexp metacharacters, and the Babosa transliteration example has been corrected to use the \:transliterate\ option. The changelog and documentation have been updated to reflect these changes.
(repo-wide) · high confidence
FriendlyId 6.0.0 release with new addon architecture and scoped slugs
This release introduces a modular addon system where features like slugging, history, and reserved words are loaded via the \:use\ option in \friendly\_id\, replacing the previous monolithic approach. The \:scoped\ addon now allows generating unique slugs within specific scopes (e.g., per category), and the \:history\ addon automatically tracks slug changes to prevent broken links. Finders are now opt-in via the \:finders\ addon to maintain compatibility with standard Rails behavior, and the library supports sequential slugs with configurable separators and UUID fallbacks for conflicts.
_lib/friendly\id · high confidence
Test coverage
Added benchmarks for finders and object utilities; Comprehensive test suite for FriendlyId core and addons; Removed legacy test fixtures for Post and Slug models.
Dependencies
Add support for Rails 6.0 through 8.1
The gemfiles directory now includes dedicated configuration files for Rails versions 6.0, 6.1, 7.0, 7.1, 7.2, 8.0, and 8.1. This allows the library to be tested and used with these specific Rails versions, ensuring compatibility across a wide range of modern Rails releases. Each gemfile specifies the corresponding activerecord and railties versions, along with database adapters for development and testing environments.
gemfiles · high confidence
Initial gemspec and Gemfile setup for FriendlyId
The project introduces a standard Ruby gem structure with a new \Gemfile\ and \friendly\_id.gemspec\. The gemspec defines FriendlyId as a slugging and pretty-URL plugin for Active Record, requiring Ruby \>= 2.7.0 and ActiveRecord \>= 4.0.0 as a runtime dependency. Development dependencies include testing and documentation tools such as minitest (\~\> 5.3), mocha (\~\> 2.1), yard, simplecov, and ffaker, alongside railties (\>= 4.0) for integration testing.
(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
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 46 → 68 (+22.7)
- Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (-0.3)
- Architecture 94 → 98 (+3.4)
- Maturity 59 → 56 (-2.7)
- Readiness 29 → 69 (+40.1)
- Security 45 → 76 (+30.8)
- Domain Modelling 100 (new)
Resolved (10)
- Coverage not measured — test suite did not build
- Dimension evaluation failed
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- No exposed public API
- No tests found
- Test reliability not included
New (13)
- Confusing overlap between Base.friendly_id (configuration DSL) and Model.friendly_id (instance accessor). The naming is identical but the context (class-level DSL vs instance-level data) is different, which can lead to confusion for users calling model.friendly_id expecting configuration or vice versa.
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Inconsistent naming and scope between base FinderMethods and History FinderMethods. The base module has find_by_friendly_id (and likely exists_by_friendly_id? implied or missing from the snippet but present in History), while History explicitly exposes exists_by_friendly_id?. If find_by_friendly_id exists in both, it's a duplicate. If only History has the existence check, the API is inconsistent regarding which module owns which finder logic.
- Medium: security finding (details withheld)
- Off-boarding risk: anonymized user #1
- Orphaned files with no living knowledge
- PR-triggered workflow without a permissions block
- Severe duplication of utility methods across multiple modules. FriendlyId module exposes class methods that delegate to or duplicate logic found in ObjectUtils and UnfriendlyUtils. Furthermore, ObjectUtils and UnfriendlyUtils appear to expose identical method signatures (friendly_id? and unfriendly_id?) with no clear distinction in their public API surface provided, suggesting redundant implementation or confusing naming (e.g., why does UnfriendlyUtils have a friendly_id? method?).
- TodoComment (test/schema.rb)
Changes since last survey
- 9 commits — 6 feature/other, 3 fixes
By area
- lib/friendly_id — 4 commits
- (root) — 3 commits
- .github/workflows — 1 commit
- test/helper.rb — 1 commit
Notable commits
- fix: Fix sequential slugs repeating on a metacharacter separator (#1054)
- fix: Fix uninitialized Logger constant error on Ruby 2.7 (#1047)
- fix: Fix up transliteration documentation. (#1027)
- change: Add FriendlyId.friendly_id? and .unfriendly_id? (#1051)
- change: Add dependent option to initializer (#1028)
- change: Test the documented Babosa transliteration recipe (#1050)
- change: Treat leading-zero slugs as numeric conflicts (#1046)
- change: Update CI test matrix (#1048)
- change: Use database services in CI (#1055)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
norman/friendly_id 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 26 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 4699c9791db955dfa9929af0f38a4059af550026 — 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-d0929f7ac71f.