net-imap 0.4.24 → 0.5.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +10 -1
  3. data/README.md +10 -4
  4. data/docs/styles.css +75 -14
  5. data/lib/net/imap/authenticators.rb +2 -2
  6. data/lib/net/imap/command_data.rb +73 -78
  7. data/lib/net/imap/config/attr_type_coercion.rb +22 -10
  8. data/lib/net/imap/config/attr_version_defaults.rb +93 -0
  9. data/lib/net/imap/config.rb +70 -94
  10. data/lib/net/imap/connection_state.rb +48 -0
  11. data/lib/net/imap/data_encoding.rb +3 -3
  12. data/lib/net/imap/data_lite.rb +226 -0
  13. data/lib/net/imap/deprecated_client_options.rb +6 -3
  14. data/lib/net/imap/errors.rb +6 -0
  15. data/lib/net/imap/esearch_result.rb +219 -0
  16. data/lib/net/imap/fetch_data.rb +126 -47
  17. data/lib/net/imap/flags.rb +1 -1
  18. data/lib/net/imap/response_data.rb +120 -186
  19. data/lib/net/imap/response_parser/parser_utils.rb +5 -0
  20. data/lib/net/imap/response_parser.rb +155 -21
  21. data/lib/net/imap/response_reader.rb +9 -12
  22. data/lib/net/imap/sasl/anonymous_authenticator.rb +3 -3
  23. data/lib/net/imap/sasl/authentication_exchange.rb +52 -20
  24. data/lib/net/imap/sasl/authenticators.rb +8 -4
  25. data/lib/net/imap/sasl/client_adapter.rb +77 -26
  26. data/lib/net/imap/sasl/cram_md5_authenticator.rb +4 -4
  27. data/lib/net/imap/sasl/digest_md5_authenticator.rb +218 -56
  28. data/lib/net/imap/sasl/external_authenticator.rb +2 -2
  29. data/lib/net/imap/sasl/gs2_header.rb +7 -7
  30. data/lib/net/imap/sasl/login_authenticator.rb +4 -3
  31. data/lib/net/imap/sasl/oauthbearer_authenticator.rb +6 -6
  32. data/lib/net/imap/sasl/plain_authenticator.rb +7 -7
  33. data/lib/net/imap/sasl/protocol_adapters.rb +60 -4
  34. data/lib/net/imap/sasl/scram_authenticator.rb +10 -10
  35. data/lib/net/imap/sasl.rb +7 -4
  36. data/lib/net/imap/sasl_adapter.rb +0 -1
  37. data/lib/net/imap/search_result.rb +4 -5
  38. data/lib/net/imap/sequence_set.rb +529 -154
  39. data/lib/net/imap/stringprep/nameprep.rb +1 -1
  40. data/lib/net/imap/stringprep/trace.rb +4 -4
  41. data/lib/net/imap/uidplus_data.rb +2 -84
  42. data/lib/net/imap/vanished_data.rb +65 -0
  43. data/lib/net/imap.rb +996 -305
  44. data/net-imap.gemspec +1 -1
  45. data/rakelib/rfcs.rake +2 -0
  46. data/rakelib/string_prep_tables_generator.rb +6 -2
  47. metadata +7 -2
@@ -60,9 +60,8 @@ module Net
60
60
  # [3, 5, 7] == Net::IMAP::SearchResult[3, 5, 7, modseq: 99] # => true
61
61
  #
62
62
  def ==(other)
63
- (modseq ?
64
- other.is_a?(self.class) && modseq == other.modseq :
65
- other.is_a?(Array)) &&
63
+ other.is_a?(Array) &&
64
+ modseq == (other.modseq if other.respond_to?(:modseq)) &&
66
65
  size == other.size &&
67
66
  sort == other.sort
68
67
  end
@@ -100,10 +99,10 @@ module Net
100
99
  # data.to_s("SORT") # => "* SORT 2 8 32 128 256 512"
101
100
  # data.to_s(nil) # => "2 8 32 128 256 512"
102
101
  #
103
- # data = Net::IMAP::SearchResult[1, 3, 16, 1024, modseq: 2048].to_s
102
+ # data = Net::IMAP::SearchResult[1, 3, 16, 1024, modseq: 2048]
104
103
  # data.to_s # => "* SEARCH 1 3 16 1024 (MODSEQ 2048)"
105
104
  # data.to_s("SORT") # => "* SORT 1 3 16 1024 (MODSEQ 2048)"
106
- # data.to_s # => "1 3 16 1024 (MODSEQ 2048)"
105
+ # data.to_s(nil) # => "1 3 16 1024 (MODSEQ 2048)"
107
106
  #
108
107
  def to_s(type = "SEARCH")
109
108
  str = +""