Class: RubyConfig::Runtimes::JRubyRuntime

Inherits:
RubyConfig::RuntimeBase show all
Defined in:
lib/ruby_config/runtimes/jruby_runtime.rb

Constant Summary collapse

VERSION =
'1.3.1'
JRUBY_DIR =
"jruby-#{VERSION}"
JRUBY_ARCHIVE =
"jruby-bin-#{VERSION}.tar.gz"
JRUBY_DOWNLOAD_URL =
"http://dist.codehaus.org/jruby/#{VERSION}/#{JRUBY_ARCHIVE}"

Instance Attribute Summary

Attributes inherited from RubyConfig::RuntimeBase

#install_path, #tmp_path

Instance Method Summary collapse

Methods inherited from RubyConfig::RuntimeBase

#additional_library_path, #already_installed?, #archive_path, #create_directory_structure, #default_library_path, #delete, #do_install, #gem_bin_path, #gem_executable_path, #initialize, #irb_executable_path, #major_version, #prepare_install, #ruby_bin_path, #ruby_executable_path, #ruby_home_path, #rubygems_installed?, #to_s

Constructor Details

This class inherits a constructor from RubyConfig::RuntimeBase

Instance Method Details

#archive_download_urlObject



25
26
27
# File 'lib/ruby_config/runtimes/jruby_runtime.rb', line 25

def archive_download_url
  JRUBY_DOWNLOAD_URL
end

#archive_file_nameObject



21
22
23
# File 'lib/ruby_config/runtimes/jruby_runtime.rb', line 21

def archive_file_name
  JRUBY_ARCHIVE
end

#descriptionObject



17
18
19
# File 'lib/ruby_config/runtimes/jruby_runtime.rb', line 17

def description
  "JRuby #{VERSION}"
end

#gem_home_pathObject



29
30
31
# File 'lib/ruby_config/runtimes/jruby_runtime.rb', line 29

def gem_home_path
  File.join(ruby_home_path, 'lib', 'ruby', 'site_ruby', major_version)
end

#handleObject



13
14
15
# File 'lib/ruby_config/runtimes/jruby_runtime.rb', line 13

def handle
  "jruby-#{VERSION}"
end

#installObject

only required for nailgun support def bash_alias

{'ruby_ng', 'jruby --ng', 
 'ruby_ng_server', 'jruby --ng-server'}

end



39
40
41
42
43
44
45
46
# File 'lib/ruby_config/runtimes/jruby_runtime.rb', line 39

def install  
  extract_tar_gz(File.join(@tmp_path, archive_file_name), @tmp_path)
  
  copy_archive_content_to_ruby_directory
  
  set_symlinks_for_jruby_commands
  chmod_executables
end

#post_installObject



48
49
50
# File 'lib/ruby_config/runtimes/jruby_runtime.rb', line 48

def post_install
  # install_nailgun
end

#runtime_specific_gemsObject



52
53
54
# File 'lib/ruby_config/runtimes/jruby_runtime.rb', line 52

def runtime_specific_gems
  ['rake', 'jruby-openssl']
end