kaminari/kaminari
61.0
Adequate · 26 September 2026
1.2k
lines of production code
Ruby
primary language
4
measurements over time
What this system is
This release delivers a major architectural shift by splitting the Kaminari gem into modular components: kaminari-core, kaminari-actionview, and kaminari-activerecord, allowing for more granular dependency management. The core library is now isolated from Rails-specific integrations, enabling Kaminari to be used in non-Rails frameworks like Sinatra or Grape. Additionally, the release includes a critical security fix for the \original\_script\_name\ parameter and introduces new generators and default view templates for consistent pagination UIs.
Features
Add default Kaminari configuration template
A new kaminari\_config.rb template has been added to the kaminari-core generator, providing a default configuration file for Kaminari with all options (such as default\_per\_page, max\_per\_page, window, etc.) commented out, allowing users to easily customize pagination settings.
kaminari-core/lib/generators/kaminari/templates · high confidence
Add default pagination view templates for ERB, Haml, and Slim
The kaminari-core gem now ships with default view templates for pagination components (first, last, next, prev, page, and gap) in ERB, Haml, and Slim formats. These templates provide the standard HTML structure for pagination, including ARIA roles and semantic navigation elements, ensuring consistent and accessible pagination UIs across different template engines.
kaminari-core/app · high confidence
Added Kaminari generators for configuration and views
The Kaminari gem now includes generators to scaffold application files. The \kaminari:config\ generator copies the default configuration file to the application's initializers, while the \kaminari:views\ generator copies or downloads paginator templates for various template engines (ERB, Haml, Slim). The views generator also supports a \--views-prefix\ option to customize the output directory structure.
kaminari-core/lib/generators/kaminari · high confidence
Added bug report template for Kaminari
A new template file has been added to the misc directory to help users reproduce Kaminari issues. The template sets up a minimal Rails environment with ActiveRecord, SQLite3, and the latest versions of kaminari-core and kaminari-activerecord without specifying version numbers, allowing users to create isolated test cases for bug reports.
misc · high confidence
Extracted Active Record extension into a dedicated gem
The Active Record-specific pagination logic has been moved into the new \kaminari-activerecord\ gem, separating it from the core Kaminari library. This includes the \ActiveRecordExtension\ for automatic model inclusion, the \ActiveRecordModelExtension\ for the \page\ method, and the \ActiveRecordRelationMethods\ which implement \total\_count\ and the \without\_count\ mode. The \PaginatableWithoutCount\ module is also included, providing a way to paginate without executing a count query, which improves performance for large datasets where the total count is not required.
kaminari-activerecord/lib/kaminari/activerecord · high confidence
Extracted core pagination logic into kaminari-core gem
The core pagination implementation has been moved into the new kaminari-core gem, introducing PaginatableArray for array pagination and refactoring PageScopeMethods to handle page, per, and padding logic. This includes adding max\_paginates\_per configuration, deprecating max\_pages\_per, and ensuring per(nil) respects max\_per\_page.
kaminari-core/lib/kaminari/models · high confidence
Initial release of kaminari-core gem
The kaminari-core gem is introduced as a standalone package, providing the core libraries for Kaminari. The release includes the MIT license, a changelog redirecting to the main repository, and a README explaining that the gem is primarily an internal dependency automatically bundled with other Kaminari gems.
kaminari-core · high confidence
Initial release of the Kaminari ActionView extension
The Kaminari gem now includes a dedicated ActionView extension, separating ActionView-specific helpers and log subscriber modifications from the core library. This change introduces the \Kaminari::ActionViewExtension\ module, which includes the \ActionView::Context\ in the paginator helper and silences the \LogSubscriber\ to prevent excessive logging of partial renders during pagination.
kaminari-actionview/lib/kaminari/actionview · high confidence
Kaminari core extracted into a standalone gem
The Kaminari library has been restructured by extracting the core functionality into a new \kaminari-core\ gem. This change isolates the primary configuration, exception handling, and helper methods from the main gem, allowing the core to be used independently of the Rails-specific adapters. The core now manages global settings and provides the foundational classes and methods for pagination, while Rails integration is handled separately through an engine and railtie within the core gem.
kaminari-core/lib/kaminari · high confidence
Security
Kaminari 1.2.2 release with Rails 7 support and security fix
Released version 1.2.2, adding support for Rails 7 and fixing a security vulnerability ([CVE redacted]) related to the \original\_script\_name\ parameter. This release also includes several bug fixes, such as restoring the \path\_to\_next\_url\ helper, fixing HTML output for \rel\_next\_prev\_link\_tags\, and addressing Ruby 3 and 2.7 compatibility issues.
(repo-wide) · high confidence
Behavioural changes
Active Record integration moved to dedicated gem
The Active Record extension code has been moved from the core Kaminari gem into a new, separate \kaminari-activerecord\ gem. This change allows applications that use Active Record without Rails to explicitly require the necessary dependencies (\active\_support/lazy\_load\_hooks\) and ensures the extension is loaded via \ActiveSupport.on\_load :active\_record\. Users relying on the previous structure will need to include the new gem to access Active Record pagination features.
kaminari-activerecord/lib/kaminari · medium confidence
Extracts Action View integration into a dedicated gem
The Action View integration code has been moved from the core Kaminari gem into a separate \kaminari-actionview\ gem. This change decouples Kaminari from Rails, allowing the library to be used in non-Rails applications that utilize Action View. The new gem explicitly requires \active\_support/lazy\_load\_hooks\ and hooks into \:action\_view\ to include Kaminari's helper methods, ensuring the functionality is only loaded when Action View is present.
kaminari-actionview/lib/kaminari · medium confidence
Kaminari Action View gem restructured and relocated
The kaminari-actionview gem has been moved to the kaminari organization and restructured as a standalone component. The directory now includes its own CHANGELOG.md, MIT-LICENSE, and README.md files. The README clarifies that this gem is primarily an internal dependency for the main kaminari gem but can be used explicitly with other web frameworks. The CHANGELOG redirects users to the main repository's changelog for version history.
kaminari-actionview · medium confidence
Kaminari Active Record adapter is now a separate gem
The Kaminari Active Record adapter has been separated into its own gem, kaminari-activerecord. Users can now install it explicitly via the gem 'kaminari-activerecord' in their Gemfile, though it will still be automatically bundled with the main kaminari gem. The CHANGELOG for this specific component now redirects users to the main Kaminari repository for change history.
kaminari-activerecord · high confidence
Refactored pagination helpers and added URL generation methods
The pagination helper methods have been reorganized into a dedicated \helper\_methods.rb\ file, extracting URL generation logic into a new \UrlHelper\ module. This introduces \next\_page\_url\, \prev\_page\_url\, and their aliases (\url\_to\_next\_page\, \url\_to\_prev\_page\, etc.) for generating full URLs to adjacent pages. The \paginate\ method now accepts keyword arguments for clearer API usage, and the \Paginator\ class has been updated to support keyword arguments for better explicitness. Additionally, the \Tag\ class now handles parameter conversion more robustly, and deprecated usage of \ActiveSupport::Deprecation\ has been removed.
kaminari-core/lib/kaminari/helpers · medium confidence
Simplified library loading with explicit component requirements
The main Kaminari library now explicitly requires its core, version, ActionView, and ActiveRecord components. This change removes the previous automatic loading of all components, meaning users must now explicitly require the specific components they need (e.g., \kaminari/activerecord\) if they are not using the default Rails setup, ensuring cleaner dependency management and better compatibility with non-Rails frameworks like Sinatra or Grape.
lib · high confidence
Test coverage
Add test fixtures and templates for Kaminari pagination; Add test fixtures for ActiveRecord models and schema; Add test helper for RSpec/Unit-Test integration; Added comprehensive test coverage for ActiveRecord pagination methods; Added comprehensive test coverage for Kaminari helpers; Added integration tests for pagination navigation and request format handling; Added test helper for simulating gem subclassing behavior; Added tests for PaginatableArray and configuration methods; Added unit tests for Kaminari configuration and generator helpers; Removal of obsolete placeholder test files.
Dependencies
Kaminari Core version updated to 1.2.2
The Kaminari Core library has been updated to version 1.2.2, as reflected in the version constant in the codebase.
kaminari-core/lib/kaminari/core, lib/kaminari · high confidence
Split Kaminari into modular sub-gems
The Kaminari gem has been restructured into separate, independent gems: kaminari-core, kaminari-actionview, and kaminari-activerecord. The main kaminari gem now depends on these three sub-gems, allowing users to install only the adapters they need (e.g., ActiveRecord or ActionView) rather than the entire suite. This modularization improves dependency management and reduces unnecessary pulls for users not using all components.
(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 48 → 61 (+13.4)
- Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 99 (-0.7)
- Architecture 69 → 69 (+0.0)
- Maturity 55 → 46 (-9.3)
- Readiness 26 → 62 (+36.3)
- Security 85 → 100 (+14.5)
- Domain Modelling 100 (new)
Resolved (7)
- Coverage not measured — test suite did not build
- 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 (20)
- ActiveRecordRelationMethods.total_count (cognitive 16) (kaminari-activerecord/lib/kaminari/activerecord/active_record_relation_methods.rb)
- Ambiguous configuration access. configure typically implies a block-based configuration pattern (like Rails config), while config implies returning the configuration object. Having both without clear distinction in the public API surface can confuse users on how to modify settings.
- Confusingly similar method names with potentially overlapping or unclear semantics. paginates_per, max_paginates_per, and max_pages_per are difficult to distinguish in intent. max_pages_per is particularly ambiguous (is it max pages or max items per page?).
- Duplicate intent for array pagination. Kaminari.paginate_array is a convenience wrapper that internally instantiates PaginatableArray. Exposing both the factory method and the class constructor creates confusion about which entry point users should use.
- Floating git dependency: actionview
- Floating git dependency: actionview
- Floating git dependency: activerecord
- Floating git dependency: activerecord
- Floating git dependency: railties
- Floating git dependency: railties
- High: security finding (details withheld)
- High: security finding (details withheld)
- Inconsistent method signature for total_count. One accepts arguments for column/options, the other does not. This suggests different behaviors or contexts for the same logical operation, which is confusing for users expecting consistent behavior across paginatable objects.
- Inconsistent naming convention for URL helpers. The API mixes _url and _path suffixes with path_to_ prefixes (e.g., path_to_next_url vs next_page_path). This suggests a lack of clear distinction between full URLs and relative paths, or redundant methods that do the same thing with different naming patterns.
- Low CVE: [GHSA redacted] (Gemfile)
- No dependency advisory monitoring
- Orphaned files with no living knowledge
- TodoComment (kaminari-core/lib/kaminari/helpers/tags.rb)
- TodoComment (kaminari-core/lib/kaminari/helpers/tags.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
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 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 76511e3c2c09d8adcd3a686d2c3ec6829a98f37e — 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-d0929f7ac71f.