Class: RubyConfig::Runtimes::Ruby19Runtime

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

Constant Summary collapse

MAJOR_VERSION =
'1.9'
MINOR_VERSION =
'1'
PATCH_LEVEL =
'243'
VERSION_STRING =
RubyConfig::Runtimes::RubyFromSourceHelper.ruby_version(MAJOR_VERSION, MINOR_VERSION, PATCH_LEVEL)
HANDLE =
"ruby-#{VERSION_STRING}"
DESCRIPTION =
"Ruby #{VERSION_STRING}"
ARCHIVE_PATH =
"ruby-#{VERSION_STRING}"

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_home_path, #initialize, #irb_executable_path, #post_install, #prepare_install, #ruby_bin_path, #ruby_executable_path, #ruby_home_path, #rubygems_installed?, #runtime_specific_gems, #to_s

Constructor Details

This class inherits a constructor from RubyConfig::RuntimeBase

Instance Method Details

#archive_download_urlObject



33
34
35
# File 'lib/ruby_config/runtimes/ruby19_runtime.rb', line 33

def archive_download_url
  RubyConfig::Runtimes::RubyFromSourceHelper.download_url(MAJOR_VERSION, MINOR_VERSION, PATCH_LEVEL)
end

#archive_file_nameObject



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

def archive_file_name
  "ruby-#{VERSION_STRING}.tar.gz"
end

#descriptionObject



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

def description
  DESCRIPTION
end

#gem_executable_pathObject



37
38
39
# File 'lib/ruby_config/runtimes/ruby19_runtime.rb', line 37

def gem_executable_path
  File.join(ruby_bin_path, 'gem')
end

#handleObject



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

def handle
  HANDLE
end

#installObject



41
42
43
44
45
# File 'lib/ruby_config/runtimes/ruby19_runtime.rb', line 41

def install
  extract_tar_gz(File.join(@tmp_path, archive_file_name), @tmp_path)
  
  RubyConfig::Runtimes::RubyFromSourceHelper.compile(File.join(@tmp_path, ARCHIVE_PATH), ruby_home_path)
end

#major_versionObject



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

def major_version
  MAJOR_VERSION
end