Skip to content
CAI
Software that uses CAICheck a score

procore-oss/blueprinter

67.6

Adequate · 20 September 2026

1.5k

lines of production code

Ruby

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

Blueprinter is a Ruby gem designed for serializing objects into JSON, featuring a configurable system for defining fields, associations, and custom formatters. It supports ActiveRecord models through an auto-detection generator and allows for flexible data extraction via specialized handlers and dynamic resolution. The library includes a reflection API for introspection and enforces strict validation to ensure reliable serialization of complex object graphs.

How it got here

2017 — Rebranding to Blueprinter and architectural refactor

7 changes.

The project was rebranded from PaintedRabbit to Blueprinter, involving a complete internal refactor of the serialization engine and the introduction of a reflection API. This period also saw the migration of the test suite from Minitest to RSpec, the adoption of Ruby 3.1+ requirements, and the replacement of the legacy test runner with an IRB-based console.

2018–2019 — Test infrastructure and generator implementation

10 changes.

This period focused on establishing a robust testing foundation for Blueprinter, including comprehensive unit, integration, and benchmark tests alongside essential test helpers and factories. It also introduced key features such as a Rails generator for creating blueprints and a configurable DateTime formatter, while refactoring the internal extraction logic into specialized classes to improve code clarity and functionality.

Features

Add Rails generator for creating Blueprints

Users can now generate blueprint files for ActiveRecord models using the Rails generator. The generator creates a blueprint class in the specified directory (defaulting to app/blueprints) and supports options to manually specify fields and associations, auto-detect them from the model, customize the identifier, and control code formatting such as line wrapping and indentation.

lib/generators · high confidence

Configurable DateTime formatting via new formatter

A new DateTimeFormatter has been added to the formatters module, allowing date and time values to be formatted according to a configurable format string or a custom Proc. This change enables users to define how DateTime objects are serialized, with the format falling back to a global configuration if not specified per field, and raising an error for invalid inputs when a format is required.

lib/blueprinter/formatters · high confidence

Removals

Removal of Painted Rabbit version and task files

The version definition file (lib/painted\_rabbit/version.rb) and the rake task stub (lib/tasks/painted\_rabbit\_tasks.rake) for the Painted Rabbit component have been deleted. This removes the hardcoded version string '0.1.0' and the commented-out rake task structure from the library.

_lib/painted\rabbit, lib/tasks · high confidence

Behavioural changes

Blueprinter v1.3.0: New internal architecture and reflection API

Blueprinter has been updated to version 1.3.0, introducing a complete internal refactor of the serialization engine. The library now uses a dedicated \Association\ class and a thread-safe, cached \ViewCollection\ to manage field and transformer definitions, significantly reducing object allocations during rendering. A new public \Reflection\ API allows users to introspect blueprints, retrieving defined fields, associations, and their configurations. The rendering pipeline now supports extensions via a \pre\_render\ hook, allows passing dynamic options to nested associations, and enforces stricter validation for invalid blueprints and missing views.

lib/blueprinter · high confidence

Library renamed from PaintedRabbit to Blueprinter

The library has been renamed from PaintedRabbit to Blueprinter. The previous entry point \lib/painted\_rabbit.rb\ has been removed and replaced with \lib/blueprinter.rb\, which now serves as the main module. This change includes a new configuration system allowing users to set global options via \Blueprinter.configure\ and \Blueprinter.configuration\, and utilizes Ruby's \autoload\ mechanism for loading core components like \Base\, \Configuration\, and \Extension\.

lib · high confidence

Project rebrand to Blueprinter and test suite migration to RSpec

The library has been renamed from PaintedRabbit to Blueprinter, including updates to the gem title, documentation, and configuration files. The test framework has been migrated from Minitest to RSpec, evidenced by the new .rspec configuration, Rakefile tasks, and the relocation of the dummy application from test/dummy to spec/dummy. Additionally, RuboCop linting has been introduced with a specific configuration targeting Ruby 3.1.

(repo-wide) · high confidence

