diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-05-08 14:19:04 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-05-13 07:54:37 +0900 |
commit | 0e60b59d5884edb8f9aea023efd9b24f1ff02049 (patch) | |
tree | e52935ce510440872ca5ce6b0e092cbc94f18bc9 /spec/bundler/support/artifice/compact_index_partial_update.rb | |
parent | 68224651a4d4dc3ce0cea666f5423dd8b6ba6cfc (diff) | |
download | ruby-0e60b59d5884edb8f9aea023efd9b24f1ff02049.tar.gz |
Update the bundler version with master branch
Diffstat (limited to 'spec/bundler/support/artifice/compact_index_partial_update.rb')
-rw-r--r-- | spec/bundler/support/artifice/compact_index_partial_update.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/bundler/support/artifice/compact_index_partial_update.rb b/spec/bundler/support/artifice/compact_index_partial_update.rb index 6e7c05d423..cb1c7b9481 100644 --- a/spec/bundler/support/artifice/compact_index_partial_update.rb +++ b/spec/bundler/support/artifice/compact_index_partial_update.rb @@ -18,19 +18,19 @@ class CompactIndexPartialUpdate < CompactIndexAPI ) # Verify a cached copy of the versions file exists - unless File.read(cached_versions_path).start_with?("created_at: ") + unless File.binread(cached_versions_path).start_with?("created_at: ") raise("Cached versions file should be present and have content") end # Verify that a partial request is made, starting from the index of the # final byte of the cached file. - unless env["HTTP_RANGE"] == "bytes=#{File.read(cached_versions_path).bytesize - 1}-" + unless env["HTTP_RANGE"] == "bytes=#{File.binread(cached_versions_path).bytesize - 1}-" raise("Range header should be present, and start from the index of the final byte of the cache.") end etag_response do # Return the exact contents of the cache. - File.read(cached_versions_path) + File.binread(cached_versions_path) end end end |