Class: Kitchen::Transport::Dokken
- Inherits:
-
Base
- Object
- Base
- Kitchen::Transport::Dokken
- Defined in:
- lib/kitchen/transport/dokken.rb
Overview
A Transport which uses Docker tricks to execute commands and transfer files.
Defined Under Namespace
Classes: Connection
Instance Method Summary collapse
- #connection(state, &block) ⇒ Object
-
#docker_for_mac_or_win? ⇒ TrueClass, FalseClass
Detect whether or not we are running in Docker for Mac or Windows.
Instance Method Details
#connection(state, &block) ⇒ Object
58 59 60 61 62 63 64 65 66 |
# File 'lib/kitchen/transport/dokken.rb', line 58 def connection(state, &block) = (config.to_hash.merge(state)) if @connection && @connection_options == reuse_connection(&block) else create_new_connection(, &block) end end |
#docker_for_mac_or_win? ⇒ TrueClass, FalseClass
Detect whether or not we are running in Docker for Mac or Windows
220 221 222 223 224 |
# File 'lib/kitchen/transport/dokken.rb', line 220 def docker_for_mac_or_win? ::Docker.info(::Docker::Connection.new(config[:docker_host_url], {}))["Name"] == "docker-desktop" rescue false end |