Skip to content
CAI
Software that uses CAICheck a score

sporkmonger/addressable

68.9

Adequate · 6 November 2026

9k

lines of production code

Ruby

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add top-level require for addressable library

Users can now call \require 'addressable'\ to load the library, which automatically requires \addressable/uri\ and \addressable/template\. The file also includes the \frozen\_string\_literal\ pragma for performance and safety.

lib · high confidence

Addressable 2.9.0: New IDNA fallback, URI Templates, and frozen string support

This release introduces a pure-Ruby IDNA implementation as a fallback when the native libidn gem is unavailable, ensuring consistent internationalized domain name handling across environments. It adds full support for RFC 6570 URI Templates, allowing users to expand and match templates against URIs via the new Addressable::Template class. The library also updates its core URI parsing and normalization logic to fully support Ruby's frozen string literals, preventing mutation errors in modern Ruby versions, and bumps the version to 2.9.0.

lib/addressable · high confidence

Behavioural changes

Addressable 2.9.0 release and repository restructuring

This release introduces Addressable 2.9.0, which fixes a ReDoS vulnerability in Addressable::Template\#match that remained after the incomplete remediation in version 2.8.10. The repository has been restructured to improve developer experience and security: the license has been updated to Apache 2.0, documentation is now maintained in Markdown (README.md, CHANGELOG.md), and the gemspec generation has been rewritten. Development tooling has been modernized by switching from RCov to SimpleCov for code coverage, adding a .simplecov configuration, and updating the .gitignore to exclude build artifacts like .DS\_Store, vendor/, and Gemfile.lock. The Rakefile has been cleaned up to explicitly list packaged files and remove unnecessary LOAD\_PATH management.

(repo-wide) · high confidence

IDNA implementation refactored with native libidn support and deprecated normalization method

The IDNA module now includes a new native implementation (\lib/addressable/idna/native.rb\) that delegates to the \libidn\ C library for ASCII conversion, utilizing the \ALLOW\_UNASSIGNED\ flag. The pure Ruby implementation (\lib/addressable/idna/pure.rb\) has been updated to use Ruby's built-in \unicode\_normalize(:nfkc)\ instead of legacy custom logic, and the \unicode\_normalize\_kc\ method is now explicitly deprecated in favor of the standard library method.

lib/addressable/idna · high confidence

Rake tasks rewritten for gem packaging, release, and documentation

The build and release workflow has been restructured into a new set of Rake tasks. The \tasks/gem.rake\ file now handles gem specification generation (including metadata like changelog URIs and license info), packaging, and installation, while \tasks/git.rake\ manages the release process by validating version consistency and creating annotated Git tags. Documentation generation has switched to YARD with Markdown support via \tasks/yard.rake\, and test coverage reporting now uses SimpleCov with a browse task via \tasks/rspec.rake\. Additionally, new tasks for memory profiling (\tasks/profile.rake\) and code metrics (\tasks/metrics.rake\) have been added to aid in performance analysis.

tasks · high confidence

Test coverage

Added benchmark scripts for URI normalization performance; Expanded test coverage for IDNA, URI templates, and security edge cases; Standardized test configuration and coverage reporting.

Dependencies

Addressable 2.9.0 release with updated dependencies and Ruby version requirements

This release updates the gemspec to version 2.9.0, raising the minimum required Ruby version to 2.2 and updating the runtime dependency on public\_suffix to allow versions \>= 2.0.2 and \< 8.0. The Gemfile introduces explicit test dependencies (rspec \~\> 3.8, rspec-its \~\> 1.3), coverage tools (coveralls, simplecov), and development dependencies (launchy, yard, memory\_profiler, rake \>= 12.3.3), while conditionally including idn-ruby for MRI platforms unless the IDNA\_MODE environment variable is set to 'pure'.

(dependencies) · high confidence

Support for public\_suffix v7

The gemfiles now include a dedicated configuration for public\_suffix version 7, allowing the library to be used with this newer major version alongside existing support for versions 2 through 6.

gemfiles · 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 64 → 69 (+4.4)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 70 → 68 (-1.9)
  • Architecture 100 → 100 (+0.0)
  • Maturity 50 → 61 (+11.2)
  • Readiness 79 → 79 (+0.0)
  • Security 84 → 81 (-3.2)
  • Performance 90 → 90 (+0.0)

