diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-01-22 19:26:03 -0600 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-01-25 10:49:51 -0600 |
commit | ca75441c72a9c30a1bf1609e3d0a71be96d810bb (patch) | |
tree | 012c715885bad3dbe89ac10b535f6f7e53ffc68e | |
parent | f26a4fa1599384a3af17c237487ff67b07b876ce (diff) | |
download | bundler-ca75441c72a9c30a1bf1609e3d0a71be96d810bb.tar.gz |
[CompactIndexClient] Don't request when the gem does not exist
This will save us getting a known 304 when attempting to download a gem the server doesnt have any indexed versions for
-rw-r--r-- | lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb | 3 |
1 files changed, 2 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 3fe5fc6004..e7d67d9926 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 @@ -67,7 +67,8 @@ private def update_info(name) path = @cache.info_path(name) checksum = @updater.checksum_for_file(path) - return if checksum && checksum == @info_checksums_by_name[name] + return unless existing = @info_checksums_by_name[name] + return if checksum == existing update(path, "info/#{name}") end |