Class: MultiRubyRunner::VersionManager::None

Inherits:
MultiRubyRunner::VersionManager show all
Defined in:
lib/multi_ruby_runner/version_manager/none.rb

Overview

Represents a ruby environment without a version manager. In this case the Ruby engine invocation must be given via the options. Example: “jruby -S”

Instance Method Summary collapse

Methods inherited from MultiRubyRunner::VersionManager

detect, #initialize

Constructor Details

This class inherits a constructor from MultiRubyRunner::VersionManager

Instance Method Details

#compute_process_args(command_string, directory, options) ⇒ Hash

See MultiRubyRunner#execute_command_in_directory

Returns:

  • (Hash)

    entire_command: includes shell invocation, ruby engine invocation,
                    and command
    blocking: Boolean
    environment_overrides: {
    

    }



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/multi_ruby_runner/version_manager/none.rb', line 17

def compute_process_args(command_string, directory, options)
  if '' == options[:ruby_engine_invocation_override].to_s.strip
    raise "No :ruby_engine_invocation_override given!"
  end
  ruby_command = [
    options[:ruby_engine_invocation_override], # Example: "jruby -S"
    command_string, # execute command
  ].join(' ')
  shell_command_string = ["cd #{ directory }", ruby_command].join('; ')
  {
    entire_command: [
      options[:shell_invocation],
      shell_command_string,
    ].join(' '),
    blocking: options[:blocking],
    environment_overrides: {},
  }
end