Class: Kitchen::Driver::Static::Queueing::Script
- Defined in:
- lib/kitchen/driver/queueing/script.rb
Instance Attribute Summary
Attributes inherited from Base
#banner, #env_vars, #options, #release_options, #request_options
Instance Method Summary collapse
Methods inherited from Base
#banner?, descendants, #initialize, #release, #request
Constructor Details
This class inherits a constructor from Kitchen::Driver::Static::Queueing::Base
Instance Method Details
#handle_release(_state) ⇒ Object
30 31 32 |
# File 'lib/kitchen/driver/queueing/script.rb', line 30 def handle_release(_state) execute([:execute]) end |
#handle_request(_state) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/kitchen/driver/queueing/script.rb', line 18 def handle_request(_state) stdout = execute([:execute]) matched = stdout.match([:match_hostname]) raise format("Could not extract hostname from '%s' with regular expression /%s/", stdout, [:match_hostname]) unless matched # Allow additional feedback from command @banner = stdout.match([:match_banner])&.captures&.first if [:match_banner] matched.captures.first end |
#setup(_kitchen_options) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/kitchen/driver/queueing/script.rb', line 9 def setup() ({ match_hostname: "^(.*)$", match_banner: nil, }) ({}) end |