Skip to content

Commit c626c4c

Browse files
committed
⬆️ Drop v2.6 support; Require v2.7.3; Use "..." arg
v2.7.0-v2.7.2, didn't allow "..." to be used with leading arguments, so the minimum version is v2.7.3.
1 parent 217097b commit c626c4c

File tree

4 files changed

+6
-17
lines changed

4 files changed

+6
-17
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ jobs:
1010
ruby: [ head, '3.1', '3.0', '2.7' ]
1111
os: [ ubuntu-latest, macos-latest ]
1212
experimental: [false]
13-
include:
14-
# - ruby: 2.6
15-
# os: ubuntu-latest
16-
# experimental: true
17-
- ruby: 2.6
18-
os: macos-latest
19-
experimental: false
2013
runs-on: ${{ matrix.os }}
2114
continue-on-error: ${{ matrix.experimental }}
2215
steps:

lib/net/imap.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,8 @@ def starttls(options = {}, verify = true)
520520
#
521521
# See +Net::IMAP::Authenticators+ for more information on plugging in your
522522
# own authenticator.
523-
def authenticate(auth_type, *args)
524-
authenticator = self.class.authenticator(auth_type, *args)
523+
def authenticate(auth_type, ...)
524+
authenticator = self.class.authenticator(auth_type, ...)
525525
send_command("AUTHENTICATE", auth_type) do |resp|
526526
if resp.instance_of?(ContinuationRequest)
527527
data = authenticator.process(resp.data.text.unpack("m")[0])

lib/net/imap/authenticators.rb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,11 @@ def add_authenticator(auth_type, authenticator)
1919

2020
# Builds an authenticator for Net::IMAP#authenticate. +args+ will be passed
2121
# directly to the chosen authenticator's +#initialize+.
22-
def authenticator(mechanism, *authargs, **properties, &callback)
23-
authenticator = authenticators.fetch(mechanism.upcase) do
22+
def authenticator(mechanism, ...)
23+
auth = authenticators.fetch(mechanism.upcase) do
2424
raise ArgumentError, 'unknown auth type - "%s"' % mechanism
2525
end
26-
if authenticator.respond_to?(:new)
27-
authenticator.new(*authargs, **properties, &callback)
28-
else
29-
authenticator.call(*authargs, **properties, &callback)
30-
end
26+
auth.respond_to?(:new) ? auth.new(...) : auth.call(...)
3127
end
3228

3329
private

net-imap.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
1616
spec.summary = %q{Ruby client api for Internet Message Access Protocol}
1717
spec.description = %q{Ruby client api for Internet Message Access Protocol}
1818
spec.homepage = "https://github.com/ruby/net-imap"
19-
spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
19+
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.3")
2020
spec.licenses = ["Ruby", "BSD-2-Clause"]
2121

2222
spec.metadata["homepage_uri"] = spec.homepage

0 commit comments

Comments
 (0)