123456789_123456789_123456789_123456789_123456789_

Class: Bundler::Fetcher::CompactIndex::ClientFetcher

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Struct
Instance Chain:
self, Struct
Inherits: Struct
  • Object
Defined in: lib/bundler/fetcher/compact_index.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#fetcher (rw, private)

[ GitHub ]

  
# File 'lib/bundler/fetcher/compact_index.rb', line 124

ClientFetcher = Struct.new(:fetcher, :ui)

#ui (rw, private)

[ GitHub ]

  
# File 'lib/bundler/fetcher/compact_index.rb', line 124

ClientFetcher = Struct.new(:fetcher, :ui)

Instance Method Details

#call(path, headers)

[ GitHub ]

  
# File 'lib/bundler/fetcher/compact_index.rb', line 125

def call(path, headers)
  fetcher.downloader.fetch(fetcher.fetch_uri + path, headers)
rescue NetworkDownError => e
  raise unless Bundler.feature_flag.allow_offline_install? && headers["If-None-Match"]
  ui.warn "Using the cached data for the new index because of a network error: #{e}"
  Net::HTTPNotModified.new(nil, nil, nil)
end