From 5c6193007ff73aeabccf24c074193ba56f0aca05 Mon Sep 17 00:00:00 2001 From: Andrew Bobulsky Date: Wed, 3 Jul 2024 14:28:24 -0400 Subject: [PATCH] fix: re-require lib/docker/version.rb The verifier doesn't work without it. Not sure why it was removed, but I know base PR was ongoing. Signed-off-by: Andrew Bobulsky --- lib/docker/version.rb | 24 ++++++++++++------------ lib/kitchen/transport/docker.rb | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/docker/version.rb b/lib/docker/version.rb index 257add8..1b4cb1c 100644 --- a/lib/docker/version.rb +++ b/lib/docker/version.rb @@ -11,15 +11,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -# begin -# require "docker" -# -# # Override API_VERSION constant in docker-api gem to use version 1.24 of the Docker API -# # This override is for the docker-api gem to communicate to the Docker engine on Windows -# module Docker -# VERSION = "0.0.0".freeze -# API_VERSION = "1.24".freeze -# end -# rescue LoadError => e -# logger.debug("[Docker] docker-api gem not found for InSpec verifier. #{e}") -# end +begin + require "docker" + + # Override API_VERSION constant in docker-api gem to use version 1.24 of the Docker API + # This override is for the docker-api gem to communicate to the Docker engine on Windows + module Docker + VERSION = "0.0.0".freeze + API_VERSION = "1.24".freeze + end +rescue LoadError => e + logger.debug("[Docker] docker-api gem not found for InSpec verifier. #{e}") +end diff --git a/lib/kitchen/transport/docker.rb b/lib/kitchen/transport/docker.rb index 0119eb5..2cc40a3 100644 --- a/lib/kitchen/transport/docker.rb +++ b/lib/kitchen/transport/docker.rb @@ -18,7 +18,7 @@ require_relative "../docker/helpers/inspec_helper" -# require_relative "../../docker/version" +require_relative "../../docker/version" require_relative "../../train/docker" module Kitchen