Sha256: 0b0721a01d9285ca95583adaa27314fd526d8ac6db8d8d3e1531d186fc72618e

Contents?: true

Size: 1021 Bytes

Versions: 16

Compression:

Stored size: 1021 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require "rubygems"

if ARGV.include?("-h") || ARGV.include?("--help")
  warn "rubygems_update [options]"
  warn ""
  warn "This will install the latest version of RubyGems."
  warn ""
  warn "\t--version=X.Y\tUpdate RubyGems from the X.Y version."
  exit
end

unless ARGV.grep(/--version=([\d\.]*)/).empty?
  exec Gem.ruby, "-S", $PROGRAM_NAME, "_#{$1}_"
end

update_dir = $LOAD_PATH.find {|dir| dir.include?("rubygems-update") }

if update_dir.nil?
  puts "Error: Cannot find RubyGems update path!"
  puts
  puts "RubyGems has already been updated."
  puts "The rubygems-update gem may now be uninstalled."
  puts "E.g.    gem uninstall rubygems-update"
else
  update_dir = File.dirname(update_dir)
  Dir.chdir update_dir
  ENV["GEM_PREV_VER"] = Gem::VERSION
  abort unless system(Gem.ruby, "--disable-gems", "setup.rb", *ARGV)
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rubygems-update-3.6.3 exe/update_rubygems
rubygems-update-3.6.2 exe/update_rubygems
rubygems-update-3.6.1 exe/update_rubygems
rubygems-update-3.6.0 exe/update_rubygems
rubygems-update-3.5.23 exe/update_rubygems
rubygems-update-3.5.22 exe/update_rubygems
rubygems-update-3.5.21 exe/update_rubygems
rubygems-update-3.5.20 exe/update_rubygems
rubygems-update-3.5.19 exe/update_rubygems
rubygems-update-3.5.18 exe/update_rubygems
rubygems-update-3.5.17 exe/update_rubygems
rubygems-update-3.5.16 exe/update_rubygems
rubygems-update-3.5.15 exe/update_rubygems
rubygems-update-3.5.14 exe/update_rubygems
rubygems-update-3.5.13 exe/update_rubygems
rubygems-update-3.5.12 exe/update_rubygems