Skip to content
CAI
Software that uses CAICheck a score

amatsuda/jb

60.8

Adequate · 6 November 2026

287

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

Added JSON API view templates for scaffolded controllers

The scaffold controller generator now includes a hook for the 'jb' generator, which creates specific JSON view templates (index.json.jb and show.json.jb) in the app/views directory. These templates generate JSON responses that include resource attributes and timestamps, ensuring that scaffolded controllers output structured JSON data by default.

lib/generators · high confidence

Behavioural changes

Added dedicated benchmarking gemfile

A new gemfile (gemfiles/benchmark.gemfile) has been introduced to isolate dependencies required for benchmarking tasks. This file explicitly includes 'rake', 'rails', 'jbuilder', 'benchmark-ips', and 'action\_args', allowing performance testing to run with a specific, self-contained set of gems separate from the main application's dependencies.

gemfiles · high confidence

JB gem updated to version 0.8.2 with Rails 7.1 compatibility fixes

The JB gem has been upgraded to version 0.8.2, introducing specific monkey-patches to ensure compatibility with Rails 7.1 (versions 7.1.0 through 7.1.3). This update separates Action View monkey-patches into legacy (4/5) and modern (6+) files, adding a \TemplateResultCaster\ patch for Rails 7.1 to prevent unwanted stringification of template results, while maintaining support for Rails 6.0 and 6.1+ via \PartialRendererExtension\ and \CollectionRendererExtension\ respectively. The handler now defaults to the \:json\ format and respects Active Support JSON encoding customizations.

lib/jb · high confidence

Library initialization and Railtie integration

The Jb library now explicitly requires its version file and loads the Jb Railtie during initialization. This change ensures that the library properly integrates with the Rails framework, allowing for automatic configuration and hooks within Rails applications.

lib · high confidence

New benchmarking script and console script hardening

A new bin/benchmark.sh script has been added to facilitate benchmarking on a real Rails app by executing a benchmark script within a dummy application context using a specific benchmark gemfile. Additionally, the bin/console script now enforces strict literal syntax checking via a frozen\_string\_literal pragma.

bin · high confidence

Test coverage

1 commit adding/updating tests in test/generators; Added JSON template views for posts and comments; Added base helper and mailer classes to the dummy Rails application; Added dummy Rails application for plugin testing and benchmarking; Added dummy Rails controllers for testing and benchmarking; Added integration tests for JSON rendering and API support; Added test fixture for partial rendering; Added test fixtures for User, Post, and Comment models; Added test infrastructure for the dummy Rails application; Added tests for ActionController::API support; Migrate test suite from Minitest to Test::Unit.

Dependencies

Updates development dependencies and adds conditional runtime constraints

The gem's development environment now uses test-unit-rails instead of minitest, and adds rails, action\_args, debug, and selenium-webdriver as development dependencies. The Gemfile introduces conditional logic to support testing against specific Rails versions (including the main branch) and Ruby versions, pinning json to versions below 3.0 for Rails under 8.1, and adding bigdecimal and mutex\_m for Ruby 3.3+. It also sets version constraints for nokogiri and loofah based on the Ruby version to ensure compatibility.

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

Lenses

  • Code Health 76 → 76 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 54 → 54 (+0.0)
  • Readiness 57 → 57 (+0.0)
  • Security 100 → 100 (+0.0)
  • Performance 80 → 80 (+0.0)

Findings

  • No change — the same findings as the prior survey.

Changes since last survey

  • 24 commits — 24 feature/other, 0 fixes

By area

  • (root) — 8 commits
  • .github/workflows — 5 commits
  • test/dummy_app — 5 commits
  • lib/jb — 3 commits
  • (repo) — 1 commit
  • lib/generators — 1 commit
  • lib/jb.rb — 1 commit

Notable commits

  • change: CI: CI against Rails 8.1
  • change: CI: CI against Ruby 4.0
  • change: CI: Use actions/checkout@v7
  • change: CI: allow_failures is no longer set in the matrix since 3b3f2a3
  • change: CI: benchmark has been extracted as a bundled gem since Ruby 4.0
  • change: Catch up the generator with the current Jbuilder generator
  • change: Compare RAILS_VERSION as a version, not as a String
  • change: Declare runtime dependencies on railties and actionview
  • change: Document what Jb does to ActionController::API
  • change: Don't break Jbuilder's collection rendering
  • change: Don't define singleton methods on every rendered collection
  • change: Don't double-encode jb templates rendered from jb templates or with a non-jb layout
  • change: Don't let Jbuilder's Railtie hide failures of Jb's ActionController::API patch
  • change: Don't raise NameError on require 'jb' without Rails
  • change: Merge pull request #49 from tnantoka/jbuilder-collection
  • change: Package only lib, LICENSE, and README into the gem
  • change: Render a collection of different kinds of objects via Jb partials as an Array
  • change: Ruby >= 2.0 reads source files as UTF-8 by default
  • change: Test render_to_string, and CI against Rails 7.1.3 for Jb::TemplateResultCaster
  • change: Use a dedicated Jbuilder partial in the test instead of the benchmark's one
  • …and 4 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

amatsuda/jb 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 bc641aa55f7da822e47b316aea00a046413f22a6 — 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.