From e72b71d56a1f369cb7eb3892c61715460bac8109 Mon Sep 17 00:00:00 2001 From: drbrain Date: Fri, 11 Apr 2008 20:57:02 +0000 Subject: Update to RubyGems 1.1.1 r1701. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rubygems/gemutilities.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/rubygems/gemutilities.rb') diff --git a/test/rubygems/gemutilities.rb b/test/rubygems/gemutilities.rb index f12f4e88a5..967e3dc34d 100644 --- a/test/rubygems/gemutilities.rb +++ b/test/rubygems/gemutilities.rb @@ -61,6 +61,8 @@ class FakeFetcher name = "#{spec.full_name}.gem" path = File.join(install_dir, 'cache', name) + Gem.ensure_gem_subdirectories install_dir + if source_uri =~ /^http/ then File.open(path, "wb") do |f| f.write fetch_path(File.join(source_uri, "gems", name)) @@ -369,6 +371,17 @@ class RubyGemTestCase < Test::Unit::TestCase Gem.win_platform? end + # NOTE Allow tests to use a random (but controlled) port number instead of + # a hardcoded one. This helps CI tools when running parallels builds on + # the same builder slave. + def self.process_based_port + @@process_based_port ||= 8000 + $$ % 1000 + end + + def process_based_port + self.class.process_based_port + end + end class TempIO -- cgit v1.2.3