amatsuda/jb
61.8
Adequate · 19 September 2026
201
lines of production code
Ruby
primary language
1
measurement over time
What this system is
This system is a Ruby gem that provides a custom template handler for rendering JSON responses using .jb files within Rails applications. It integrates with Action View to convert Ruby templates into JSON, supporting both standard and API-only controllers across multiple Rails versions. The project includes a self-contained dummy Rails application used for testing compatibility, benchmarking performance against alternatives like Jbuilder, and validating rendering behaviors.
Features
Added JSON Builder (jb) scaffold generator
Rails scaffolding now supports generating JSON responses using the JSON Builder (jb) format. A new JbGenerator creates .jb template files for index and show actions, and the standard scaffold controller generator includes this generator by default, allowing users to quickly scaffold controllers that return JSON data structured via JSON Builder.
lib/generators · high confidence
Initial release of the jb gem (v0.8.2) for rendering .jb templates as JSON
This change introduces the jb gem, a simple template handler that allows developers to write Ruby templates (with the .jb extension) that automatically render as JSON. The implementation registers a custom Action View template handler that converts template output to JSON, with specific monkey-patches to ensure compatibility across Rails 5, 6, and 7.1+ versions. Key behaviors include defaulting the output format to JSON, handling partial collections correctly by returning arrays instead of strings, and ensuring API-mode controllers can utilize the handler. The gem version is set to 0.8.2.
lib/jb · 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
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
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
Update development dependencies and add runtime constraints
The project updates its development dependencies by removing pinned versions for bundler and rake, switching the test framework from minitest to test-unit-rails, and adding rails, action\_args, debug, and selenium-webdriver as dev dependencies. Runtime constraints are added to the Gemfile to support specific Ruby versions, including conditional requirements for nokogiri, loofah, net-smtp, bigdecimal, and mutex\_m, as well as support for testing against the Rails main branch via an environment variable.
(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 62.
Lenses
- Code Health 100
- Architecture 69
- Maturity 55
- Readiness 53
- Security 100
Changes since last survey
- 204 commits — 199 feature/other, 5 fixes
By area
- (root) — 69 commits
- lib/jb — 46 commits
- test/dummy_app — 33 commits
- .github/workflows — 27 commits
- (repo) — 13 commits
- test/features — 4 commits
- app/views — 2 commits
- gemfiles/rails_60.gemfile — 2 commits
- lib/generators — 2 commits
- bin/benchmark.sh — 1 commit
- gemfiles/rails_42.gemfile — 1 commit
- gemfiles/rails_61.gemfile — 1 commit
- gemfiles/rails_edge.gemfile — 1 commit
- test/jb_test.rb — 1 commit
- test/test_helper.rb — 1 commit
Notable commits
- fix: I say goodbye to bug
- fix: Merge pull request #22 from bogdanvlviv/fix-readme-hash-compact-belogns-to-ruby-since-2.4
- fix: Merge pull request #42 from ken3ypa/fix-typo-in-action_view_monkeys
- fix: another rails fix
- fix: fix deprecation warning for rails6
- change: "Missing secret_key_base for 'production' environment, set this value in config/secrets.yml"
- change: "Remove executables: bundle, bundler"
- change: "undefined method `assets'"
- change: :bomb:
- change: :memo: README
- change: :memo: The Jb syntax
- change: :memo: The benchmark results
- change: :memo: The jb generator
- change: :memo: The reason why Jb is faster
- change: :nail_care: Formatting
- change: :put_litter_in_its_place:
- change: :put_litter_in_its_place:
- change: :put_litter_in_its_place:
- change: :put_litter_in_its_place:
- change: :put_litter_in_its_place:
- …and 184 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
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 19 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 6a8791e1ccb8e825d764839d8648cfbade4df994 — 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.