Skip to content

Commit ad4d9aa

Browse files
committed
📚 Improve rdoc for Net::IMAP.new ssl: params
Listed a few example SSLContext parameters in the `.new` documentation, to make it easier for people to upgrade from the deprecated SSL parameters.
1 parent 05d64a0 commit ad4d9aa

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

lib/net/imap.rb

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,22 @@ def idle_response_timeout; config.idle_response_timeout end
816816
# If +ssl+ is a hash, it's passed to
817817
# {OpenSSL::SSL::SSLContext#set_params}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-set_params];
818818
# the keys are names of attribute assignment methods on
819-
# SSLContext[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html].
819+
# SSLContext[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html]. For example:
820+
#
821+
# [{ca_file}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-ca_file]]
822+
# The path to a file containing a PEM-format CA certificate.
823+
# [{ca_path}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-ca_path]]
824+
# The path to a directory containing CA certificates in PEM format.
825+
# [{min_version}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-min_version-3D]]
826+
# Sets the lower bound on the supported SSL/TLS protocol version. Set to
827+
# an +OpenSSL+ constant such as +OpenSSL::SSL::TLS1_2_VERSION+,
828+
# [{verify_mode}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-verify_mode]]
829+
# SSL session verification mode. Valid modes include
830+
# +OpenSSL::SSL::VERIFY_PEER+ and +OpenSSL::SSL::VERIFY_NONE+.
831+
#
832+
# See {OpenSSL::SSL::SSLContext}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html] for other valid SSL context params.
833+
#
834+
# See DeprecatedClientOptions.new for deprecated SSL arguments.
820835
#
821836
# [config]
822837
# A Net::IMAP::Config object to use as the basis for #config. By default,
@@ -834,7 +849,7 @@ def idle_response_timeout; config.idle_response_timeout end
834849
# [{idle_response_timeout}[rdoc-ref:Config#idle_response_timeout]]
835850
# Seconds to wait until an IDLE response is received
836851
#
837-
# See DeprecatedClientOptions.new for deprecated arguments.
852+
# See Net::IMAP::Config for other valid options.
838853
#
839854
# ==== Examples
840855
#

lib/net/imap/deprecated_client_options.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ module DeprecatedClientOptions
1616
#
1717
# ==== Obsolete arguments
1818
#
19-
# Using obsolete arguments does not a warning. Obsolete arguments will be
20-
# deprecated by a future release.
19+
# Use of obsolete arguments does not print a warning. Obsolete arguments
20+
# will be deprecated by a future release.
2121
#
2222
# If a second positional argument is given and it is a hash (or is
2323
# convertible via +#to_hash+), it is converted to keyword arguments.

0 commit comments

Comments
 (0)