Skip to content
CAI
Software that uses CAICheck a score

nesquena/rabl

58.7

Adequate · 28 September 2026

4k

lines of production code

Ruby

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

RABL is a Ruby library that provides template-based serialization for converting objects into various data formats, primarily JSON. It integrates with web frameworks like Rails, Padrino, and Sinatra to render structured responses, supporting features such as nested objects, conditional fields, and multiple serialization engines including MessagePack. The system includes a standalone renderer for use outside of web contexts and manages template caching and dependencies to ensure efficient performance.

How it got here

2011 — Rails 8 support and test fixture expansion

23 changes.

The project upgraded to version 0.17.0 to introduce support for Rails 8, alongside new features like MessagePack serialization and a public configuration API. Significant effort was dedicated to expanding the test suite by adding comprehensive integration fixtures for Rails 2 through 6, Padrino, and Sinatra to ensure broad framework compatibility.

2012–2019 — Rails version compatibility expansion

10 changes.

The project expanded its test infrastructure to support integration testing across multiple Rails versions, adding dedicated fixtures and test suites for Rails 3.2, 4, 5, and 6. This work included implementing version-specific digestors for template caching and introducing standalone rendering capabilities with dependency tracking to enhance flexibility outside of web frameworks.

Features

Add Padrino test fixture application

A new test fixture application for the Padrino framework has been added to the project. This includes the full application structure with configuration for ActiveRecord (using SQLite in-memory databases), Riot for testing, and HAML for rendering. The fixture provides a concrete example of a Padrino app setup, including database migrations, models, helpers, and a Rake-based test runner, serving as a reference implementation for testing Padrino-specific behaviors.

_fixtures/padrino\test · high confidence

Add Rails 3 fixture test application

A new Rails 3 fixture application has been added to the test suite to validate integration with this version of the framework. The app includes controllers for posts and users that demonstrate rendering in JSON, XML, and HTML formats, with a default fallback to JSON. It utilizes shared model and view directories via symlinks to reduce duplication and includes a Rake task specifically for running the Rabl functional tests.

fixtures/rails3 · high confidence

Add Rails 3.2 integration test fixture

A new Rails 3.2 application fixture has been added to \fixtures/rails3\_2\ to support integration testing. This includes a full application structure with controllers for posts and users, a custom MIME type (\rabl\_test\_v1\), and configuration for the asset pipeline and SQLite. The fixture also sets up the test environment to run migrations and execute integration tests against this specific Rails version.

_fixtures/rails3\2 · high confidence

Add Rails 4 fixture application for testing

This change introduces a complete Rails 4 application structure under \fixtures/rails4\ to serve as a test environment. It includes standard Rails configuration files (database, environments, initializers), controllers for posts and users, and a specific \renderer\ action in \PostsController\ that invokes \Rabl.render\ to test the library's rendering capabilities. The fixture also sets up a custom MIME type (\rabl\_test\_v1\) and configures the test environment to run tests in sorted order to ensure deterministic execution.

fixtures/rails4 · high confidence

Add Rails 5 API-mode test fixture

A new test fixture for Rails 5 API mode has been added to validate compatibility with the framework's API-only configuration. This includes a dedicated application structure with \ActionController::API\ as the base controller, configuration for ActionCable, and specific Rails 5 defaults such as required \belongs\_to\ associations and timezone preservation. The fixture also provides a custom \silence\_stream\ implementation to replace the removed Rails 4 method, ensuring test execution remains stable.

_fixtures/rails5\api · high confidence

Add Rails 5.0.0 test fixture

Added a new Rails 5.0.0 application fixture in \fixtures/rails5\ to support testing against this version. The fixture includes standard Rails 5 configuration files, such as \config/cable.yml\ for Action Cable, \config/initializers/new\_framework\_defaults.rb\ for Rails 5-specific defaults, and \config/initializers/mime\_types.rb\ which registers a custom \rabl\_test\_v1\ MIME type. It also sets up the application structure with shared symlinks for controllers, models, and views, and configures a Rake task to run Rabl-specific functional tests.

fixtures/rails5 · high confidence

Add Rails 6 fixture application

Added a new Rails 6 fixture application in the \fixtures/rails6\ directory to support testing. This includes a complete application structure with controllers for users and posts, database migrations for users, posts, and phone numbers, and configuration for Webpacker, ActionCable, and Active Storage. The fixture also sets up a custom MIME type (\rabl\_test\_v1\) and a specific renderer endpoint to facilitate integration testing of the Rabl gem against a Rails 6 environment.

fixtures/rails6 · high confidence

