method
setup_fetcher
v2_5_5 -
Show latest stable
-
0 notes -
Class: SpecFetcherSetup
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
setup_fetcher()
public
Hide source
# File lib/rubygems/test_utilities.rb, line 305 def setup_fetcher # :nodoc: require 'zlib' require 'socket' require 'rubygems/remote_fetcher' unless @test.fetcher then @test.fetcher = Gem::FakeFetcher.new Gem::RemoteFetcher.fetcher = @test.fetcher end Gem::Specification.reset begin gem_repo, @test.gem_repo = @test.gem_repo, @repository @test.uri = URI @repository @test.util_setup_spec_fetcher(*@downloaded) ensure @test.gem_repo = gem_repo @test.uri = URI gem_repo end @gems.each do |spec, gem| next unless gem @test.fetcher.data["#{@repository}gems/#{spec.file_name}"] = Gem.read_binary(gem) FileUtils.cp gem, spec.cache_file end end