Skip to content
CAI
Software that uses CAICheck a score

ice-cube-ruby/ice_cube

66.9

Adequate · 19 September 2026

3.4k

lines of production code

Ruby

primary language

1

measurement over time

CAI band scale
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 watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 67.

Lenses

  • Code Health 96
  • Architecture 100
  • Maturity 50
  • Readiness 65
  • Security 100

Changes since last survey

  • 300 commits — 255 feature/other, 45 fixes

By area

  • lib/ice_cube — 92 commits
  • (root) — 80 commits
  • (repo) — 57 commits
  • spec/examples — 42 commits
  • config/locales — 18 commits
  • spec/spec_helper.rb — 5 commits
  • .github/workflows — 3 commits
  • .devcontainer/devcontainer.json — 1 commit
  • lib/ice_cube.rb — 1 commit
  • spec/rules — 1 commit

Notable commits

  • fix: DST hour_of_day realign bugfix (#464)
  • fix: Fix DST offset for occurs_on using local times
  • fix: Fix I18n.load_path injection (#546)
  • fix: Fix changelog
  • fix: Fix core extension load order between ActiveSupport and I18n
  • fix: Fix day of year with negative offsets
  • fix: Fix documentation links in README.md (#527)
  • fix: Fix docuomentation link in README.md (#496)
  • fix: Fix double DST occurrences (#404)
  • fix: Fix double occurrences in end of DST
  • fix: Fix february in readme example
  • fix: Fix first weekly occurrences with non-Sunday week start (#383)
  • fix: Fix incorrect variable name in previous_occurrences.
  • fix: Fix initial issues identified by standard
  • fix: Fix invalid references in isolated tests
  • fix: Fix links from rubygems page
  • fix: Fix misaligned first weekly occurrence
  • fix: Fix misaligned first weekly occurrence
  • fix: Fix module reference in spec
  • fix: Fix offset bug when day of start_time does not align with specified day rule (#452)
  • …and 280 more

Written by watchdog.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 19 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 32ff145baf152ae4aa130376d66041eba174b085 — 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-13a154b7f5d1.