Thanks to visit codestin.com
Credit goes to github.com

Skip to content

♻️ Extract ResponseReader from get_response #433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 18, 2025
Merged

Conversation

nevans
Copy link
Collaborator

@nevans nevans commented Apr 18, 2025

It's nice to extract a little bit of the complexity from the core Net::IMAP class. But my primary motivation was so that I could directly test this code quickly and in isolation from needing to simulate a full IMAP connection.

Note that, because it wraps @sock, the ResponseReader must be recreated (or updated) when @sock is replaced for TLS (or, in the future, for the COMPRESS extension).

nevans added 2 commits April 16, 2025 10:37
It's nice to extract a little bit of the complexity from the core
`Net::IMAP` class.  But my primary motivation was so that I could
directly test this code quickly and in isolation from needing to
simulate a full IMAP connection.
Comment on lines +7 to +11
attr_reader :client

def initialize(client, sock)
@client, @sock = client, sock
end
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version of the ResponseReader isn't actually using client yet, so I could've left that out of this PR. But upcoming PRs will need the client for passing to callbacks (and also for its config).

@nevans nevans merged commit d28879e into master Apr 18, 2025
37 checks passed
@nevans nevans deleted the response_reader branch April 18, 2025 14:45
nevans added a commit that referenced this pull request Apr 19, 2025
♻️ Extract ResponseReader from get_response (backport #433)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant