Method: Object#ruby_exe_options

Defined in:
lib/mspec/helpers/ruby_exe.rb

#ruby_exe_options(option) ⇒ Object



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/mspec/helpers/ruby_exe.rb', line 56

def ruby_exe_options(option)
  case option
  when :env
    ENV['RUBY_EXE']
  when :engine
    case RUBY_NAME
    when 'rbx'
      "bin/rbx"
    when 'jruby'
      "bin/jruby"
    when 'ironruby'
      "ir"
    end
  when :name
    bin = RUBY_NAME + (Config::CONFIG['EXEEXT'] || Config::CONFIG['exeext'] || '')
    File.join(".", bin)
  when :install_name
    bin = Config::CONFIG["RUBY_INSTALL_NAME"] || Config::CONFIG["ruby_install_name"]
    bin << (Config::CONFIG['EXEEXT'] || Config::CONFIG['exeext'] || '')
    File.join(Config::CONFIG['bindir'], bin)
  end
end