Refactor extraction logic into specialized extractor classes

The internal extraction mechanism has been restructured to use dedicated extractor classes (AutoExtractor, BlockExtractor, HashExtractor, PublicSendExtractor, and AssociationExtractor) instead of monolithic logic. This change improves how fields are resolved: HashExtractor handles hash access, PublicSendExtractor handles method calls, and BlockExtractor now correctly distinguishes between standard blocks and Symbol\#to\_proc syntax to prevent argument-passing errors. Additionally, AssociationExtractor now supports dynamic blueprint resolution via procs and allows setting default values for associations when the associated object is null.

lib/blueprinter/extractors · high confidence

Replaced test runner with IRB-based console

The bin/test script has been removed and replaced by a new bin/console entry point. This change shifts the primary interactive development tool from a Rails plugin test runner to a standard IRB session, providing a more flexible environment for debugging and experimentation.

bin · high confidence

Test coverage

Added benchmark tests for Blueprinter performance; Added factory definitions for User and Vehicle models; Added integration tests for base blueprint rendering; Added shared integration tests for base rendering logic; Added test infrastructure and helpers for Blueprinter; Added tests for the Blueprinter generator; Added unit tests for core Blueprinter components; Removed legacy test suite and dummy Rails application scaffolding.

Dependencies

Blueprinter gem restructured with explicit dependency declarations and Ruby 3.1+ requirement

The Blueprinter gem (formerly Painted Rabbit) has been restructured to explicitly declare its dependencies in the Gemfile rather than relying solely on the gemspec. This change enforces a minimum Ruby version of 3.1, dropping support for older versions. The gem now officially supports OJ (\~\> 3.13) and Yajl-Ruby (\~\> 1.4) as serialization backends, while development dependencies have been updated to include RSpec 3.12, RSpec-Rails 8.0, FactoryBot 6.2, and RuboCop 1.44. The legacy Gemfile.lock and the old painted\_rabbit.gemspec have been removed as part of this cleanup.

(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

Baseline

  • First survey — no prior run to compare against. CAI 68.

Lenses

  • Code Health 100
  • Architecture 69
  • Maturity 58
  • Readiness 79
  • Security 85

Changes since last survey

  • 300 commits — 284 feature/other, 16 fixes

By area

  • (repo) — 148 commits
  • .github/workflows — 67 commits
  • (root) — 39 commits
  • lib/blueprinter — 33 commits
  • spec/integrations — 7 commits
  • spec/units — 3 commits
  • .github/ISSUE_TEMPLATE — 2 commits
  • lib/generators — 1 commit

Notable commits

  • fix: Fix rubocop violations
  • fix: Fix specs
  • fix: Merge branch 'main' into js/association-if-condition-fix
  • fix: Merge branch 'main' into js/association-if-condition-fix
  • fix: Merge pull request #390 from procore-oss/fix-ruby-2.7
  • fix: Merge pull request #464 from procore-oss/js/association-if-condition-fix
  • fix: Merge pull request #472 from procore-oss/js/nil-view-fix
  • fix: Merge pull request #496 from procore-oss/js/fix-failing-build
  • fix: Merge pull request #513 from procore-oss/fix-rubocop-error
  • fix: Merge pull request #553 from procore-oss/js/fix-benchmark-failures
  • fix: Merge pull request #570 from procore-oss/js/fix-rubocop-violations
  • fix: README: Fix <summary> tag broken by github suggestion merge
  • fix: [fix] Explicitly require JSON in Configuration
  • fix: [fix] Fallback on :default when a nil view is provided when rendering
  • fix: [fix] Fixes an issue when using a symbol if condition with association
  • fix: fix: misspelling of os from on
  • change: Add Extensions section to README.md
  • change: Add Reflection section to README.md
  • change: Add blueprinter_schema extension
  • change: Add gem description
  • …and 280 more

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

Survey your own repository

procore-oss/blueprinter 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 20 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 85ce233c909e05b0a16ddf8f874c43f7d2794de6 — 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-b51f968c9b10.