ankane/groupdate
65.3
Adequate · 28 September 2026
827
lines of production code
Ruby
primary language
2
measurements over time
What this system is
This system is a Ruby library that provides time-based data grouping and aggregation capabilities for database queries. It supports multiple database backends, including MySQL, PostgreSQL, SQLite, and Amazon Redshift, through a pluggable adapter architecture. The library allows users to group records by various time intervals such as minutes, hours, days, weeks, months, quarters, and years, while handling time zones and custom start offsets. It is designed to integrate with ActiveRecord and other ORMs, offering configuration options for week and day starts, as well as support for asynchronous query execution.
Behavioural changes
Decoupled ActiveRecord dependency and added multi-adapter support
Groupdate no longer requires ActiveRecord to function, allowing it to be used in non-Rails environments or with other ORMs. The library now supports multiple database backends (MySQL, PostgreSQL, SQLite) via a pluggable adapter system, and integrates with ActiveRecord using Rails' \on\_load\ hook to ensure compatibility with lazy loading. Global configuration options for week start, day start, and time zone have been added, and the library now exposes a \process\_result\ API for integration with gems like ActiveMedian.
lib · high confidence
Rewritten database adapters with new base class and SQLite support
The adapter layer has been refactored to use a new BaseAdapter class that centralizes initialization and time-range filtering logic. MySQL and PostgreSQL adapters now implement specific SQL generation for grouping by various periods (minute, hour, day, week, month, quarter, year) and custom intervals, including handling day-start offsets and week-start days. A new SQLiteAdapter has been added, which uses a custom SQLite function (groupdate\_internal) to handle time zone conversions and date grouping, supporting day, week, month, quarter, and year periods as well as custom intervals. This change introduces support for SQLite and standardizes the adapter interface across all supported databases.
lib/groupdate/adapters · high confidence
Test coverage
Added ActiveRecord test support setup; Added comprehensive test suite for grouping functionality; Added test adapter configuration files for multiple database backends.
Dependencies
Added CI support for ActiveRecord 7.2, 8.0, and Redshift
New gemfiles have been added to the project to enable testing against ActiveRecord versions 7.2 and 8.0, as well as the Redshift adapter. These files define the specific gem dependencies required for continuous integration tests on these platforms, ensuring compatibility with the latest major releases of ActiveRecord and the Amazon Redshift database adapter.
gemfiles · high confidence
Groupdate library updated to version 6.8.0
The Groupdate gem has been upgraded to version 6.8.0. This update includes the core library files for ActiveRecord integration, enumerable support, and the underlying magic/series builder logic, ensuring the library is ready for use with the current application stack.
lib/groupdate · high confidence
Updated dependencies and dropped support for older Ruby and Rails versions
The gem now requires Ruby 3.3+ and Active Support 7.2+, dropping support for older versions. Development dependencies such as rake, minitest, and database adapters (pg, mysql2, trilogy, sqlite3) are now explicitly listed in the Gemfile rather than the gemspec, and the gemspec has been cleaned up with updated metadata and file globs.
(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 → 65 (+0.0)
- Rubric changed (rubric-2026.09.8 → rubric-2026.09.16) — scores are not directly comparable.
Lenses
- Code Health 93 → 93 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 55 → 55 (+0.0)
- Readiness 67 → 67 (+0.0)
- Security 98 → 99 (+0.4)
Resolved (2)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
New (4)
- Conflicting naming and signature for the same core functionality: group_by_period vs group_by. The Enumerable module exposes group_by_period with 4 args, while Groupdate.Magic.Enumerable exposes group_by with 2 or 4 args. This creates confusion about which method to use for grouping by time periods.
- Documentation: no architecture or design documentation (README.md)
- Duplicate operation: process_result is defined on both the main Groupdate module and the internal Groupdate.Magic.Relation class with identical signatures. This suggests either a delegation pattern that is not explicit or a copy-paste error leading to maintenance overhead.
- Inconsistent parameter ordering and naming for similar operations: QueryMethods.group_by_period takes field as the second argument, while Magic.Enumerable.group_by takes enum as the first. This inconsistency in argument position and naming (field vs enum) makes the API unpredictable for developers switching between query and enumerable contexts.
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
ankane/groupdate 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 38570612654e16333c6658eb0b792d023a656097 — 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.