samvera / active_fedora

A Rails interface to the Fedora repository, akin to ActiveModel
Other
54 stars 63 forks source link

Always rewind IO content even when the file is new. #1413

Closed cjcolvar closed 4 years ago

cjcolvar commented 4 years ago

This bug was causing https://github.com/samvera/hyrax/issues/4018 but could also be the source of many more issues.

In the issue above this manifested with the extracted text file being read by indexing prior to the actual persisting to fedora at which point it was already consumed and an empty file was sent to fedora.

BE KIND, REWIND!

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.004%) to 89.48% when pulling a1b65dfb2b6e701dabe8c222d892f55d317adf44 on file_rewind into 23e66cf2b4620081a49f04e07c1de18530813c09 on master.