Method not available on this version
This method is only available on newer versions. The first available version (v2_6_3) is shown here.
fetch_spec(spec)public
fetch a gem specification
# File lib/bundler/fetcher.rb, line 93
def fetch_spec(spec)
spec -= [nil, "ruby", ""]
spec_file_name = "#{spec.join "-"}.gemspec"
uri = URI.parse("#{remote_uri}#{Gem::MARSHAL_SPEC_DIR}#{spec_file_name}.rz")
if uri.scheme == "file"
Bundler.load_marshal Bundler.rubygems.inflate(Gem.read_binary(uri.path))
elsif cached_spec_path = gemspec_cached_path(spec_file_name)
Bundler.load_gemspec(cached_spec_path)
else
Bundler.load_marshal Bundler.rubygems.inflate(downloader.fetch(uri).body)
end
rescue MarshalError
raise HTTPError, "Gemspec #{spec} contained invalid data.\n" "Your network or your gem server is probably having issues right now."
end Related methods
- Instance methods
- fetch_spec
- fetchers
- http_proxy
- inspect
- specs
- specs_with_retry
- uri
- use_api
- user_agent
- Class methods
- new
- Private methods
-
bundler_cert_store -
cis -
connection -
downloader -
gemspec_cached_path -
remote_uri