Skip to content
CAI
Software that uses CAICheck a score

kaminari/kaminari

60.5

Adequate · 14 November 2026

1.4k

lines of production code

Ruby

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Added bug report template for Kaminari pagination issues

A new file \misc/bug\_report\_template.rb\ has been added to provide a reproducible example for reporting issues with Kaminari. This template sets up a minimal Rails environment using ActiveRecord 5.0.1 and SQLite3, including a basic Post/Comment schema and a Minitest case that verifies pagination behavior, allowing users to isolate and demonstrate bugs related to \kaminari-core\ and \kaminari-activerecord\.

misc · high confidence

Added default Kaminari configuration template

A new default configuration template (kaminari\_config.rb) has been added to the Kaminari core gem. This file provides a scaffold for customizing pagination settings, with common options like default page size, window, and parameter names included as commented-out examples for users to uncomment and adjust as needed.

kaminari-core/lib/generators/kaminari/templates · high confidence

Initial release of kaminari-actionview gem

The kaminari-actionview gem is introduced as a standalone package providing the Action View adapter for Kaminari. While primarily designed to be bundled automatically with the main Kaminari gem, it can now be explicitly installed via the gem 'kaminari-actionview' for use with web frameworks other than Rails + Action View. The release includes standard project scaffolding such as the MIT license, a changelog redirecting to the main repository, and usage documentation.

kaminari-actionview, kaminari-activerecord · high confidence

Introduction of kaminari-core gem with documentation and license

The kaminari-core gem is introduced as a standalone package containing core libraries for the Kaminari pagination system. This change adds the necessary project scaffolding, including an MIT License file, a README explaining that the gem is primarily an internal dependency bundled automatically by the main kaminari or adapter gems, and a CHANGELOG redirecting users to the main repository for version history. Users will now have access to this specific core component, though its usage is generally implicit when depending on the broader Kaminari ecosystem.

kaminari-core · high confidence

Architecture

Active Record adapter extracted into kaminari-activerecord gem

The Active Record-specific pagination logic has been moved from the core Kaminari gem into a new, separate \kaminari-activerecord\ gem (version 1.3.0). This change introduces dedicated modules (\ActiveRecordExtension\, \ActiveRecordModelExtension\, and \ActiveRecordRelationMethods\) to handle AR-specific features such as the \page\ method, \total\_count\ optimization for grouped queries, and a new \without\_count\ mode that skips the extra SELECT COUNT query for improved performance. Users relying on Active Record must now ensure this new gem is installed and loaded to access pagination functionality.

kaminari-activerecord/lib/kaminari/activerecord · high confidence

Extract ActionView-specific logic into dedicated kaminari-actionview gem

The ActionView extension code has been moved from the core Kaminari gem into a new, separate \kaminari-actionview\ gem (version 1.3.0). This change isolates Rails-specific dependencies, such as \ActionView::LogSubscriber\ and \ActionView::Context\, from the core library. For users, this means the core pagination logic is now decoupled from ActionView, requiring the explicit installation of the \kaminari-actionview\ gem to enable view helpers and log silencing in Rails applications.

kaminari-actionview/lib/kaminari/actionview · high confidence

Behavioural changes

ActionView integration is now lazy-loaded

The Kaminari ActionView extension now explicitly requires ActiveSupport's lazy\_load\_hooks and registers its helper methods via ActiveSupport.on\_load :action\_view. This ensures that the pagination helpers are only included in ActionView::Base when Action View is actually loaded, allowing applications that use Action View outside of a full Rails stack to function correctly without unnecessary dependencies or side effects.

kaminari-actionview/lib/kaminari · high confidence

Active Record integration moved to dedicated gem

The Active Record pagination extension has been extracted into the new kaminari-activerecord gem. This change ensures that the integration is explicitly loaded via ActiveSupport's lazy load hooks, allowing applications to use Kaminari with Active Record even in non-Rails environments where the framework is used independently.

kaminari-activerecord/lib/kaminari · high confidence

Core pagination logic moved to kaminari-core with enhanced array support and configuration

The core pagination implementation has been extracted into the kaminari-core gem, introducing new files for configuration methods, page scope methods, and array extension. Users can now paginate Ruby arrays directly using \Kaminari.paginate\_array\, which supports limit, offset, total count, and padding options. The pagination API includes new configuration methods like \max\_pages\ (deprecating \max\_pages\_per\) and \max\_paginates\_per\ to control per-page limits, along with improved handling of edge cases such as zero or negative per-page values and padding preservation during pagination.

kaminari-core/lib/kaminari/models · high confidence

Explicitly require core, version, ActionView, and ActiveRecord support modules

The main Kaminari library now explicitly requires its core, version, ActionView, and ActiveRecord components at load time. This ensures that these specific parts of the gem are loaded in the correct order and are available immediately when the gem is used, rather than relying on lazy loading or implicit dependencies.

lib · high confidence

Generator code moved to kaminari-core with improved network error handling

The Kaminari view and config generators have been moved into the kaminari-core gem. The views generator now explicitly handles network errors (such as timeouts or API rate limits) when fetching themes from GitHub, preventing crashes during generation. It also warns users when falling back to ERB for unsupported template engines and displays deprecation warnings for the -e haml or -e slim options.

kaminari-core/lib/generators/kaminari · high confidence

