-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Response Data docs #75
Conversation
89b5328
to
1bbcfbf
Compare
@shugo: the reference to nevans/rdoc has been removed from this PR. I updated every single struct in
Also, please let me know what you think about my
Even with those changes, a lot of servers have had difficulty producing valid bodystructures, so I have some "foolproof" bodystructure code that I've been using for years. It was too big of a change to send along with the other parser PRs I pushed, but I think I can simplify it for a future PR. IIRC, any violation of the spec that didn't have an unambiguous or obvious alternative interpretation causes the parser to backtrack and parse the how bodystructure as a generic parenthesized list of astrings and nested lists of the same, and return that inside a BodystructUnparsable object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks fine!
1bbcfbf
to
296bf46
Compare
* Move struct field docs from the class to methods inside the class. * Remove ABNF comments. * Add type information to the call-seq or the method rdoc text. * Link to the data type(s) that are returned, when possible.
* Move struct field docs from the class to methods inside the class. * Remove ABNF comments. * Add type information to the call-seq or the method rdoc text. * Link to the data type(s) that are returned, when possible.
* Document backwards-compatibility for unparsed response code data. * Document Net::IMAP#responses behavior. * Document RFC3501 codes. * List RFC5530 codes.
* Move struct field docs from the class to methods inside the class. * Remove ABNF comments. * Add type information to the call-seq or the method rdoc text. * Link to the data type(s) that are returned, when possible. Attempt to link to mailbox attr docs, but rdoc section links are broken.
* Move struct field docs from the class to methods inside the class. * Remove ABNF comments. * Add type information to the call-seq or the method rdoc text. * Link to the data type(s) that are returned, when possible.
* Move struct field docs from the class to methods inside the class. * Remove ABNF comments. * Add type information to the call-seq or the method rdoc text. * Link to the data type(s) that are returned, when possible.
* Move struct field docs from the class to methods inside the class. * Remove ABNF comments. * Add type information to the call-seq or the method rdoc text. * Link to the data type(s) that are returned, when possible.
* Move struct field docs from the class to methods inside the class. * Remove ABNF comments. * Add type information to the call-seq or the method rdoc text. * Link to the data type(s) that are returned, when possible.
* Move struct field docs from the class to methods inside the class. * Remove ABNF comments. * Add type information to the call-seq or the method rdoc text. * Link to the data type(s) that are returned, when possible. Expand the attr hash documentation, to provide more examples. Add more data item details from the RFCs.
* Move struct field docs from the class to methods inside the class. * Remove ABNF comments. * Add type information to the call-seq or the method rdoc text. * Link to the data type(s) that are returned, when possible.
* Move struct field docs from the class to methods inside the class. * Remove ABNF comments. * Add type information to the call-seq or the method rdoc text. * Link to the data type(s) that are returned, when possible.
* Move struct field docs from the class to methods inside the class. * Remove ABNF comments. * Add type information to the call-seq or the method rdoc text. * Link to the data type(s) that are returned, when possible. * Link to the appropriate RFC(s).
* Move struct field docs from the class to methods inside the class. * Remove ABNF comments. * Add type information to the call-seq or the method rdoc text. * Link to the data type(s) that are returned, when possible.
* Move struct field docs from the class to methods inside the class. * Remove ABNF comments. * Add type information to the call-seq or the method rdoc text. * Link to the data type(s) that are returned, when possible. Add warnings to BodyTypeAttachment and BodyTypeExtension. BodyTypeText and BodyTypeMessage link to BodyTypeBasic for documentation of common fields. Link to relevant RFCs where relevant. Update formatting.
This can be used for documentation, `case` statements and pattern matching, and functionality common to all `BodyType*` structs.
296bf46
to
7e73b62
Compare
I've converted the documentation for all of the response data structs' fields to meta-method rdoc. (I prefer the rdoc formatting for methods vs attr.) This allows us to link to the documentation for specific fields from elsewhere.
In several places, I did more than just copy the existing doecumentation to a new format. E.g:
This should be fairly complete, self-contained, and safe to merge as-is. One caveat: the MailboxList links (in bafc119) are broken. These point to the Mailbox attributes and special use attributes sections in Net::IMAP, and there's an
rdoc
bug that section links with spaces or special chars are intepreted as (broken) label links.I have other changes in another branch (soon-to-be PR) that simplifies working with
Response => ResponseText => ResponseCode
,BodyStructure
and theBodyType*
classes, and makes the documented changes toResponseParser
so we can removeBodyTypeExtension
andBodyTypeAttachment
. Those PRs will update these docs again, but I think it's fine to merge this first rather than wait for those PRs to be complete.FYI: cherry-picks 981ea30 (to avoid conflicts later)