From 8c635497317271a55a5bcc21668fa75a12f5a848 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Sat, 29 Aug 2026 19:48:35 -0700 Subject: [PATCH] docs: complete the YARD tags on connection and run_command `Transport::Docker#connection` accepts a block but only documented its `state` argument, so the block was missing from the generated signature. Document it as what it is: a proc forwarded to the connection's constructor, which yields the new connection to it without closing it. `CliHelper#run_command` documented its `@raise` as `Kitchen::ShellCommandFailed`, which is not a class that exists. The bare `ShellCommandFailed` the method raises resolves through the included `Kitchen::ShellOut` mixin to `Kitchen::ShellOut::ShellCommandFailed`, so the tag rendered as an unlinked literal instead of a link to the real class. Comments only; no behaviour change. Signed-off-by: Tim Smith --- lib/kitchen/docker/helpers/cli_helper.rb | 2 +- lib/kitchen/transport/docker.rb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/kitchen/docker/helpers/cli_helper.rb b/lib/kitchen/docker/helpers/cli_helper.rb index 8e3086b5..fe3acc4a 100644 --- a/lib/kitchen/docker/helpers/cli_helper.rb +++ b/lib/kitchen/docker/helpers/cli_helper.rb @@ -107,7 +107,7 @@ def docker_sudo_opts(options = {}) # @param cmd [String] the command to run # @param options [Hash] shell-out options # @return [String] combined stdout and stderr - # @raise [Kitchen::ShellCommandFailed] if the command exits non-zero + # @raise [Kitchen::ShellOut::ShellCommandFailed] if the command exits non-zero def run_command(cmd, options = {}) if options.fetch(:use_sudo, false) cmd = "#{options.fetch(:sudo_command, "sudo -E")} #{cmd}" diff --git a/lib/kitchen/transport/docker.rb b/lib/kitchen/transport/docker.rb index fe916b2b..9669ac7f 100644 --- a/lib/kitchen/transport/docker.rb +++ b/lib/kitchen/transport/docker.rb @@ -83,6 +83,8 @@ class DockerFailed < TransportFailed; end # than from Test Kitchen's configuration. # # @param state [Hash] instance state naming the container + # @param block [Proc, nil] forwarded to the connection's constructor, which + # yields the new connection to it; the connection is not closed afterwards # @yieldparam connection [Connection] if a block is given # @return [Connection] def connection(state, &block)