-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🗑️ Add deprecation warnings to .new and #starttls [🚧 WIP]
* Moved all deprecated option handling to DeprecatedClientOptions, which is prepended to Net::IMAP. This allows `Net::IMAP` to cleanly implement and document the simplified keyword args API, while still providing a place to document the old APIs. Some weird and potentially confusing edge-cases were converted to `ArgumentError`. The very old forms are documented and will warn loudly. Some cases are obsolete but don't print any warnings... yet. * `ssl` was renamed to `tls` in most places, with backwards compatible aliases. Using `ssl` does not print any deprecation warnings. Using both `tls` and `ssl` keywords raises an ArgumentError. * ♻️ Additionally, split `initialize` up into small helper methods making it easier to understand at a glance. * Preparing for a (backwards-incompatible) secure-by-default configuration, `Net::IMAP.default_tls` will determine the value for `tls` when no explicit port or tls setting is provided. Using port 143 will be insecure by default. Using port 993 will be secure by default. Providing no explicit port will use `Net::IMAP.default_tls` with the appropriate port. And providing any other unknown port will use `default_tls` with a warning. 🚧 TODO: should we use a different config var for default tls params when port is 993 and `tls` is unspecified? 🚧 TODO: should we use a different config var for choosing `tls` when `port` is non-standard vs choosing `port` and `tls` when neither are specified? 🚧 TODO: should we use a different var for `default_tls` be used to config params when port is 993 but tls is implicit? Another var?
- Loading branch information
Showing
2 changed files
with
319 additions
and
116 deletions.
There are no files selected for viewing
This file contains 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
Oops, something went wrong.