Class: Kitchen::Transport::ExpressSsh
- Inherits:
-
Ssh
- Object
- Ssh
- Kitchen::Transport::ExpressSsh
- Defined in:
- lib/kitchen/transport/express_ssh.rb
Defined Under Namespace
Classes: Connection
Instance Method Summary collapse
- #create_new_connection(options, &block) ⇒ Object
- #finalize_config!(instance) ⇒ Object
- #verifier_defined?(instance) ⇒ Boolean
Instance Method Details
#create_new_connection(options, &block) ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/kitchen/transport/express_ssh.rb', line 29 def create_new_connection(, &block) if @connection logger.debug("[#{LOG_PREFIX}] Shutting previous connection #{@connection}") @connection.close end = @connection = self.class::Connection.new(, &block) end |
#finalize_config!(instance) ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'lib/kitchen/transport/express_ssh.rb', line 43 def finalize_config!(instance) return unless verifier_defined?(instance) super.tap do instance.verifier.send(:define_singleton_method, :runner_options_for_expressssh) do |config_data| (config_data) end end end |
#verifier_defined?(instance) ⇒ Boolean
39 40 41 |
# File 'lib/kitchen/transport/express_ssh.rb', line 39 def verifier_defined?(instance) defined?(Kitchen::Verifier::Inspec) && instance.verifier.is_a?(Kitchen::Verifier::Inspec) end |