Skip to content
CAI
Software that uses CAICheck a score

rails/globalid

61.2

Adequate · 6 November 2026

828

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

GlobalID 1.4.0: Signed Global IDs, Locator API, and Fixture Support

This release introduces Signed Global IDs (SGIDs) that support expiration and purpose-based verification to prevent token reuse, along with new locator methods (\locate\_many\, \locate\_many\_signed\, \fetch\) for efficient bulk model resolution and distinct error handling for missing vs. unavailable records. It also adds \GlobalID::FixtureSet\ helpers (\global\_id\, \signed\_global\_id\) for use in Rails fixtures, exposes URL-safe Base64 encoding for GID parameters, and configures default app names and SGID expiration via the Rails Railtie.

_lib/global\id · high confidence

Introduce URI::GID for structured Global ID encoding

Adds a new URI::GID class that encodes Global IDs into a structured URI format (gid://app/model\_name/model\_id) with support for optional query parameters. This allows applications to store simple metadata, such as database identifiers, directly within the Global ID string, and supports composite model IDs delimited by slashes.

_lib/global\id/uri · high confidence

Removals

Removal of ActiveModel GlobalID integration

The ActiveModel integration for GlobalID has been removed. The files defining \ActiveModel::GlobalID\, \ActiveModel::GlobalIdentification\, \ActiveModel::GlobalLocator\, \ActiveModel::SignedGlobalID\, and the associated Railtie have been deleted. This eliminates the ability to generate global IDs, locate models via global IDs, or sign global IDs directly through ActiveModel modules within this library.

_lib/active\model · high confidence

Behavioural changes

GlobalID library restructured with deprecation support and Rails integration

The GlobalID library has been reorganized to support a migration from the previous ActiveModel namespace. A new main entry point (lib/global\_id.rb) defines the GlobalID class with eager loading for core components like Locator, Identification, and Verifier, and introduces a deprecator to warn users about the upcoming 2.1 release. A compatibility shim (lib/globalid.rb) ensures the old require path still works by loading the new library and conditionally loading the Rails Railtie, ensuring existing applications continue to function while preparing for the namespace change.

lib · high confidence

Repository maintenance and documentation overhaul

This update restructures the project's documentation and build configuration. The legacy README.rdoc has been replaced with a comprehensive README.md that details usage, including Signed Global IDs, expiration, purpose scoping, and bulk location via \locate\_many\. A new CONTRIBUTING.md guide has been added to standardize the contribution workflow. On the build side, the Rakefile now requires bundler's gem tasks and enables test warnings, while .gitignore has been updated to exclude Ruby version/gemset files and lock files.

(repo-wide) · high confidence

Test coverage

Added comprehensive test coverage for GlobalID core features; Expanded test fixtures for complex model scenarios; Update test infrastructure and configuration.

Dependencies

Expanded CI matrix with new Rails and Ruby versions

The gemfiles directory now includes dedicated lockfiles for testing against Rails 6.1, 7.0, 7.1, 8.0, and the main development branch, alongside Ruby 3.3 and 3.4. Each file explicitly pins activemodel and railties to the corresponding version (or source branch) and includes railties as a test dependency, ensuring the library is validated against a broader range of Rails environments.

gemfiles · high confidence

GlobalID gem upgraded to 1.4.0 with Rails 8 and Ruby 2.7+ support

The GlobalID gem has been updated to version 1.4.0, raising the minimum required Ruby version to 2.7.0 and the Active Support dependency to 6.1 or higher. This change drops support for older Ruby and Rails versions, aligning the library with modern Rails 8 dependencies (including ActionPack, ActionView, and Railties 8.0.3) and removing the legacy 'activemodel-globalid' gemspec in favor of the unified 'globalid' package.

(dependencies) · 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 58 → 61 (+2.8)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 65 → 65 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 53 → 59 (+6.3)
  • Readiness 58 → 58 (+0.0)
  • Security 75 → 75 (+0.1)

Resolved (5)

  • Ambiguous distinction between 'locate' and 'fetch'. In many ORMs, 'fetch' implies raising an error if not found, while 'locate' might return nil. Without clear documentation or distinct behavior in signatures, these names are confusingly similar.
  • Ambiguous method signature for 'find'. One overload takes a gid string directly, the other takes an options hash. This creates confusion about whether the first argument is a GID or an options hash, and differs from the explicit 'parse' method.
  • Redundant methods for generating a GlobalID object. 'to_gid' is a common Ruby convention for 'to_global_id', but having both exposes unnecessary choice and potential inconsistency in options handling.
  • Redundant methods for generating a SignedGlobalID. Similar to the above, 'to_sgid' is a shorthand for 'to_signed_global_id', creating duplicate intent.
  • Redundant methods for generating parameter strings. These are likely aliases for 'to_param' variants but named specifically for GID/SignedGlobalID, which is confusing when 'to_param' is also available on the GlobalID object itself.

Changes since last survey

  • 2 commits — 2 feature/other, 0 fixes

By area

  • (repo) — 1 commit
  • .github/workflows — 1 commit

Notable commits

  • change: Merge pull request #220 from zachasme/ci-old-rubies-ubuntu-24.04
  • change: Run Ruby 2.7, 3.0 and 3.1 CI on ubuntu-24.04

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

Survey your own repository

rails/globalid 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 01a1a1cf9babb3dc8e5fc88531f863588c305306 — 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.