Class: Proxy::RemoteExecution::Ssh::Plugin
- Inherits:
-
Plugin
- Object
- Plugin
- Proxy::RemoteExecution::Ssh::Plugin
- Defined in:
- lib/smart_proxy_remote_execution_ssh/plugin.rb
Constant Summary collapse
- SSH_LOG_LEVELS =
%w[debug info error fatal].freeze
- MODES =
%i[ssh async-ssh pull pull-mqtt].freeze
Class Method Summary collapse
Class Method Details
.runner_class ⇒ Object
45 46 47 48 49 50 51 52 53 |
# File 'lib/smart_proxy_remote_execution_ssh/plugin.rb', line 45 def self.runner_class @runner_class ||= if simulate? Runners::FakeScriptRunner elsif settings.mode == :'ssh-async' Runners::PollingScriptRunner else Runners::ScriptRunner end end |
.simulate? ⇒ Boolean
41 42 43 |
# File 'lib/smart_proxy_remote_execution_ssh/plugin.rb', line 41 def self.simulate? @simulate ||= %w[yes true 1].include? ENV.fetch('REX_SIMULATE', '').downcase end |