Added RABL template examples for JSON serialization

The examples directory now includes three RABL templates (base.json.rabl, demo.json.rabl, and inherited.json.rabl) that demonstrate how to structure JSON responses. These files illustrate core features such as defining attributes, renaming nodes, using child blocks for nested objects, extending base templates, and executing arbitrary code blocks within the view layer.

examples · high confidence

Added Rails 2 fixture application for integration testing

A new Rails 2 fixture application has been added to the \fixtures/rails2\ directory to support integration testing. This includes standard Rails 2 structure files such as controllers for Posts and Users, a Rakefile configured to run functional tests, and application helpers. The fixture leverages shared resources by symlinking the models and views directories to a common \ashared\ location, ensuring consistency with other test fixtures while providing a specific Rails 2 environment for validation.

fixtures/rails2 · high confidence

Added Rails 3 executable script for fixture testing

A new executable script (script/rails) has been added to the Rails 3 fixture directory. This script serves as the entry point for running the Rails application within the fixture environment, ensuring that the test app can be executed correctly by loading the necessary configuration and boot files.

fixtures/rails3/script · high confidence

Added Rails 3 fixture test application

A new Rails 3 fixture application has been added to the \fixtures/rails3\ directory to serve as a test environment. This includes the standard Rails 3 configuration structure, such as \config/application.rb\, environment-specific settings for development, test, and production, and initializers for session storage and security tokens. The fixture also provides default routing for \users\ and \posts\ resources, SQLite database configurations, and standard public assets like error pages (404, 422, 500) and the default welcome page.

fixtures/rails3/config, fixtures/rails3/public · high confidence

Added controller fixtures for posts and users resources

The test fixture application now includes controller definitions for managing posts and users. The new \posts.rb\ controller exposes index and show actions to list posts ordered by ID and display individual posts, while \users.rb\ provides similar index and show actions for users ordered by username. These controllers render their respective view templates, establishing the basic routing and data-fetching structure for these resources within the test environment.

_fixtures/padrino\test/app/controllers · high confidence

Added database schema and seed files to the Rails 3 fixture

The Rails 3 test fixture now includes a \schema.rb\ file defining the \users\, \posts\, and \phone\_numbers\ tables, along with a \seeds.rb\ file for default data population. These additions, alongside a symlinked migrations directory, enable running \rake db:reset\ and \rake db:setup\ to initialize the fixture database without needing to execute individual migration files.

fixtures/rails3/db · high confidence

Adds configuration, caching, and rendering APIs with conditional Rails/Padrino integration

The library now exposes a public API for managing settings and rendering templates, including \Rabl.configure\ for a configuration block, \Rabl.render\ for direct template rendering, and methods to manage a source cache (\source\_cache\, \reset\_source\_cache!\). It conditionally loads Rails-specific components (railtie, tracker, digestor) only when running on Rails versions 3 through 8, and adds out-of-the-box support for Padrino by registering the library after the framework loads.

lib · high confidence

Expanded fixture suite for Rails 5 API mode and Rails 6

The shared test fixtures in fixtures/ashared now include dedicated support for Rails 5 API mode and Rails 6. This adds new controller implementations for Rails 5, updated view directories for Rails 3.2, 5, and 6, and comprehensive setup instructions in NOTES to guide users through configuring these specific Rails versions for testing.

fixtures/ashared · high confidence

Initial release of RABL 0.17.0 with Rails 8 support

This release introduces support for Rails 8, allowing the library to function correctly with the latest Rails framework version. It also includes a fix for an ArgumentError that occurred when no keyword arguments were provided on Ruby versions prior to 2.7, ensuring broader compatibility across older Ruby environments.

(repo-wide) · high confidence

Rails 2 fixture database schema and structure added

The Rails 2 integration test fixture now includes a defined database schema (schema.rb) specifying tables for users, posts, and phone numbers, along with a seeds.rb file for data initialization. The migration directory has been converted to a relative symlink pointing to a shared migration source, centralizing migration logic across fixtures.

fixtures/rails2/db · high confidence

Standalone template rendering and dependency tracking

Rabl now includes a standalone Renderer class that allows templates to be rendered outside of web frameworks (such as for message queues) by accepting an object and template source directly. Additionally, a new Tracker class has been added to parse template sources and extract dependencies from 'extends' and 'partial' calls, laying the groundwork for cache digest support.

rabl · high confidence

Behavioural changes

Padrino test fixture app now uses shared views and custom Time formatting

The Padrino test application fixture has been restructured to share its view templates via a symlink to a common location (../../ashared/views/), reducing duplication across fixtures. Additionally, the application now patches the global Time class to return ISO 8601 formatted strings by default, ensuring consistent time serialization in test outputs.

_fixtures/padrino\test/app · high confidence

Rabl library updated to version 0.17.0

The Rabl gem has been upgraded to version 0.17.0. This release includes comprehensive support for Rails 8, alongside continued compatibility with Rails 6 and 7. The update introduces a new configuration option, \exclude\_empty\_values\_in\_collections\, which allows users to filter out empty values when rendering collections. Additionally, the library now supports the MessagePack serialization format (with \.mpac\ alias) and includes a custom LRU cache engine for non-Rails environments to improve caching performance.

lib/rabl · high confidence

Rails 2 fixture updated to version 2.3.18 with full configuration

The Rails 2 fixture has been upgraded to version 2.3.18 and now includes a complete set of configuration files to ensure it runs correctly. This update adds essential setup files such as \boot.rb\ (with Bundler support), \environment.rb\, \database.yml\ (configured for SQLite3), and environment-specific settings for development, production, and test modes. Additionally, standard initializers for sessions, cookies, and defaults are included, along with basic routing for posts and users, enabling the fixture to serve as a functional integration test base.

fixtures/rails2/config · high confidence

Fixes

Add Rails 5 compatibility for template digesting

Added new digestor implementations for Rails 3, 4.1, and 5 to ensure proper template caching and digesting across different Rails versions. The Rails 5 implementation inherits from ActionView::Digestor without overriding methods, while Rails 3 and 4.1 implementations provide custom digest methods with version-specific cache key generation and argument handling.

lib/rabl/digestor · high confidence

Test coverage

Add Rails 5 integration tests for Posts and Users controllers; Add Sinatra test fixture for RABL integration; Add controller test symlinks for posts and users; Added Rails 2 integration test fixtures; Added Rails 2 integration test fixtures; Added Rails 3 fixture test suite; Added integration tests for Posts and Users controllers; Added integration tests for Rails 4 controller rendering; Added integration tests for Rails 6 compatibility; Added test coverage for Rabl serialization engines, builder, and configuration.

Dependencies

Add integration test fixtures for Rails 2 through 6, Padrino, and Sinatra

The project now includes dedicated fixture applications for Rails 2.3, 3.0, 3.2, 4.2, 5.0, and 6.0, as well as Padrino and Sinatra, enabling integration testing across a wide range of framework versions. These fixtures define specific dependency versions (e.g., Rails 6.0.0, Padrino 0.10.7) and include necessary gems like sqlite3, riot, and pry-rails to ensure the library works correctly in each environment. Additionally, the main Gemfile and gemspec have been updated to support these tests, adding dependencies for i18n, bson, msgpack, and oj, and refining the activesupport dependency constraints based on Ruby version.

(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

Score

  • CAI 65 → 59 (-5.9)
  • Rubric changed (rubric-2026.09.8 → rubric-2026.09.16) — scores are not directly comparable.

Lenses

  • Code Health 99 → 99 (+0.0)
  • Architecture 100 → 75 (-25.2)
  • Maturity 58 → 51 (-8.0)
  • Readiness 62 → 57 (-5.0)
  • Security 61 → 67 (+6.6)

Resolved (3)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Off-boarding risk: anonymized user #1

New (6)

  • Duplication of caching logic. CacheEngine provides low-level cache operations, but Helpers exposes fetch_result_from_cache and write_result_to_cache which likely delegate to or duplicate the logic of CacheEngine. This creates two ways to interact with the cache layer.
  • Inconsistent accessor patterns for engine configuration. Some properties are exposed as simple attributes (e.g., json_engine), while others are exposed as methods (e.g., json_engine()). This inconsistency forces users to guess whether to use attribute access or method invocation.
  • Inconsistent method signature for Digestor.digest. One overload takes explicit name, format, and finder arguments, while the other takes a single options hash. This is confusing for API consumers who must determine which signature to use based on context.
  • Multiple entry points for rendering with inconsistent signatures and responsibilities. Rabl.render is a high-level convenience method, while Builder and Renderer are lower-level constructs. Builder.to_hash and MultiBuilder.to_a return different data structures for similar intents (rendering), and Renderer.render requires a context_scope while Rabl.render does not.
  • Off-boarding risk: anonymized user #1
  • Scanner failed to run — not a clean result

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

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

Survey your own repository

nesquena/rabl 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 28 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 9a16f842adc76ffd89cf5e8cebe93d6939db9f8d — the exact code this score is about.
  • Scored under rubric-2026.09.16 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-2d9048c36d26.