Skip to content
CAI
Software that uses CAICheck a score

ice-cube-ruby/ice_cube

61.6

Adequate · 6 November 2026

3.4k

lines of production code

Ruby

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is the IceCube scheduling library, a Ruby gem designed for defining and calculating recurring time intervals and schedules. It provides a rule engine that supports various recurrence frequencies, complex constraints like BYSETPOS, and robust handling of time zones and daylight saving time transitions. The library enables users to create, serialize, and deserialize schedules using multiple formats including iCal, YAML, and Hash, while offering human-readable string representations of recurrence rules.

Features

Initial project structure and documentation

The repository is initialized with core project files including a Gemfile, Rakefile, and .gitignore, alongside comprehensive documentation in README.md, CHANGELOG.md, and UPGRADING.md. The README provides usage examples for the ice\_cube scheduling library, while the CHANGELOG documents the history of changes from version 0.9.3 through 0.17.0, including support for BYSETPOS, Ruby 2.6+ compatibility, and various bug fixes for DST and weekly intervals.

(repo-wide) · high confidence

New builder classes for serializing rules to Hash, iCal, and human-readable strings

The library now includes dedicated builder classes in lib/ice\_cube/builders to handle serialization of recurrence rules. HashBuilder converts rules into a structured hash representation, IcalBuilder formats rules into iCal-compatible strings (utilizing I18n for time formatting), and StringBuilder generates human-readable text descriptions of rules (leveraging I18n for localization of connectors, ordinals, and formats). These components replace or supplement previous inline serialization logic, providing a cleaner, more modular approach to rule output.

_lib/ice\cube/builders · high confidence

New dedicated parsers for iCal, YAML, and Hash formats

IceCube now includes dedicated parser classes (IcalParser, YamlParser, HashParser) to handle schedule deserialization from iCal strings, YAML, and Ruby hashes. The IcalParser adds support for parsing RDATE lines and BYSETPOS recurrence rules, while the YamlParser ensures compatibility with Ruby 3.1+ keyword arguments for YAML.safe\_load. These changes provide a more structured and robust way to load schedules from various data formats.

_lib/ice\cube/parsers · high confidence

Behavioural changes

IceCube v0.17.0: Major refactoring of rule engine and schedule API

IceCube has been updated to version 0.17.0, introducing a significant architectural shift in how recurrence rules are processed and validated. The library now uses a centralized \ValidatedRule\ class with a strict, ordered validation pipeline (defined in \VALIDATION\_ORDER\) to calculate occurrences, replacing the previous per-rule \occurs\_on?\ logic found in the now-removed \DailyRule\, \WeeklyRule\, \MonthlyRule\, and \YearlyRule\ files. This change improves performance and consistency, particularly for complex intervals and DST handling. The \Schedule\ API has also been modernized: date-based methods like \start\_date\ and \rdate\ are deprecated in favor of time-aware equivalents (\start\_time\, \add\_recurrence\_time\), and the schedule now supports block-based configuration. New features include a \FlexibleHash\ for robust serialization/deserialization, an \InputAlignment\ validator to enforce RFC-compliant interval constraints, and a new \Occurrence\ class that wraps start/end times while delegating to Time for compatibility.

_lib/ice\cube · high confidence

Library structure refactored with lazy loading and runtime format configuration

The IceCube library has been restructured to use lazy loading (autoload) for its core components, including Rules, Schedules, Occurrences, Builders, Parsers, and Validations, replacing the previous eager requires. This change introduces a configurable \to\_s\_time\_format\ setting, allowing users to customize the date format used when printing schedule strings at runtime, and adds a \compatibility\ setting to manage backward compatibility with schedules exported from older library versions.

lib · high confidence

Recalculated recurrence validation architecture with BYSETPOS support

The recurrence validation logic has been completely restructured from a monolithic implementation into a modular system of distinct validation classes (e.g., \DailyInterval\, \WeeklyBySetPos\, \Count\). This change introduces native support for the RFC 5545 \BYSETPOS\ rule part across all frequency types (daily through yearly), allowing users to select specific occurrences within an interval (e.g., the first Monday). It also refines interval handling for daily, weekly, monthly, and yearly schedules, improves DST adjustment logic, and adds explicit validation for occurrence counts and end times.

_lib/ice\cube/validations · high confidence

Recurrence rules refactored to use a unified ValidatedRule base class

The recurrence rule implementations (Daily, Hourly, Minutely, Monthly, Weekly, Yearly, and Secondly) have been restructured to inherit from a new \ValidatedRule\ base class and compose their behavior through specific validation modules (e.g., \Validations::DailyInterval\, \Validations::HourlyBySetPos\). This change standardizes how rules handle intervals, BYSETPOS constraints, and time-part locking (e.g., \schedule\_lock\), ensuring consistent argument handling and validation logic across all rule types. For users, this means more reliable recurrence calculations, particularly for edge cases like weekly realignment and interval jumps, while maintaining the same public API for defining schedules.

_lib/ice\cube/rules · high confidence

Test coverage

Expanded test coverage for recurrence rules, time zones, and serialization

Added comprehensive specs for the IceCube scheduling library, including detailed tests for BYSETPOS handling in weekly and monthly rules, robust Daylight Saving Time boundary crossing in both local and UTC contexts, and correct time zone preservation when using ActiveSupport's TimeWithZone. The suite also validates serialization round-trips (YAML, Hash, and iCal), ensuring that rules, schedules, and occurrences maintain their state and time zone information correctly across conversions.

spec · high confidence

Dependencies

Add Gemfile and update gemspec for modern Ruby compatibility

The project now includes a Gemfile and an updated gemspec to support modern Ruby versions (3.3+ and 3.4+). Explicit dependencies for \base64\, \bigdecimal\, \mutex\_m\, \ostruct\, \logger\, and \benchmark\ are added to the Gemfile to silence deprecation warnings in newer Ruby releases. The gemspec defines development dependencies for \rake\, \rspec\ (\> 3), \standard\, and \benchmark\, while runtime dependencies on \activesupport\, \i18n\, and \tzinfo\ are managed via the Gemfile with version constraints compatible with Rails 3.0+.

(dependencies) · 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 62 → 62 (+0.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 74 → 74 (+0.0)
  • Architecture 96 → 96 (+0.0)
  • Maturity 46 → 46 (+0.0)
  • Readiness 67 → 67 (+0.0)
  • Security 100 → 100 (+0.0)

Resolved (3)

  • Duplicate intent: Both methods take a time argument and appear to check if the schedule occurs at that specific time. Having two methods with different verb forms for the exact same signature and likely same logic is a clear inconsistency.
  • Duplicate intent: Two methods exist that appear to check if a schedule has occurrences within a specific time range. The parameter names differ slightly ('begin_time' vs 'opening_time'), but the semantic intent is identical. This creates confusion for users about which to use.
  • Inconsistent naming pattern: The API mixes 'occurs_X?' and 'occurring_X?' verb forms for similar predicate checks. 'occurs_on?' checks a date, 'occurring_at?' checks a time. While the distinction between date and time is valid, the inconsistent verb tense (simple present vs. present participle) is confusing.

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

Survey your own repository

ice-cube-ruby/ice_cube 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 6 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 32ff145baf152ae4aa130376d66041eba174b085 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — 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.2+preprod-5c4e66d9318b.