Resolved (9)

  • Duplicate method names with different parameter names, identical to the to_ascii issue above.
  • Duplicate method names with different parameter names, suggesting potential copy-paste errors or lack of refactoring. While Ruby allows parameter name changes, having two methods with the exact same name and arity in the same class is a syntax error in most languages or indicates a severe documentation/API generation artifact. If this is Ruby, it's a redefinition. If it's a static analysis of a generated API, it's a clear redundancy.
  • Duplicate method names with different parameter names. Same issue as above.
  • Duplicate method names with different parameter names. The parameter name value vs unicode suggests the same operation is defined twice, likely due to code duplication or poor API generation.
  • Further sole-owners (lower concentration)
  • IDNA.punycode_encode (cyclomatic 19) (lib/addressable/idna/pure.rb)
  • Inconsistent argument types for merge and merge!. merge takes a hash (key-value pairs) while merge! takes a uri (another URI object). This is a significant semantic inconsistency. Usually, merge and merge! should have the same signature, differing only in mutability. Here, they operate on different data structures.
  • Off-boarding risk: anonymized user #1
  • Two instance methods named join with different arities (one takes multiple URIs, one takes a single URI). While Ruby supports method overloading via arity, this is often confusing for users expecting consistent behavior. More critically, URI.join is also a class method (static) in many URI libraries, but here it appears as an instance method. If URI.join(uris) is intended to be a class method (static) and uri.join(other) is an instance method, the signature listing is ambiguous. However, looking at the list, URI.join(uris) is listed under type Addressable.URI which usually implies instance methods in this format, but URI.parse is also there. If join is both a class and instance method, the signature list is incomplete or misleading. Assuming these are both instance methods, having two join methods is an inconsistency in naming convention (singular vs plural argument implying different semantics).

New (10)

  • FileTooLong: addressable/template.rb (lib/addressable/template.rb)
  • Hotspot: lib/addressable/uri.rb (lib/addressable/uri.rb)
  • Template.transform_partial_capture (cognitive 18) (lib/addressable/template.rb)
  • TooManyMethods: Template (lib/addressable/template.rb)
  • URI.normalize_component (cognitive 22) (lib/addressable/uri.rb)
  • URI.normalize_path (cognitive 27) (lib/addressable/uri.rb)
  • URI.origin= (cognitive 18) (lib/addressable/uri.rb)
  • URI.relative_path_from (cognitive 16) (lib/addressable/uri.rb)
  • URI.relative_path_from (cyclomatic 16) (lib/addressable/uri.rb)
  • URI.route_from (cyclomatic 18) (lib/addressable/uri.rb)

Changes since last survey

  • 85 commits — 83 feature/other, 2 fixes

By area

  • (root) — 43 commits
  • lib/addressable — 25 commits
  • .github/workflows — 8 commits
  • spec/addressable — 8 commits
  • .github/dependabot.yml — 1 commit

Notable commits

  • fix: Fix route_from when only the base URI has a query (#623)
  • fix: Revert multi-variable + and # template matching changes
  • change: Add AGENTS.md and SECURITY.md (#629)
  • change: Add changelog entry for malformed Punycode labels
  • change: Add changelog entry for routes to colon segments
  • change: Add specs and a changelog entry for Punycode digits (#644)
  • change: Add specs and a changelog entry for URI cache invalidation (#640)
  • change: Add specs and a changelog entry for URI#clone (#643)
  • change: Add specs and a changelog entry for assigning origins (#662)
  • change: Add specs and a changelog entry for form query names (#653)
  • change: Add specs and a changelog entry for normalized_query flags (#641)
  • change: Add specs and a changelog entry for prefix modifier bounds (#659)
  • change: Add specs and a changelog entry for template array values (#642)
  • change: Add specs and a changelog entry for template cache copies (#658)
  • change: Add specs and a changelog entry for template hashes (#649)
  • change: Add specs and a changelog entry for trailing empty IDNA labels (#661)
  • change: Add specs and a changelog entry for undefined template members (#654)
  • change: Add specs and a changelog entry for userinfo splitting (#652)
  • change: Add specs for malformed Punycode labels
  • change: Add specs for multi-variable + and # template matching
  • …and 65 more

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

sporkmonger/addressable 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 ad6ebb9d7615f6397075cefc3a2c8b00e8ddb705 — 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.