Skip to content

#913: Require FakeOctokit dependencies - #1394

Closed
gemshrine wants to merge 1 commit into
zerocracy:masterfrom
gemshrine:913
Closed

gemshrine wants to merge 1 commit into
zerocracy:masterfrom
gemshrine:913

Conversation

@gemshrine

Copy link
Copy Markdown
Contributor

Fixes #913

Cause

fbe/fake_octokit uses Veil in rate_limit and Octokit::NotFound in its error paths, but the file did not load those dependencies itself. Requiring the documented entry point in a fresh Ruby process therefore failed when one of those methods ran. The file also relied on the Fbe namespace having been loaded by another entry point.

Change

The fake client now requires Octokit, Veil, and the gem's root file directly, so its documented entry point can be used on its own.

Test coverage

A subprocess test starts a fresh Ruby interpreter, requires fbe/fake_octokit, calls rate_limit, and exercises the Octokit::NotFound path. Run it with bundle exec ruby -Itest test/fbe/test_octo.rb --name test_fake_octokit_can_be_required_on_its_own; repository CI also runs the full Rake test suite.

@gemshrine

Copy link
Copy Markdown
Contributor Author

Closing this duplicate. PR #917 already addresses #913; I moved the standalone Fbe namespace require and fresh-process regression coverage into #917, which remains the PR for this issue.

@gemshrine gemshrine closed this Oct 3, 2026
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.

fake_octokit.rb uses Veil and Octokit without requiring them, so requiring it alone breaks rate_limit

1 participant