diff options
author | Andre Arko <andre@arko.net> | 2015-12-26 18:07:15 +0800 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-01-25 10:49:44 -0600 |
commit | b1b8eb4ff8ca55ee526290c84417c62a889a932b (patch) | |
tree | 3f1eba593e26e0488657f76cdfc6a4a86686310f /lib/bundler/vendor | |
parent | b003c5d574ec859325e03d345374605d07667125 (diff) | |
download | bundler-b1b8eb4ff8ca55ee526290c84417c62a889a932b.tar.gz |
accurately report available? for compact index
The Fetcher system expects #available? to return false if it is impossible to get meaningful results from the CompactIndex fetcher. Given that constraint, we move the step of updating /versions and parsing out the info checksums into the #available? method. It shouldn’t take any more time, since that is a required step for any use of the compact index, and we can use the FallbackError that results from a 404 to definitively indicate that the CompactIndex is not available.
Diffstat (limited to 'lib/bundler/vendor')
-rw-r--r-- | lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb b/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb index d8677b87dd..01db75a077 100644 --- a/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb +++ b/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb @@ -43,7 +43,7 @@ class Bundler::CompactIndexClient @cache.specific_dependency(name, version, platform) end - def parse_checksums! + def update_and_parse_checksums! return @info_checksums_by_name if @parsed_checksums update(@cache.versions_path, "versions") @info_checksums_by_name = @cache.checksums |