nylas / nylas-ruby

Ruby bindings for the Nylas Platform APIs
https://nylas.com/docs
MIT License
101 stars 130 forks source link

Enable SDK to reattach large files to messages on retry #487

Closed mrashed-dev closed 2 months ago

mrashed-dev commented 2 months ago

Description

This PR enables the SDK to re-attach large files when trying to retry the same request body. If a file_path is provided with the attachment request and the file stream is closed, the SDK will attempt to reopen it. The helper function attach_file_request_builder will now set the file_path in the object, so if you're currently using that helper function, the attachment will be ready for reattachment.

License

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.

Project coverage is 99.14%. Comparing base (8490435) to head (3d72f8b). Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
lib/nylas/utils/file_utils.rb 66.66% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #487 +/- ## ========================================== - Coverage 99.85% 99.14% -0.72% ========================================== Files 24 24 Lines 681 700 +19 ========================================== + Hits 680 694 +14 - Misses 1 6 +5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.