Skip to content

Document Gem.loaded_specs for release Gemfile tasks - #98

Merged
dblock merged 1 commit into
masterfrom
dblock/release-gemfile-loaded-specs
Nov 22, 2026
Merged

dblock merged 1 commit into
masterfrom
dblock/release-gemfile-loaded-specs

Conversation

@dblock

@dblock dblock commented Nov 22, 2026

Copy link
Copy Markdown
Owner

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

The Release Gemfile docs told users to wrap the release task setup in rescue LoadError. That also swallows a genuine load failure inside ruby-gem-release or its dependencies (e.g. commonmarker), so the release tasks silently disappear and the workflow later fails with a missing task instead of the real error.

This replaces it with a Rakefile example that installs the tasks only when Gem.loaded_specs.key?('ruby-gem-release'), i.e. when the gem is in the active bundle, and explains why.

Used in codegram/hyperclient#341: with ruby-gem-release installed globally, the main bundle loads no release tasks and BUNDLE_GEMFILE=gemfiles/release.gemfile loads them.

Validation

  • bundle exec rubocop (including rubocop-md on the Ruby snippet, rubocop-prose and rubocop-spellcheck): no offenses. Docs-only change.

#97 also edits the line before this sentence in docs/actions/release.md; whichever merges second may need a trivial rebase.

🤖 Generated with Claude Code

https://claude.ai/code/session_011Gr21htyJfr8XZGHBcPwkW

Recommend installing the release tasks only when ruby-gem-release is in
the active bundle instead of rescuing LoadError, which also hides real
load failures in the gem or its dependencies and silently drops the
release tasks.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Gr21htyJfr8XZGHBcPwkW
@dblock
dblock merged commit 4389652 into master Nov 22, 2026
11 checks passed
@dblock
dblock deleted the dblock/release-gemfile-loaded-specs branch November 22, 2026 15:12
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