fix: declare the standard library gems the driver requires - #148
Merged
Conversation
Every stdlib library this driver requires, apart from openssl, has stopped being a default gem: base64, date, json, securerandom and timeout. All five were required but none were declared. They only kept working by luck. base64 resolves to a real gem that is present solely because jwt and rubyntlm happen to depend on it; date, securerandom and timeout were being picked up from the interpreter's standard library directory rather than from the bundle. If a transitive dependency drops base64, kitchen-google fails with LoadError: cannot load such file -- base64 which is exactly the failure mode test-kitchen 3.x hits on Ruby 4.0 with benchmark. The floors match what Ruby 3.1, the gem's oldest supported interpreter, ships as default gems, so nothing new is downloaded there. Also: * Remove .github/dependabot.yml. Both Dependabot and Renovate were configured for bundler, so both would open pull requests for the same updates. Renovate is the one actually landing changes in this repo. * Lint spec/ with cookstyle. The exclusion predated the current suite, which passes clean, so the specs are now covered too: 18 files inspected rather than 6. * Drop redcarpet. It was pulled in only as YARD's markdown provider; documentation still builds at 100% coverage without it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Declares the five formerly-stdlib gems this driver requires but never listed, plus three small tooling cleanups.
bundle exec rakeis green: 294 examples, 0 failures, cookstyle clean across 18 files (was 6), YARD still 100%.The problem
Every standard library this driver requires — except
openssl— has stopped being a default gem:base64jwt/rubyntlmdatejsonfaradaysecurerandomtimeoutbase64is the live hazard. It is not in the bundle on its own account — it is there becausejwtandrubyntlmhappen to depend on it. The moment a transitive dependency drops it, this gem fails with:That is byte-for-byte the failure test-kitchen 3.x hits on Ruby 4.0 with
benchmark, which #146 diagnosed. Same bug, different library, this time in our own gemspec.The fix
Floors match what Ruby 3.1 — this gem's oldest supported interpreter — ships as default gems, so nothing new is downloaded there.
On the gem count
Installed gems go 98 → 100, and I want to be straight about that rather than bury it: this makes the dependency surface honest, it does not enlarge it. The driver always used these five. Three of them were simply being taken from the interpreter instead of the bundle. Nothing new is pulled in on any Ruby that still ships them.
I verified the result actually stands on its own — the driver loads with only runtime dependencies present, no development groups:
I also confirmed the built gem packages
lib/kitchen/driver/gce/windows_password.rband declares all seven runtime dependencies.Tooling cleanups
Removed
.github/dependabot.yml. Dependabot (daily, 10 PRs) and Renovate (config:recommended) were both configured for bundler, so both would open pull requests for the same updates. Git history shows Renovate is the one actually landing changes here (#137, #138), making Dependabot vestigial.Specs are now linted.
.rubocop.ymlexcludedspec/**/*, an exclusion that predated the current suite. That suite passes cookstyle clean, so the exclusion is gone and coverage goes from 6 files to 18.Dropped
redcarpet. It was a dev-only C extension serving as YARD's markdown provider. Docs still build at 100% coverage without it.Not changed
I considered replacing
Base64.strict_encode64with[x].pack("m0")andDateTime#rfc3339withstrftime— both verified byte-identical — which would have removed two runtime dependencies outright. Declaring them keeps the cryptographic code readable, which matters more in that particular file.I also left
google-apis-compute_v1at>= 0.75with no upper bound.🤖 Generated with Claude Code