class Luban::Deployment::Packages::Rubygems::Installer

Public Instance Methods

install_doc?() click to toggle source
# File lib/luban/deployment/packages/rubygems.rb, line 15
def install_doc?
  task.opts.install_doc
end
install_path() click to toggle source
# File lib/luban/deployment/packages/rubygems.rb, line 23
def install_path
  parent.install_path
end
installed?() click to toggle source
# File lib/luban/deployment/packages/rubygems.rb, line 45
def installed?
  return false unless file?(gem_executable)
  match?("#{gem_executable} -v", package_version)
end
package_path() click to toggle source
# File lib/luban/deployment/packages/rubygems.rb, line 19
def package_path
  parent.package_path
end
ruby_executable() click to toggle source
# File lib/luban/deployment/packages/rubygems.rb, line 29
def ruby_executable
  parent.ruby_executable
end
source_repo() click to toggle source
# File lib/luban/deployment/packages/rubygems.rb, line 37
def source_repo
  @source_repo ||= "https://rubygems.org"
end
source_url_root() click to toggle source
# File lib/luban/deployment/packages/rubygems.rb, line 41
def source_url_root
  @source_url_root ||= "rubygems"
end
src_file_extname() click to toggle source
# File lib/luban/deployment/packages/rubygems.rb, line 33
def src_file_extname
  @src_file_extname ||= 'tgz'
end

Protected Instance Methods

configure_build_options() click to toggle source
# File lib/luban/deployment/packages/rubygems.rb, line 52
def configure_build_options
  super
  unless install_doc?
    if version_match?(package_version, ">=2.0.0")
      @configure_opts.push("--no-document")
    else
      @configure_opts.push('--no-rdoc', '--no-ri')
    end
  end
end
configure_package!() click to toggle source
# File lib/luban/deployment/packages/rubygems.rb, line 72
def configure_package!
  test(ruby_executable, 
       "setup.rb config >> #{install_log_file_path} 2>&1")
end
install_package!() click to toggle source
# File lib/luban/deployment/packages/rubygems.rb, line 82
def install_package!
  test(ruby_executable, 
       "setup.rb install #{configure_opts.reject(&:empty?).join(' ')} >> #{install_log_file_path} 2>&1")
end
make_package!() click to toggle source
# File lib/luban/deployment/packages/rubygems.rb, line 77
def make_package!
  test(ruby_executable, 
       "setup.rb setup >> #{install_log_file_path} 2>&1")
end
update_binstubs!() click to toggle source
# File lib/luban/deployment/packages/rubygems.rb, line 87
def update_binstubs!; end
validate() click to toggle source
# File lib/luban/deployment/packages/rubygems.rb, line 63
def validate
  if parent.nil?
    abort "Aborted! Parent package for Rubygems MUST be provided."
  end
  unless parent.is_a?(Ruby::Installer)
    abort "Aborted! Parent package for Rubygems MUST be an instance of #{Ruby::Installer.name}"
  end
end