Skip to content

Create default temporary directories when first used - #82

Merged
dblock merged 1 commit into
masterfrom
dblock/lazy-data-directories
Nov 20, 2026
Merged

dblock merged 1 commit into
masterfrom
dblock/lazy-data-directories

Conversation

@dblock

@dblock dblock commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Summary

Package::RubyGem and SourceControl::Git called Dir.mktmpdir in their constructors when no directory: or RELEASE_DATA_DIR was given. Projects build their workflow in the Rakefile, so every local rake or rake -T left two empty ruby-gem-release-* directories behind (reported in the review of ruby-grape/grape#3078). Both now create the directory the first time release data is read or written. Explicit and RELEASE_DATA_DIR directories are unchanged.

Validation

  • bundle exec rake: RuboCop and all unit and integration specs pass.
  • New specs show that construction creates no directory and that first use creates one.
  • With a fresh TMPDIR and no RELEASE_DATA_DIR, bundle exec rake -T in this repository leaves 2 directories on master and none on this branch.

This PR was written by an AI (Claude) acting on behalf of @dblock.

🤖 Generated with Claude Code

https://claude.ai/code/session_011Gr21j6KD4oksnhmZ5u3pr

`Package::RubyGem` and `SourceControl::Git` called `Dir.mktmpdir` while
being constructed, so loading a workflow outside a release, such as
running `rake` or `rake -T` locally, left two empty directories behind.
Create them when release data is first read or written instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Gr21j6KD4oksnhmZ5u3pr
@dblock
dblock added this pull request to stack #84 November 20, 2026 22:16
@dblock
dblock merged commit 26d85d2 into master Nov 20, 2026
11 checks passed
@dblock
dblock deleted the dblock/lazy-data-directories branch November 20, 2026 22:55
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