Kaminari 1.3.0 release with security fixes and performance improvements

This release introduces security fixes for version 1.3.0, including preventing \page\ from accepting Hash or Array inputs and escaping user input in \page\_entries\_info\. It also brings significant performance improvements to \total\_count\ and \paginate\ operations, adds support for Ruby 3.1–4.0 and Rails 7.1–8.1, and includes new features like the \paginated?\ method and \data:\ option for pagination links. Several bugs are fixed, particularly around \per\, \padding\, and \total\_count\ edge cases, and the gem now properly registers its deprecator with Rails.

(repo-wide) · high confidence

Kaminari core extracted into a standalone gem

The core pagination logic has been moved into the new \kaminari-core\ gem, separating it from framework-specific adapters. This change introduces a simplified configuration system using \Kaminari.configure\ and \Kaminari.config\, replacing the previous \AS::Configurable\ dependency with a direct implementation. The core now explicitly loads components like \ArrayExtension\ and \HelperMethods\ directly, while maintaining a minimal Rails integration via a \Railtie\ and \Engine\ that registers the deprecator. Users relying on the previous module structure or indirect loading mechanisms may need to adjust their setup to use the new core gem.

kaminari-core/lib/kaminari · high confidence

Pagination views now support data attributes and accessibility roles

The pagination partials in kaminari-core (for ERB, Haml, and Slim) have been updated to pass through \data\ and \remote\ options to the underlying link helpers, allowing users to attach custom data-\* attributes and remote behavior to pagination links. Additionally, the main paginator container now includes ARIA roles (\role="navigation"\ and \aria-label="pager"\) to improve accessibility for screen readers.

kaminari-core/app · high confidence

Refactored pagination helpers and added URL generation methods

The pagination helper methods have been reorganized into a dedicated \helper\_methods.rb\ file, introducing new \next\_page\_url\ and \prev\_page\_url\ helpers for generating full URLs to adjacent pages (with deprecation warnings for the older \path\_to\_next\_url\). The \paginate\ helper now explicitly supports passing \:data\ attributes (e.g., for Turbo frames) via the \options\ hash. Internally, the \Paginator\ and \Tag\ classes have been optimized to reduce object creation and memory allocation by caching URL and partial lookups, and the \Tag\ class now explicitly handles ActionView 7.0 compatibility and safer parameter conversion.

kaminari-core/lib/kaminari/helpers · high confidence

Test coverage

Added comprehensive test suite for Kaminari helpers; Added integration tests for pagination navigation and request formats; Added test coverage for ActiveRecord pagination methods; Added test coverage for PaginatableArray and configuration methods; Added test fixtures for ActiveRecord models and schema; Added test fixtures for view adapter coverage; Added tests for Kaminari configuration and a test helper for ActiveRecord integration; Added tests for the views generator; Migrate test suite to Test::Unit; Removal of obsolete placeholder test files.

Dependencies

Kaminari is split into modular sub-gems (core, actionview, activerecord)

The Kaminari gem is now distributed as a meta-gem that depends on three separate sub-gems: \kaminari-core\ (pagination logic independent of ORMs and view libraries), \kaminari-actionview\ (Action View helpers), and \kaminari-activerecord\ (Active Record adapter). This modular structure allows users to depend only on the specific components they need, decoupling the core pagination engine from view and ORM implementations. The main \kaminari\ gem still provides a convenient single dependency that pulls in all three sub-gems, ensuring backward compatibility for existing users while enabling more granular dependency management for new or optimized setups.

(dependencies) · high confidence

Kaminari version updated to 1.3.0

The Kaminari gem's version constant has been updated to 1.3.0, reflecting the current release state of the pagination library.

lib/kaminari · high confidence

Housekeeping

Version bump to 1.3.0

The version constant in kaminari-core has been updated to 1.3.0.

kaminari-core/lib/kaminari/core · 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.9)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 65 → 62 (-2.7)
  • Architecture 69 → 69 (+0.0)
  • Maturity 52 → 52 (-0.0)
  • Readiness 65 → 65 (+0.0)
  • Security 94 → 90 (-3.8)
  • Domain Modelling 100 → 100 (+0.0)

Resolved (2)

  • Low CVE: [GHSA redacted] (Gemfile)
  • Off-boarding risk: anonymized user #1

New (2)

  • Medium CVE: [GHSA redacted] (Gemfile)
  • Off-boarding risk: anonymized user #1

Changes since last survey

  • 10 commits — 9 feature/other, 1 fixes

By area

  • (root) — 7 commits
  • kaminari-core/lib — 2 commits
  • kaminari-actionview/lib — 1 commit

Notable commits

  • fix: Fix the commit link in CHANGELOG
  • change: Keep eager_load in the total_count query
  • change: Keep includes in the total_count query when they are eager loaded
  • change: Look up paginator partials with LookupContext#find
  • change: Raise MissingTemplate for a missing partial on Rails 8.2
  • change: Support format as a top level option in the pagination helpers
  • change: Test and document the top level format option for all the helpers
  • change: Version 1.3.1
  • change: Version 1.3.2
  • change: Version 1.3.3

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

Survey your own repository

kaminari/kaminari 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 14 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 e3d7834dbafef40ad48935e0623aec2ca93eb7d8 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — 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.65+preprod-36d4cd83012f.