rails/jbuilder
60.9
Adequate · 26 September 2026
967
lines of production code
Ruby
primary language
4
measurements over time
What this system is
Architecture
Refactor Jbuilder internals into separate files
The Jbuilder library has been refactored by extracting internal classes into dedicated files (e.g., Blank, CollectionRenderer, Errors, DependencyTracker, KeyFormatter) and moving template handling logic into JbuilderTemplate. This improves code organization and maintainability without changing the public API or user-facing behavior.
lib/jbuilder · high confidence
Behavioural changes
Add release and test binstubs
New executable scripts are added to the bin directory to automate project maintenance tasks. The release binstub handles versioning by updating lib/jbuilder/version.rb, committing and tagging the new version, and publishing the gem to RubyGems. The test binstub automates the test suite by installing dependencies and running tests via Appraisal.
bin · medium confidence
Add support for Rails 7.0, 7.1, 7.2, 8.0, 8.1, and Rails head
The gemfiles directory now includes new Appraisal configurations for testing against Rails versions 7.0, 7.1, 7.2, 8.0, 8.1, and the Rails main branch. This allows the library to be tested against these specific versions of the Rails framework, ensuring compatibility and stability across a wider range of Rails releases.
gemfiles · high confidence
Introduce JBuilder generator and update scaffold controller for Rack 3.1+ compatibility
A new JBuilder generator is added to produce JSON views for scaffolds, including index, show, and partial templates. The scaffold controller generator is updated to use the :unprocessable\_content status symbol, which is required for compatibility with Rack 3.1 and higher. Additionally, the generated JBuilder templates now include rich\_text, attachment, and attachments fields by default, and the password field is excluded from the JSON output.
lib/generators/rails · high confidence
Major API overhaul and internal refactoring of the Jbuilder builder
The library has been significantly refactored, introducing a new, more explicit API for key formatting and nil handling. Users can now configure global defaults for key formatting (via \key\_format\ and \deep\_format\_keys\) and control whether \nil\ values are included in the output (via \ignore\_nil\). The internal implementation has been restructured: the \JsonBuilder\ class and its associated \railtie\ have been removed, replaced by a new \Jbuilder\ class in \lib/jbuilder.rb\ that uses keyword arguments for initialization and exposes methods like \set!\, \array!\, and \child!\ for building JSON structures. This change also includes the extraction of \KeyFormatter\ into its own file and the removal of deprecated or redundant code paths.
lib · high confidence
Repository structure and CI matrix updated for Rails 8.1 and Ruby 4.0
The project's CI configuration has been updated to test against Rails 8.1 and Ruby 4.0, ensuring compatibility with the latest versions of the framework and Ruby. Additionally, the repository structure has been modernized: the legacy \README.rd\ file was removed in favor of \README.md\, and a \CONTRIBUTING.md\ guide was added to standardize the contribution process. The \.gitignore\ file was also updated to exclude build artifacts and lock files.
(repo-wide) · high confidence
Updated controller and JSON view templates for modern Rails versions
The scaffold generator templates for controllers and JSON views have been updated to support Rails 8+ parameter handling. Generated controllers now use the new \params.expect\ syntax for parameter filtering when running on Rails 8 or higher, while falling back to \params.require\ for earlier versions. Additionally, the generated JSON responses now use the \:see\_other\ status code for successful updates and deletes, and the \index.json.jbuilder\ template now uses the modern string-of-arrays syntax for array rendering.
lib/generators/rails/templates · medium confidence
Test coverage
Add comprehensive test suite for Jbuilder
Added a new test suite covering Jbuilder's core functionality, including the dependency tracker, template rendering, and Rails generator scaffolds. The tests verify that partials are correctly detected and cached, collections are rendered and cached properly, and the Rails generator produces the expected JSON view templates and controller code.
test · high confidence
Dependencies
Jbuilder 2.0.0: Rails 7+ and Ruby 3.0+ requirements
The jbuilder gem has been updated to version 2.0.0, which raises the minimum supported versions to Ruby 3.0.0 and Rails 7.0.0 (activesupport and actionview). The legacy json\_builder.gemspec has been removed in favor of the new jbuilder.gemspec, which also includes updated metadata and development dependencies for the Rubinius (rbx) platform.
(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
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 49 → 61 (+12.3)
- Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 97 (-2.5)
- Architecture 69 → 69 (+0.0)
- Maturity 57 → 57 (+0.0)
- Readiness 27 → 51 (+24.1)
- Security 85 → 99 (+13.4)
Resolved (8)
- Coverage not measured — test suite did not build
- Dimension evaluation failed
- Dimension evaluation failed
- High: security finding (details withheld)
- High: security finding (details withheld)
- No exposed public API
- No tests found
- Test reliability not included
New (10)
- Duplicate intent with inconsistent parameter naming. Both methods perform the same core operation of setting a key-value pair in the JSON structure, but one uses 'key/value' and the other uses 'name/object'. This creates confusion for users migrating between direct Jbuilder usage and template usage.
- High: security finding (details withheld)
- High: security finding (details withheld)
- Inconsistent parameter structure for array rendering. Jbuilder.array! explicitly lists attributes as a separate argument, while JbuilderTemplate.array! groups additional options into args. This forces users to remember different calling conventions for the same logical operation depending on the context (direct object vs template).
- JbuilderTemplate._render_partial_with_options (cognitive 18) (lib/jbuilder/jbuilder_template.rb)
- Medium: security finding (details withheld)
- No dependency advisory monitoring
- Redundant naming convention for mutable vs immutable operations. While the '!' suffix typically denotes mutation in Ruby, having both key_format! and key_format suggests one might be a setter and the other a getter, or one is a global config and the other instance-specific. However, looking at other pairs like ignore_nil/ignore_nil!, this pattern is consistent across the class. The inconsistency is not here, but rather the potential confusion if key_format() is intended to be a getter while others are setters. Given ignore_nil(value) takes an argument, key_format() taking no arguments implies it's a getter. This is actually a consistent Ruby pattern (getter vs setter), so this is NOT an inconsistency.
- TooManyMethods: Jbuilder (lib/jbuilder.rb)
- Workflow token permissions not restricted
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
rails/jbuilder 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 26 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 f141f5ede81bf534d62c6ba228975d5ccb90b63d — 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-7c1cb6328e11.