Skip to content

Modernize: gemspec, CI, tests on Spectrum - #5

Merged
trans merged 2 commits into
masterfrom
modernize
Nov 26, 2026
Merged

trans merged 2 commits into
masterfrom
modernize

Conversation

@trans

@trans trans commented Nov 25, 2026

Copy link
Copy Markdown
Member

Autoreload still worked on current Ruby. This brings its packaging and tests up to date and fixes what turned up on the way.

Changes

  • Reloader#update is public, to check for changes at once without the thread.
  • The interval can be a fraction of a second. Before, it was rounded down, so an interval under one second made the thread spin.
  • The verbose list of watched files goes to standard error, like the reload reports.
  • The Ruby 1.8 code is gone.

Fixes

  • A change made in the same second as the last load was missed, because times were compared in whole seconds.
  • A file that failed to reload (a syntax error, say) was tried again at every interval. It is now tried again only when it next changes.

Packaging and tests

  • A plain autoreload.gemspec in place of the generated one, Rakefile, CI on Ruby 3.1 to 4.0; version 1.3.0 (unreleased).
  • 12 tests on Spectrum, replacing the two Minitest specs. They set file times instead of sleeping, so the suite takes a quarter of a second.
  • The README says what is watched and that a reload removes nothing first.

🤖 Generated with Claude Code

trans and others added 2 commits November 25, 2026 14:21
Reloader#update is public, the interval may be fractional, modification
times are compared in full, and a file that fails to reload is not tried
again until it changes. The Ruby 1.8 code is gone.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@trans
trans merged commit bd5e34b into master Nov 26, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant