diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-11 20:57:02 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-11 20:57:02 +0000 |
commit | e72b71d56a1f369cb7eb3892c61715460bac8109 (patch) | |
tree | 6f55131cbd153845e71dadc91f08636aa6707423 /test/rubygems/gemutilities.rb | |
parent | 0ae6c7f816cbc3ba0cdd97f609b9ffcbf49bf9bb (diff) | |
download | ruby-e72b71d56a1f369cb7eb3892c61715460bac8109.tar.gz |
Update to RubyGems 1.1.1 r1701.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/gemutilities.rb')
-rw-r--r-- | test/rubygems/gemutilities.rb | 13 |
1 files changed, 13 insertions, 0 deletions
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 |