lib/bolt/transport/base.rb in bolt-1.12.0 vs lib/bolt/transport/base.rb in bolt-1.13.0
- old
+ new
@@ -46,10 +46,14 @@
def self.options
raise NotImplementedError,
"self.options() or self.filter_options(unfiltered) must be implemented by the transport class"
end
+ def self.default_options
+ {}
+ end
+
def self.filter_options(unfiltered)
unfiltered.select { |k| options.include?(k) }
end
def self.validate(_options)
@@ -83,9 +87,13 @@
def select_implementation(target, task)
impl = task.select_implementation(target, provided_features)
impl['input_method'] ||= default_input_method(impl['path'])
impl
+ end
+
+ def select_interpreter(executable, interpreters)
+ interpreters[Pathname(executable).extname] if interpreters
end
def reject_transport_options(target, options)
if target.options['run-as']
options.reject { |k, _v| k == '_run_as' }