docs: reach 100% YARD coverage and add doc rake tasks - #57
Merged
Conversation
kitchen-cloudstack was at 65% under --private: 22 of 44 methods, four constants, and the Kitchen::Driver namespace were undocumented, and there was no way to generate or measure docs. Document the rest and add .yardopts plus `rake doc` / `rake doc_coverage`. create, destroy, and status carried `# (see Base#create)` reference directives, which YARD does not count as documentation and which told a reader nothing about what this driver does differently -- destroy tearing down the public address before the instance, status mapping CloudStack's own state names. They now have real docstrings and the stranded directives are gone. The four undocumented constants were JOB_SUCCEEDED, JOB_FAILED, and both DEFAULT_* timeouts. They sat under a comment attached only to JOB_RUNNING, so each now carries its own. Comments only. Verified with 63 examples, 0 failures and cookstyle clean. 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.
What
Measured with
--private,kitchen-cloudstackwas at 65% — 22 of 44 methods, four constants, and theKitchen::Drivernamespace undocumented — with no way to generate or measure docs..yardoptsadded as the single source of truth.rake docandrake doc_coverageadded;yardin a:docsbundle group.Two things worth calling out
create,destroy, andstatushad# (see Base#create)directives. YARD doesn't count those as documentation, and more importantly they told a reader nothing about what this driver does differently —destroytears down the public address, port forward, and firewall rule before the instance and then scrubs credentials from the state file;statusmaps CloudStack's own state names onto Test Kitchen's live/not-live. They now have real docstrings, and the stranded directives are removed rather than left sitting above the new prose.The four undocumented constants shared one comment.
JOB_SUCCEEDED,JOB_FAILED,DEFAULT_POLL_INTERVAL, andDEFAULT_TIMEOUTsat beneath a comment that YARD attached only toJOB_RUNNING:Each now carries its own, and the two
DEFAULT_*constants name the config option that overrides them.Verification
Comments only — no behaviour change.
🤖 Generated with Claude Code