1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Update to RubyGems 1.3.4 r2223

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2009-06-09 21:38:59 +00:00
parent a6afbaeb3b
commit 31c94ffeb5
126 changed files with 7610 additions and 3747 deletions

View file

@ -1,4 +1,3 @@
require 'minitest/unit'
require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
require 'rubygems/installer'
@ -20,17 +19,17 @@ class GemInstallerTestCase < RubyGemTestCase
def setup
super
@spec = quick_gem "a"
@spec = quick_gem 'a'
@gem = File.join @tempdir, "#{@spec.full_name}.gem"
util_build_gem @spec
FileUtils.mv File.join(@gemhome, 'cache', "#{@spec.full_name}.gem"),
@tempdir
@installer = util_installer @spec, @gem, @gemhome
@installer = Gem::Installer.new @gem
@installer.gem_dir = util_gem_dir
@installer.gem_home = @gemhome
@installer.spec = @spec
@user_spec = quick_gem 'b'
@user_gem = File.join @tempdir, "#{@user_spec.full_name}.gem"
@user_installer = util_installer @user_spec, @user_gem, Gem.user_dir
@user_installer.gem_dir = File.join(Gem.user_dir, 'gems',
@user_spec.full_name)
end
def util_gem_bindir(version = '2')
@ -49,8 +48,7 @@ class GemInstallerTestCase < RubyGemTestCase
@spec.executables = ["my_exec"]
FileUtils.mkdir_p util_gem_bindir(version)
exec_file = @installer.formatted_program_filename "my_exec"
exec_path = File.join util_gem_bindir(version), exec_file
exec_path = File.join util_gem_bindir(version), "my_exec"
File.open exec_path, 'w' do |f|
f.puts shebang
end
@ -82,5 +80,18 @@ class GemInstallerTestCase < RubyGemTestCase
@installer = Gem::Installer.new @gem
end
def util_installer(spec, gem_path, gem_home)
util_build_gem spec
FileUtils.mv File.join(@gemhome, 'cache', "#{spec.full_name}.gem"),
@tempdir
installer = Gem::Installer.new gem_path
installer.gem_dir = util_gem_dir
installer.gem_home = gem_home
installer.spec = spec
installer
end
end