Conversation
…curity - Replace unmaintained rest-client dependency with actively maintained httparty - Maintain full backwards compatibility - no customer code changes required - Remove rest-client cookie jar threading workaround - Rewrite HTTP client implementation using httparty - Update error handling to map Net::HTTP exceptions to existing Nylas exceptions - Preserve JSON response parsing with symbol keys - Maintain multipart file upload functionality - Add comprehensive integration tests for migration validation - Update dependencies in gemspec and remove rest-client requires - All 227 tests passing with 99.42% code coverage maintained Resolves security vulnerabilities in unmaintained rest-client dependency while preserving complete API compatibility for customers.
- Fix RSpec/DescribeClass: Use class name instead of string - Fix RSpec/MessageSpies: Use have_received with spies instead of expect().to receive() - Fix Layout/TrailingWhitespace: Remove trailing whitespace
- Create file_upload_example.rb demonstrating both <3MB and >3MB file handling - Test small files: JSON with base64 encoding - Test large files: Multipart form data uploads - Add NYLAS_TEST_EMAIL environment variable for sending test emails - Update examples README with new file upload example documentation - Successfully tested with real API calls - both file sizes work correctly - Validates HTTParty migration handles all file upload scenarios properly
…for large uploads - Replace vague test_example.rb with comprehensive send_message_example.rb - Demonstrate simple messages, multi-recipient, and HTML content - Update file_upload_example.rb to use persistent disk file for >3MB test - Large test file is created once and reused, avoiding repeated 5MB file creation - Ensure NYLAS_TEST_EMAIL environment variable is used consistently - Update examples README with new send_message_example documentation - Both examples successfully tested with real API calls
- Large test file should be generated by the example, not tracked in git - Added examples/messages/large_test_file.txt to .gitignore - Removed the file from git tracking but left it on disk for reuse
kraju3
approved these changes
Jun 2, 2025
Contributor
Author
|
@quzhi1 do you mind having a quick look at this PR - it's kinda a big change on the deps side but should have 0 impact on the end user side. |
… key mismatch between FileUtils.handle_message_payload (symbol keys) and HttpClient.build_request (string key checks) - HttpClient.build_request now checks for both string and symbol multipart keys - Maintains 100% backwards compatibility with existing code - Prevents encoding errors when sending emails with attachments >3MB - Added comprehensive tests for both string and symbol key scenarios - Added integration test verifying FileUtils + HttpClient compatibility
|
Hi @AaronDDM ! Any idea when this PR may be merged to Appreciate the help. |
Contributor
Author
Sorry for the delay, been out sick. I am going to try and get it out this week - worst case, Friday. |
quzhi1
approved these changes
Jun 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Resolves security vulnerabilities in unmaintained rest-client dependency while preserving complete API compatibility for customers.
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.