Class: Bundler::CompactIndexClient::Updater
- Inherits:
-
Object
- Object
- Bundler::CompactIndexClient::Updater
- Defined in:
- lib/bundler/compact_index_client/updater.rb
Defined Under Namespace
Classes: MismatchedChecksumError
Instance Method Summary collapse
-
#initialize(fetcher) ⇒ Updater
constructor
A new instance of Updater.
- #update(remote_path, local_path, etag_path) ⇒ Object
Constructor Details
#initialize(fetcher) ⇒ Updater
Returns a new instance of Updater.
12 13 14 |
# File 'lib/bundler/compact_index_client/updater.rb', line 12 def initialize(fetcher) @fetcher = fetcher end |
Instance Method Details
#update(remote_path, local_path, etag_path) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/bundler/compact_index_client/updater.rb', line 16 def update(remote_path, local_path, etag_path) append(remote_path, local_path, etag_path) || replace(remote_path, local_path, etag_path) rescue CacheFile::DigestMismatchError => e raise MismatchedChecksumError.new(remote_path, e.) rescue Zlib::GzipFile::Error raise Bundler::HTTPError end |