Skip to content

Commit 1c20813

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 87ba74e commit 1c20813

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
@@ -1037,8 +1037,8 @@ def starttls(options = {}, verify = true)
10371037
# imap.login username, password
10381038
# end
10391039
#
1040-
def authenticate(mechanism, *args, **props, &cb)
1041-
authenticator = self.class.authenticator(mechanism, *args, **props, &cb)
1040+
def authenticate(mechanism, ...)
1041+
authenticator = self.class.authenticator(mechanism, ...)
10421042
send_command("AUTHENTICATE", mechanism) do |resp|
10431043
if resp.instance_of?(ContinuationRequest)
10441044
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
@@ -39,15 +39,11 @@ def add_authenticator(auth_type, authenticator)
3939
#
4040
# The returned object represents a single authentication exchange and <em>must
4141
# not</em> be reused for multiple authentication attempts.
42-
def authenticator(mechanism, *authargs, **properties, &callback)
43-
authenticator = authenticators.fetch(mechanism.upcase) do
42+
def authenticator(mechanism, ...)
43+
auth = authenticators.fetch(mechanism.upcase) do
4444
raise ArgumentError, 'unknown auth type - "%s"' % mechanism
4545
end
46-
if authenticator.respond_to?(:new)
47-
authenticator.new(*authargs, **properties, &callback)
48-
else
49-
authenticator.call(*authargs, **properties, &callback)
50-
end
46+
auth.respond_to?(:new) ? auth.new(...) : auth.call(...)
5147
end
5248

5349
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)