travisjeffery/timecop
65.6
Adequate · 28 September 2026
567
lines of production code
Ruby
primary language
2
measurements over time
What this system is
This system is the Timecop Ruby gem, a library designed to mock system time for testing purposes. It provides capabilities to freeze, travel, and scale time across various Ruby time classes and process clocks. The project includes development tools like an interactive console and comprehensive test coverage to ensure thread-safe operation and compatibility with modern Ruby versions.
Features
Added interactive Ruby console for development
A new executable script at bin/console has been added to the project. This script sets up the bundler environment and launches an interactive Ruby shell (IRB), allowing developers to easily experiment with the gem's code and dependencies during development.
bin · high confidence
Timecop v0.9.11: Initial release with time mocking and scaling capabilities
This entry introduces the Timecop library (version 0.9.11), enabling applications to mock system time for testing purposes. The library provides \Timecop.freeze\ to pause time, \Timecop.travel\ to move time forward or backward, and \Timecop.scale\ to accelerate time passage. It extends \Time\, \Date\, and \DateTime\ classes to respect these mocked states, supports \Process.clock\_gettime\ (CLOCK\_MONOTONIC and CLOCK\_REALTIME), and includes thread-safe operation modes. The implementation handles various argument formats (Time objects, dates, offsets) and integrates with ActiveSupport's Time.zone when available.
lib/timecop · high confidence
Removals
Removal of legacy timecop 0.1.0 gem package
The legacy timecop 0.1.0 package directory has been completely removed from the repository. This deletion eliminates the old gem skeleton, including its build configuration (Rakefile), documentation (README, History), and source files, effectively cleaning up obsolete version artifacts.
pkg, pkg/timecop-0.1.0 · high confidence
Test coverage
Expanded test coverage for date parsing, strptime, and process clock mocking
Added comprehensive test suites for \Date.parse\, \DateTime.parse\, and \Date.strptime\ scenarios, including specific tests for ISO 8601 week dates, year boundary handling, and timezone variations. Introduced tests for the new \Process.clock\_gettime\ mocking feature, verifying that \CLOCK\_MONOTONIC\ and \CLOCK\_REALTIME\ correctly freeze, travel, and scale. Added tests for \TimeStackItem\ initialization with various time types and DST transitions, and verified that Timecop functions correctly when the \date\ library is not loaded.
test · high confidence
Dependencies
Update gemspec and add Gemfile for modern Ruby support
The project now requires Ruby 2.1.0 or higher and has updated its gemspec to use a version constant from the library code instead of a hardcoded string. The gemspec authors have been updated to include Travis Jeffery, and the license is explicitly set to MIT. A new Gemfile has been added to manage development dependencies including rake, nokogiri, pry, mocha, activesupport, tzinfo, i18n, and minitest, along with a conditional dependency on concurrent-ruby for Ruby versions older than 2.7.
(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 → 66 (+0.8)
- Rubric changed (rubric-2026.09.8 → rubric-2026.09.16) — scores are not directly comparable.
Lenses
- Code Health 96 → 96 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 54 → 55 (+0.6)
- Readiness 67 → 69 (+1.7)
- Security 93 → 95 (+1.6)
Resolved (3)
- Hotspot: lib/timecop/time_extensions.rb (lib/timecop/time_extensions.rb)
- Low CVE: [GHSA redacted] (Gemfile)
- Low CVE: [GHSA redacted] (Gemfile)
New (5)
- Ambiguous naming for restoring state. return implies a block-based execution context (like yield), while return_to_baseline implies a direct state reset. It is unclear if return is just an alias for return_to_baseline or if it serves a different internal mechanism.
- Duplicate method signatures for travel with different arities that likely overlap in functionality. The presence of two travel methods with different argument lists suggests an overloaded design that may be confusing or redundant.
- Duplicate setter for the same property. Ruby convention typically uses the assignment operator = for setters, making set_baseline redundant and confusing.
- Redundant methods on Date. Similar to Time, mock_date and today_with_mock_date are semantically overlapping.
- Redundant methods on Time. mock_time and now_with_mock_time appear to serve the same intent of getting the current time under a mock, but with different naming conventions (imperative vs. descriptive).
Changes since last survey
- 1 commits — 1 feature/other, 0 fixes
By area
- .github/workflows — 1 commit
Notable commits
- change: Bump actions/checkout from 5 to 7 (#442)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
travisjeffery/timecop 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 afed38e3897a982d2c2405aec801b98e84cc1930 — 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.