Skip to content

✨ Cache server capabilities and add #capable?(name) - #156

Merged
nevans merged 4 commits into
ruby:masterfrom
nevans:cached-capabilities
Jul 22, 2023
Merged

✨ Cache server capabilities and add #capable?(name)#156
nevans merged 4 commits into
ruby:masterfrom
nevans:cached-capabilities

Conversation

@nevans

@nevansnevans commented Jul 16, 2023

Copy link
Copy Markdown
Collaborator

Updated methods:

  • #initialize - save capabilities in OK or PREAUTH greeting
  • #capability - always update saved capabilities
  • #starttls - always clear capabilities after tagged OK response
  • #authenticate - clear capabilities or update from tagged OK response
  • #login - clear capabilities or update from tagged OK response

New methods:

  • #capable?(name) - the primary API for discovering capabilities
  • #auth_capable?(name) - returns whether a SASL mechanism is supported
  • #auth_mechanisms - returns the server's supported SASL mechanisms
  • #capabilities - calls capability when needed
  • #capabilities_cached? - whether capabilities are cached
  • #clear_cached_capabilities - clears the cache

Fixes#31
Related issues:

@nevansnevans changed the title ✨ Cache server capabilities and add `#capable?(name)✨ Cache server capabilities and add #capable?(name)Jul 16, 2023
@nevans
nevansforce-pushed the cached-capabilities branch 2 times, most recently from 4d26793 to 75043c8CompareJuly 17, 2023 02:20
@nevans
nevansforce-pushed the cached-capabilities branch 2 times, most recently from 474fdbe to 1497b24CompareJuly 17, 2023 13:07
@nevans
nevans requested review from hsbt and shugoJuly 17, 2023 13:13
@nevans
nevansforce-pushed the cached-capabilities branch 7 times, most recently from 27554f6 to d611853CompareJuly 21, 2023 13:50
@nevans
nevansforce-pushed the cached-capabilities branch from b7c61c6 to 452f10fCompareJuly 22, 2023 13:31
This simplifies using Net::IMAP::FakeServer in multiple test suites.
@nevans
nevansforce-pushed the cached-capabilities branch 2 times, most recently from ecc6bd1 to 7ed848dCompareJuly 22, 2023 14:27
This update started as a cleanup of the capabilities documentation, but
along the way it became something bigger.
Because yard doesn't honor the `#--` and `#++` delimiters, most of the
TODO comments have been either removed or converted into readable
documentation of the missing features.
@nevans
nevansforce-pushed the cached-capabilities branch from 7ed848d to d4ea5d8CompareJuly 22, 2023 17:32
Updated methods:
* `#initialize` - save capabilities in `OK` or `PREAUTH` greeting
* `#capability` - always update saved capabilities
* `#starttls` - always clear capabilities after tagged OK response
* `#authenticate` - clear capabilities or update from tagged OK response
* `#login` - clear capabilities or update from tagged OK response
New methods:
* `#capable?(name)` - the primary API for discovering capabilities
* `#auth_capable?(name)` - returns whether a SASL mechanism is supported
* `#auth_mechanisms` - returns the server's supported SASL mechanisms
* `#capabilities` - cached version of `capability`
* `#capabilities_cached?` - whether capabilities are cached
* `#clear_cached_capabilities` - clears the cache
Also, the docs related to capabilities were reorganized and rewritten.
Fixesruby#31.
@nevans
nevansforce-pushed the cached-capabilities branch from d4ea5d8 to b0f8b9eCompareJuly 22, 2023 17:35
@nevans
nevans merged commit 35fd1bc into ruby:masterJul 22, 2023
@nevans
nevans deleted the cached-capabilities branch July 22, 2023 18:35
@nevansnevans added the IMAP4rev1 Requirement for IMAP4rev1, RFC3501 label Sep 27, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

IMAP4rev1Requirement for IMAP4rev1, RFC3501

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cache capabilities and add #capability?(name)

1 participant

@nevans