net-imap 0.3.7 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/pages.yml +46 -0
  3. data/.github/workflows/test.yml +5 -12
  4. data/Gemfile +1 -0
  5. data/README.md +15 -4
  6. data/Rakefile +0 -7
  7. data/benchmarks/generate_parser_benchmarks +52 -0
  8. data/benchmarks/parser.yml +578 -0
  9. data/benchmarks/stringprep.yml +1 -1
  10. data/lib/net/imap/authenticators.rb +26 -57
  11. data/lib/net/imap/command_data.rb +13 -6
  12. data/lib/net/imap/deprecated_client_options.rb +139 -0
  13. data/lib/net/imap/response_data.rb +46 -41
  14. data/lib/net/imap/response_parser/parser_utils.rb +230 -0
  15. data/lib/net/imap/response_parser.rb +665 -627
  16. data/lib/net/imap/sasl/anonymous_authenticator.rb +68 -0
  17. data/lib/net/imap/sasl/authentication_exchange.rb +107 -0
  18. data/lib/net/imap/sasl/authenticators.rb +118 -0
  19. data/lib/net/imap/sasl/client_adapter.rb +72 -0
  20. data/lib/net/imap/{authenticators/cram_md5.rb → sasl/cram_md5_authenticator.rb} +15 -9
  21. data/lib/net/imap/{authenticators/digest_md5.rb → sasl/digest_md5_authenticator.rb} +74 -21
  22. data/lib/net/imap/sasl/external_authenticator.rb +62 -0
  23. data/lib/net/imap/sasl/gs2_header.rb +80 -0
  24. data/lib/net/imap/{authenticators/login.rb → sasl/login_authenticator.rb} +19 -14
  25. data/lib/net/imap/sasl/oauthbearer_authenticator.rb +164 -0
  26. data/lib/net/imap/sasl/plain_authenticator.rb +93 -0
  27. data/lib/net/imap/sasl/protocol_adapters.rb +45 -0
  28. data/lib/net/imap/sasl/scram_algorithm.rb +58 -0
  29. data/lib/net/imap/sasl/scram_authenticator.rb +278 -0
  30. data/lib/net/imap/sasl/stringprep.rb +6 -66
  31. data/lib/net/imap/sasl/xoauth2_authenticator.rb +88 -0
  32. data/lib/net/imap/sasl.rb +144 -43
  33. data/lib/net/imap/sasl_adapter.rb +21 -0
  34. data/lib/net/imap/stringprep/nameprep.rb +70 -0
  35. data/lib/net/imap/stringprep/saslprep.rb +69 -0
  36. data/lib/net/imap/stringprep/saslprep_tables.rb +96 -0
  37. data/lib/net/imap/stringprep/tables.rb +146 -0
  38. data/lib/net/imap/stringprep/trace.rb +85 -0
  39. data/lib/net/imap/stringprep.rb +159 -0
  40. data/lib/net/imap.rb +976 -590
  41. data/net-imap.gemspec +1 -1
  42. data/rakelib/saslprep.rake +4 -4
  43. data/rakelib/string_prep_tables_generator.rb +82 -60
  44. metadata +30 -11
  45. data/lib/net/imap/authenticators/plain.rb +0 -41
  46. data/lib/net/imap/authenticators/xoauth2.rb +0 -20
  47. data/lib/net/imap/sasl/saslprep.rb +0 -55
  48. data/lib/net/imap/sasl/saslprep_tables.rb +0 -98
  49. data/lib/net/imap/sasl/stringprep_tables.rb +0 -153
@@ -0,0 +1,578 @@
1
+ ---
2
+ prelude: |2
3
+ require "yaml"
4
+ require "net/imap"
5
+
6
+ def load_response(file, name)
7
+ YAML.unsafe_load_file(file).dig(:tests, name, :response)
8
+ .force_encoding "ASCII-8BIT" \
9
+ or abort "ERRORO: missing %p fixture data in %p" % [name, file]
10
+ end
11
+
12
+ parser = Net::IMAP::ResponseParser.new
13
+ benchmark:
14
+ - name: NAMESPACE_rfc2342_example_5.1
15
+ prelude: |2
16
+ response = load_response("../test/net/imap/fixtures/response_parser/namespace_responses.yml",
17
+ "NAMESPACE_rfc2342_example_5.1")
18
+ script: parser.parse(response)
19
+ - name: NAMESPACE_rfc2342_example_5.2
20
+ prelude: |2
21
+ response = load_response("../test/net/imap/fixtures/response_parser/namespace_responses.yml",
22
+ "NAMESPACE_rfc2342_example_5.2")
23
+ script: parser.parse(response)
24
+ - name: NAMESPACE_rfc2342_example_5.3
25
+ prelude: |2
26
+ response = load_response("../test/net/imap/fixtures/response_parser/namespace_responses.yml",
27
+ "NAMESPACE_rfc2342_example_5.3")
28
+ script: parser.parse(response)
29
+ - name: NAMESPACE_rfc2342_example_5.4
30
+ prelude: |2
31
+ response = load_response("../test/net/imap/fixtures/response_parser/namespace_responses.yml",
32
+ "NAMESPACE_rfc2342_example_5.4")
33
+ script: parser.parse(response)
34
+ - name: NAMESPACE_rfc2342_example_5.5
35
+ prelude: |2
36
+ response = load_response("../test/net/imap/fixtures/response_parser/namespace_responses.yml",
37
+ "NAMESPACE_rfc2342_example_5.5")
38
+ script: parser.parse(response)
39
+ - name: NAMESPACE_rfc2342_example_5.6
40
+ prelude: |2
41
+ response = load_response("../test/net/imap/fixtures/response_parser/namespace_responses.yml",
42
+ "NAMESPACE_rfc2342_example_5.6")
43
+ script: parser.parse(response)
44
+ - name: NAMESPACE_rfc2342_example_5.7
45
+ prelude: |2
46
+ response = load_response("../test/net/imap/fixtures/response_parser/namespace_responses.yml",
47
+ "NAMESPACE_rfc2342_example_5.7")
48
+ script: parser.parse(response)
49
+ - name: NAMESPACE_rfc2342_example_5.9
50
+ prelude: |2
51
+ response = load_response("../test/net/imap/fixtures/response_parser/namespace_responses.yml",
52
+ "NAMESPACE_rfc2342_example_5.9")
53
+ script: parser.parse(response)
54
+ - name: NAMESPACE_rfc9051_6.3.10_example_8
55
+ prelude: |2
56
+ response = load_response("../test/net/imap/fixtures/response_parser/namespace_responses.yml",
57
+ "NAMESPACE_rfc9051_6.3.10_example_8")
58
+ script: parser.parse(response)
59
+ - name: acl_response
60
+ prelude: |2
61
+ response = load_response("../test/net/imap/fixtures/response_parser/acl_responses.yml",
62
+ "test_acl_response")
63
+ script: parser.parse(response)
64
+ - name: bodystructure_bug11128_ext_mpart_without_lang
65
+ prelude: |2
66
+ response = load_response("../test/net/imap/fixtures/response_parser/body_structure_responses.yml",
67
+ "test_bodystructure_bug11128_ext_mpart_without_lang")
68
+ script: parser.parse(response)
69
+ - name: bodystructure_bug7146_msg_delivery_status
70
+ prelude: |2
71
+ response = load_response("../test/net/imap/fixtures/response_parser/body_structure_responses.yml",
72
+ "test_bodystructure_bug7146_msg_delivery_status")
73
+ script: parser.parse(response)
74
+ - name: bodystructure_bug7147_message_rfc822_attachment
75
+ prelude: |2
76
+ response = load_response("../test/net/imap/fixtures/response_parser/body_structure_responses.yml",
77
+ "test_bodystructure_bug7147_message_rfc822_attachment")
78
+ script: parser.parse(response)
79
+ - name: bodystructure_bug8167_delivery_status_with_extra_data
80
+ prelude: |2
81
+ response = load_response("../test/net/imap/fixtures/response_parser/body_structure_responses.yml",
82
+ "test_bodystructure_bug8167_delivery_status_with_extra_data")
83
+ script: parser.parse(response)
84
+ - name: bodystructure_mixed_boundary
85
+ prelude: |2
86
+ response = load_response("../test/net/imap/fixtures/response_parser/body_structure_responses.yml",
87
+ "test_bodystructure_mixed_boundary")
88
+ script: parser.parse(response)
89
+ - name: continuation_request_without_response_text
90
+ prelude: |2
91
+ response = load_response("../test/net/imap/fixtures/response_parser/continuation_requests.yml",
92
+ "test_continuation_request_without_response_text")
93
+ script: parser.parse(response)
94
+ - name: fetch_msg_att_flags_and_uid
95
+ prelude: |2
96
+ response = load_response("../test/net/imap/fixtures/response_parser/fetch_responses.yml",
97
+ "test_fetch_msg_att_flags_and_uid")
98
+ script: parser.parse(response)
99
+ - name: fetch_msg_att_modseq
100
+ prelude: |2
101
+ response = load_response("../test/net/imap/fixtures/response_parser/fetch_responses.yml",
102
+ "test_fetch_msg_att_modseq")
103
+ script: parser.parse(response)
104
+ - name: fetch_msg_att_rfc822
105
+ prelude: |2
106
+ response = load_response("../test/net/imap/fixtures/response_parser/fetch_responses.yml",
107
+ "test_fetch_msg_att_rfc822")
108
+ script: parser.parse(response)
109
+ - name: fetch_msg_att_uid
110
+ prelude: |2
111
+ response = load_response("../test/net/imap/fixtures/response_parser/fetch_responses.yml",
112
+ "test_fetch_msg_att_uid")
113
+ script: parser.parse(response)
114
+ - name: id_gmail
115
+ prelude: |2
116
+ response = load_response("../test/net/imap/fixtures/response_parser/id_responses.yml",
117
+ "test_id_gmail")
118
+ script: parser.parse(response)
119
+ - name: id_rfc2971_example_3.1_nil
120
+ prelude: |2
121
+ response = load_response("../test/net/imap/fixtures/response_parser/id_responses.yml",
122
+ "test_id_rfc2971_example_3.1_nil")
123
+ script: parser.parse(response)
124
+ - name: id_rfc2971_example_3.2_cyrus
125
+ prelude: |2
126
+ response = load_response("../test/net/imap/fixtures/response_parser/id_responses.yml",
127
+ "test_id_rfc2971_example_3.2_cyrus")
128
+ script: parser.parse(response)
129
+ - name: invalid_bodystructure_bug7153_mixed
130
+ prelude: |2
131
+ response = load_response("../test/net/imap/fixtures/response_parser/body_structure_responses.yml",
132
+ "test_invalid_bodystructure_bug7153_mixed")
133
+ script: parser.parse(response)
134
+ - name: invalid_bodystructure_message_sent_as_basic
135
+ prelude: |2
136
+ response = load_response("../test/net/imap/fixtures/response_parser/body_structure_responses.yml",
137
+ "test_invalid_bodystructure_message_sent_as_basic")
138
+ script: parser.parse(response)
139
+ - name: invalid_capability_extra_space_at_end
140
+ prelude: |2
141
+ response = load_response("../test/net/imap/fixtures/response_parser/capability_responses.yml",
142
+ "test_invalid_capability_extra_space_at_end")
143
+ script: parser.parse(response)
144
+ - name: invalid_fetch_msg_att_extra_space
145
+ prelude: |2
146
+ response = load_response("../test/net/imap/fixtures/response_parser/fetch_responses.yml",
147
+ "test_invalid_fetch_msg_att_extra_space")
148
+ script: parser.parse(response)
149
+ - name: invalid_fetch_msg_att_rfc822_with_brackets
150
+ prelude: |2
151
+ response = load_response("../test/net/imap/fixtures/response_parser/fetch_responses.yml",
152
+ "test_invalid_fetch_msg_att_rfc822_with_brackets")
153
+ script: parser.parse(response)
154
+ - name: invalid_noop_response_is_ignored
155
+ prelude: |2
156
+ response = load_response("../test/net/imap/fixtures/response_parser/quirky_behaviors.yml",
157
+ "test_invalid_noop_response_is_ignored")
158
+ script: parser.parse(response)
159
+ - name: invalid_search_response_multiple_result_with_trailing_space
160
+ prelude: |2
161
+ response = load_response("../test/net/imap/fixtures/response_parser/search_responses.yml",
162
+ "test_invalid_search_response_multiple_result_with_trailing_space")
163
+ script: parser.parse(response)
164
+ - name: invalid_search_response_single_result_with_trailing_space
165
+ prelude: |2
166
+ response = load_response("../test/net/imap/fixtures/response_parser/search_responses.yml",
167
+ "test_invalid_search_response_single_result_with_trailing_space")
168
+ script: parser.parse(response)
169
+ - name: invalid_status_response_trailing_space
170
+ prelude: |2
171
+ response = load_response("../test/net/imap/fixtures/response_parser/status_responses.yml",
172
+ "test_invalid_status_response_trailing_space")
173
+ script: parser.parse(response)
174
+ - name: invalid_thread_empty_response
175
+ prelude: |2
176
+ response = load_response("../test/net/imap/fixtures/response_parser/thread_responses.yml",
177
+ "test_invalid_thread_empty_response")
178
+ script: parser.parse(response)
179
+ - name: list_with_various_flag_types_and_capitalizations
180
+ prelude: |2
181
+ response = load_response("../test/net/imap/fixtures/response_parser/list_responses.yml",
182
+ "test_list_with_various_flag_types_and_capitalizations")
183
+ script: parser.parse(response)
184
+ - name: resp_code_ALREADYEXISTS_rfc9051_7.1_example
185
+ prelude: |2
186
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
187
+ "test_resp_code_ALREADYEXISTS_rfc9051_7.1_example")
188
+ script: parser.parse(response)
189
+ - name: resp_code_APPENDUID_rfc9051_6.3.12_example
190
+ prelude: |2
191
+ response = load_response("../test/net/imap/fixtures/response_parser/uidplus_extension.yml",
192
+ "test_resp_code_APPENDUID_rfc9051_6.3.12_example")
193
+ script: parser.parse(response)
194
+ - name: resp_code_APPENDUID_with_MULTIAPPEND_compatibility
195
+ prelude: |2
196
+ response = load_response("../test/net/imap/fixtures/response_parser/uidplus_extension.yml",
197
+ "test_resp_code_APPENDUID_with_MULTIAPPEND_compatibility")
198
+ script: parser.parse(response)
199
+ - name: resp_code_AUTHENTICATIONFAILED_rfc9051_7.1_example
200
+ prelude: |2
201
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
202
+ "test_resp_code_AUTHENTICATIONFAILED_rfc9051_7.1_example")
203
+ script: parser.parse(response)
204
+ - name: resp_code_AUTHORIZATIONFAILED_rfc9051_7.1_example_1
205
+ prelude: |2
206
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
207
+ "test_resp_code_AUTHORIZATIONFAILED_rfc9051_7.1_example_1")
208
+ script: parser.parse(response)
209
+ - name: resp_code_AUTHORIZATIONFAILED_rfc9051_7.1_example_2
210
+ prelude: |2
211
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
212
+ "test_resp_code_AUTHORIZATIONFAILED_rfc9051_7.1_example_2")
213
+ script: parser.parse(response)
214
+ - name: resp_code_BADCHARSET_rfc9051_6.4.4.4_example_modified
215
+ prelude: |2
216
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
217
+ "test_resp_code_BADCHARSET_rfc9051_6.4.4.4_example_modified")
218
+ script: parser.parse(response)
219
+ - name: resp_code_BADCHARSET_with_astrings
220
+ prelude: |2
221
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
222
+ "test_resp_code_BADCHARSET_with_astrings")
223
+ script: parser.parse(response)
224
+ - name: resp_code_CANNOT_rfc9051_7.1_example
225
+ prelude: |2
226
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
227
+ "test_resp_code_CANNOT_rfc9051_7.1_example")
228
+ script: parser.parse(response)
229
+ - name: resp_code_CAPABILITY_rfc9051_6.2.2_example
230
+ prelude: |2
231
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
232
+ "test_resp_code_CAPABILITY_rfc9051_6.2.2_example")
233
+ script: parser.parse(response)
234
+ - name: resp_code_CAPABILITY_with_valid_atoms
235
+ prelude: |2
236
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
237
+ "test_resp_code_CAPABILITY_with_valid_atoms")
238
+ script: parser.parse(response)
239
+ - name: resp_code_CLIENTBUG_rfc9051_7.1_example
240
+ prelude: |2
241
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
242
+ "test_resp_code_CLIENTBUG_rfc9051_7.1_example")
243
+ script: parser.parse(response)
244
+ - name: resp_code_CLOSED
245
+ prelude: |2
246
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
247
+ "test_resp_code_CLOSED")
248
+ script: parser.parse(response)
249
+ - name: resp_code_CONTACTADMIN_rfc9051_7.1_example
250
+ prelude: |2
251
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
252
+ "test_resp_code_CONTACTADMIN_rfc9051_7.1_example")
253
+ script: parser.parse(response)
254
+ - name: resp_code_COPYUID_rfc9051_6.3.12_example
255
+ prelude: |2
256
+ response = load_response("../test/net/imap/fixtures/response_parser/uidplus_extension.yml",
257
+ "test_resp_code_COPYUID_rfc9051_6.3.12_example")
258
+ script: parser.parse(response)
259
+ - name: resp_code_COPYUID_with_reversed_ranges_and_mixed_case
260
+ prelude: |2
261
+ response = load_response("../test/net/imap/fixtures/response_parser/uidplus_extension.yml",
262
+ "test_resp_code_COPYUID_with_reversed_ranges_and_mixed_case")
263
+ script: parser.parse(response)
264
+ - name: resp_code_CORRUPTION_rfc9051_7.1_example
265
+ prelude: |2
266
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
267
+ "test_resp_code_CORRUPTION_rfc9051_7.1_example")
268
+ script: parser.parse(response)
269
+ - name: resp_code_EXPIRED_rfc9051_7.1_example
270
+ prelude: |2
271
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
272
+ "test_resp_code_EXPIRED_rfc9051_7.1_example")
273
+ script: parser.parse(response)
274
+ - name: resp_code_EXPUNGEISSUED_rfc9051_7.1_example
275
+ prelude: |2
276
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
277
+ "test_resp_code_EXPUNGEISSUED_rfc9051_7.1_example")
278
+ script: parser.parse(response)
279
+ - name: resp_code_HASCHILDREN_rfc9051_7.1_example
280
+ prelude: |2
281
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
282
+ "test_resp_code_HASCHILDREN_rfc9051_7.1_example")
283
+ script: parser.parse(response)
284
+ - name: resp_code_INUSE_rfc9051_7.1_example
285
+ prelude: |2
286
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
287
+ "test_resp_code_INUSE_rfc9051_7.1_example")
288
+ script: parser.parse(response)
289
+ - name: resp_code_LIMIT_rfc9051_7.1_example
290
+ prelude: |2
291
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
292
+ "test_resp_code_LIMIT_rfc9051_7.1_example")
293
+ script: parser.parse(response)
294
+ - name: resp_code_NONEXISTENT_rfc9051_7.1_example
295
+ prelude: |2
296
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
297
+ "test_resp_code_NONEXISTENT_rfc9051_7.1_example")
298
+ script: parser.parse(response)
299
+ - name: resp_code_NOPERM_rfc9051_7.1_example
300
+ prelude: |2
301
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
302
+ "test_resp_code_NOPERM_rfc9051_7.1_example")
303
+ script: parser.parse(response)
304
+ - name: resp_code_OVERQUOTA_rfc9051_7.1_example_1
305
+ prelude: |2
306
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
307
+ "test_resp_code_OVERQUOTA_rfc9051_7.1_example_1")
308
+ script: parser.parse(response)
309
+ - name: resp_code_OVERQUOTA_rfc9051_7.1_example_2
310
+ prelude: |2
311
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
312
+ "test_resp_code_OVERQUOTA_rfc9051_7.1_example_2")
313
+ script: parser.parse(response)
314
+ - name: resp_code_PERMANENTFLAGS_rfc3501_6.3.1_example
315
+ prelude: |2
316
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
317
+ "test_resp_code_PERMANENTFLAGS_rfc3501_6.3.1_example")
318
+ script: parser.parse(response)
319
+ - name: resp_code_PERMANENTFLAGS_rfc3501_6.3.2_example
320
+ prelude: |2
321
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
322
+ "test_resp_code_PERMANENTFLAGS_rfc3501_6.3.2_example")
323
+ script: parser.parse(response)
324
+ - name: resp_code_PRIVACYREQUIRED_rfc9051_7.1_example
325
+ prelude: |2
326
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
327
+ "test_resp_code_PRIVACYREQUIRED_rfc9051_7.1_example")
328
+ script: parser.parse(response)
329
+ - name: resp_code_READ-ONLY_rfc3501_6.3.2_example
330
+ prelude: |2
331
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
332
+ "test_resp_code_READ-ONLY_rfc3501_6.3.2_example")
333
+ script: parser.parse(response)
334
+ - name: resp_code_READ-WRITE_rfc3501_6.3.1_example
335
+ prelude: |2
336
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
337
+ "test_resp_code_READ-WRITE_rfc3501_6.3.1_example")
338
+ script: parser.parse(response)
339
+ - name: resp_code_SERVERBUG_rfc9051_7.1_example
340
+ prelude: |2
341
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
342
+ "test_resp_code_SERVERBUG_rfc9051_7.1_example")
343
+ script: parser.parse(response)
344
+ - name: resp_code_UIDNEXT_rfc3501_6.3.1_example
345
+ prelude: |2
346
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
347
+ "test_resp_code_UIDNEXT_rfc3501_6.3.1_example")
348
+ script: parser.parse(response)
349
+ - name: resp_code_UIDVALIDITY_rfc3501_6.3.1_example
350
+ prelude: |2
351
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
352
+ "test_resp_code_UIDVALIDITY_rfc3501_6.3.1_example")
353
+ script: parser.parse(response)
354
+ - name: resp_code_UNAVAILABLE_rfc9051_7.1_example
355
+ prelude: |2
356
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
357
+ "test_resp_code_UNAVAILABLE_rfc9051_7.1_example")
358
+ script: parser.parse(response)
359
+ - name: resp_code_UNSEEN_rfc3501_6.3.1_example
360
+ prelude: |2
361
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_code_examples.yml",
362
+ "test_resp_code_UNSEEN_rfc3501_6.3.1_example")
363
+ script: parser.parse(response)
364
+ - name: resp_text_with_T_LBRA
365
+ prelude: |2
366
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_text_responses.yml",
367
+ "test_resp_text_with_T_LBRA")
368
+ script: parser.parse(response)
369
+ - name: rfc3501_6.1.1_example_1_capability_response
370
+ prelude: |2
371
+ response = load_response("../test/net/imap/fixtures/response_parser/capability_responses.yml",
372
+ "rfc3501_6.1.1_example_1_capability_response")
373
+ script: parser.parse(response)
374
+ - name: rfc3501_6.1.1_example_2_capability_response
375
+ prelude: |2
376
+ response = load_response("../test/net/imap/fixtures/response_parser/capability_responses.yml",
377
+ "rfc3501_6.1.1_example_2_capability_response")
378
+ script: parser.parse(response)
379
+ - name: rfc3501_6.2.2_example_continuation_request
380
+ prelude: |2
381
+ response = load_response("../test/net/imap/fixtures/response_parser/continuation_requests.yml",
382
+ "rfc3501_6.2.2_example_continuation_request")
383
+ script: parser.parse(response)
384
+ - name: rfc3501_6.3.11_example_continuation_request
385
+ prelude: |2
386
+ response = load_response("../test/net/imap/fixtures/response_parser/continuation_requests.yml",
387
+ "rfc3501_6.3.11_example_continuation_request")
388
+ script: parser.parse(response)
389
+ - name: rfc3501_7.1.1_OK_response_example_1
390
+ prelude: |2
391
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_cond_examples.yml",
392
+ "rfc3501_7.1.1_OK_response_example_1")
393
+ script: parser.parse(response)
394
+ - name: rfc3501_7.1.1_OK_response_example_2
395
+ prelude: |2
396
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_cond_examples.yml",
397
+ "rfc3501_7.1.1_OK_response_example_2")
398
+ script: parser.parse(response)
399
+ - name: rfc3501_7.1.1_OK_response_example_3
400
+ prelude: |2
401
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_cond_examples.yml",
402
+ "rfc3501_7.1.1_OK_response_example_3")
403
+ script: parser.parse(response)
404
+ - name: rfc3501_7.1.2_NO_response_example_1
405
+ prelude: |2
406
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_cond_examples.yml",
407
+ "rfc3501_7.1.2_NO_response_example_1")
408
+ script: parser.parse(response)
409
+ - name: rfc3501_7.1.2_NO_response_example_4
410
+ prelude: |2
411
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_cond_examples.yml",
412
+ "rfc3501_7.1.2_NO_response_example_4")
413
+ script: parser.parse(response)
414
+ - name: rfc3501_7.1.3_BAD_response_example
415
+ prelude: |2
416
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_cond_examples.yml",
417
+ "rfc3501_7.1.3_BAD_response_example")
418
+ script: parser.parse(response)
419
+ - name: rfc3501_7.1.4_PREAUTH_response_example
420
+ prelude: |2
421
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_cond_examples.yml",
422
+ "rfc3501_7.1.4_PREAUTH_response_example")
423
+ script: parser.parse(response)
424
+ - name: rfc3501_7.1.5_BYE_response_example
425
+ prelude: |2
426
+ response = load_response("../test/net/imap/fixtures/response_parser/resp_cond_examples.yml",
427
+ "rfc3501_7.1.5_BYE_response_example")
428
+ script: parser.parse(response)
429
+ - name: rfc3501_7.2.1_CAPABILITY_response_example
430
+ prelude: |2
431
+ response = load_response("../test/net/imap/fixtures/response_parser/capability_responses.yml",
432
+ "rfc3501_7.2.1_CAPABILITY_response_example")
433
+ script: parser.parse(response)
434
+ - name: rfc3501_7.2.2_LIST_response_example
435
+ prelude: |2
436
+ response = load_response("../test/net/imap/fixtures/response_parser/list_responses.yml",
437
+ "rfc3501_7.2.2_LIST_response_example")
438
+ script: parser.parse(response)
439
+ - name: rfc3501_7.2.3_LSUB_response_example
440
+ prelude: |2
441
+ response = load_response("../test/net/imap/fixtures/response_parser/list_responses.yml",
442
+ "rfc3501_7.2.3_LSUB_response_example")
443
+ script: parser.parse(response)
444
+ - name: rfc3501_7.2.4_STATUS_response_example
445
+ prelude: |2
446
+ response = load_response("../test/net/imap/fixtures/response_parser/status_responses.yml",
447
+ "rfc3501_7.2.4_STATUS_response_example")
448
+ script: parser.parse(response)
449
+ - name: rfc3501_7.2.5_SEARCH_response_example
450
+ prelude: |2
451
+ response = load_response("../test/net/imap/fixtures/response_parser/search_responses.yml",
452
+ "rfc3501_7.2.5_SEARCH_response_example")
453
+ script: parser.parse(response)
454
+ - name: rfc3501_7.2.6_FLAGS_response_example
455
+ prelude: |2
456
+ response = load_response("../test/net/imap/fixtures/response_parser/flags_responses.yml",
457
+ "rfc3501_7.2.6_FLAGS_response_example")
458
+ script: parser.parse(response)
459
+ - name: rfc3501_7.3.1_EXISTS_response_example
460
+ prelude: |2
461
+ response = load_response("../test/net/imap/fixtures/response_parser/mailbox_size_responses.yml",
462
+ "rfc3501_7.3.1_EXISTS_response_example")
463
+ script: parser.parse(response)
464
+ - name: rfc3501_7.3.2_RECENT_response_example
465
+ prelude: |2
466
+ response = load_response("../test/net/imap/fixtures/response_parser/mailbox_size_responses.yml",
467
+ "rfc3501_7.3.2_RECENT_response_example")
468
+ script: parser.parse(response)
469
+ - name: rfc3501_7.4.1_EXPUNGE_response_example
470
+ prelude: |2
471
+ response = load_response("../test/net/imap/fixtures/response_parser/expunge_responses.yml",
472
+ "rfc3501_7.4.1_EXPUNGE_response_example")
473
+ script: parser.parse(response)
474
+ - name: rfc3501_7.4.2_FETCH_response_example
475
+ prelude: |2
476
+ response = load_response("../test/net/imap/fixtures/response_parser/fetch_responses.yml",
477
+ "rfc3501_7.4.2_FETCH_response_example")
478
+ script: parser.parse(response)
479
+ - name: rfc3501_7.5_continuation_request_example
480
+ prelude: |2
481
+ response = load_response("../test/net/imap/fixtures/response_parser/continuation_requests.yml",
482
+ "rfc3501_7.5_continuation_request_example")
483
+ script: parser.parse(response)
484
+ - name: rfc3501_8_example_1_UNSEEN_response_code
485
+ prelude: |2
486
+ response = load_response("../test/net/imap/fixtures/response_parser/rfc3501_examples.yml",
487
+ "rfc3501_8_example_1_UNSEEN_response_code")
488
+ script: parser.parse(response)
489
+ - name: rfc3501_8_example_2_UIDVALIDITY_response_code
490
+ prelude: |2
491
+ response = load_response("../test/net/imap/fixtures/response_parser/rfc3501_examples.yml",
492
+ "rfc3501_8_example_2_UIDVALIDITY_response_code")
493
+ script: parser.parse(response)
494
+ - name: rfc3501_8_example_3_FETCH_ENVELOPE
495
+ prelude: |2
496
+ response = load_response("../test/net/imap/fixtures/response_parser/rfc3501_examples.yml",
497
+ "rfc3501_8_example_3_FETCH_ENVELOPE")
498
+ script: parser.parse(response)
499
+ - name: rfc3501_8_example_4_FETCH_BODY[HEADER]
500
+ prelude: |2
501
+ response = load_response("../test/net/imap/fixtures/response_parser/rfc3501_examples.yml",
502
+ "rfc3501_8_example_4_FETCH_BODY[HEADER]")
503
+ script: parser.parse(response)
504
+ - name: rfc9051_7.2.1_ENABLED_example
505
+ prelude: |2
506
+ response = load_response("../test/net/imap/fixtures/response_parser/enabled_responses.yml",
507
+ "rfc9051_7.2.1_ENABLED_example")
508
+ script: parser.parse(response)
509
+ - name: rfc9051_7.2.2_capability_example
510
+ prelude: |2
511
+ response = load_response("../test/net/imap/fixtures/response_parser/capability_responses.yml",
512
+ "rfc9051_7.2.2_capability_example")
513
+ script: parser.parse(response)
514
+ - name: search_response_empty
515
+ prelude: |2
516
+ response = load_response("../test/net/imap/fixtures/response_parser/search_responses.yml",
517
+ "test_search_response_empty")
518
+ script: parser.parse(response)
519
+ - name: search_response_multiple_seq_nums_returned
520
+ prelude: |2
521
+ response = load_response("../test/net/imap/fixtures/response_parser/search_responses.yml",
522
+ "test_search_response_multiple_seq_nums_returned")
523
+ script: parser.parse(response)
524
+ - name: search_response_single_seq_nums_returned
525
+ prelude: |2
526
+ response = load_response("../test/net/imap/fixtures/response_parser/search_responses.yml",
527
+ "test_search_response_single_seq_nums_returned")
528
+ script: parser.parse(response)
529
+ - name: search_response_with_condstore_modseq
530
+ prelude: |2
531
+ response = load_response("../test/net/imap/fixtures/response_parser/search_responses.yml",
532
+ "test_search_response_with_condstore_modseq")
533
+ script: parser.parse(response)
534
+ - name: status_response_uidnext_uidvalidity
535
+ prelude: |2
536
+ response = load_response("../test/net/imap/fixtures/response_parser/status_responses.yml",
537
+ "test_status_response_uidnext_uidvalidity")
538
+ script: parser.parse(response)
539
+ - name: thread_rfc5256_example1
540
+ prelude: |2
541
+ response = load_response("../test/net/imap/fixtures/response_parser/thread_responses.yml",
542
+ "thread_rfc5256_example1")
543
+ script: parser.parse(response)
544
+ - name: thread_rfc5256_example2
545
+ prelude: |2
546
+ response = load_response("../test/net/imap/fixtures/response_parser/thread_responses.yml",
547
+ "thread_rfc5256_example2")
548
+ script: parser.parse(response)
549
+ - name: thread_rfc5256_example3
550
+ prelude: |2
551
+ response = load_response("../test/net/imap/fixtures/response_parser/thread_responses.yml",
552
+ "thread_rfc5256_example3")
553
+ script: parser.parse(response)
554
+ - name: thread_rfc5256_example4
555
+ prelude: |2
556
+ response = load_response("../test/net/imap/fixtures/response_parser/thread_responses.yml",
557
+ "thread_rfc5256_example4")
558
+ script: parser.parse(response)
559
+ - name: thread_rfc5256_example5
560
+ prelude: |2
561
+ response = load_response("../test/net/imap/fixtures/response_parser/thread_responses.yml",
562
+ "thread_rfc5256_example5")
563
+ script: parser.parse(response)
564
+ - name: utf8_in_list_mailbox
565
+ prelude: |2
566
+ response = load_response("../test/net/imap/fixtures/response_parser/utf8_responses.yml",
567
+ "test_utf8_in_list_mailbox")
568
+ script: parser.parse(response)
569
+ - name: utf8_in_resp_text
570
+ prelude: |2
571
+ response = load_response("../test/net/imap/fixtures/response_parser/utf8_responses.yml",
572
+ "test_utf8_in_resp_text")
573
+ script: parser.parse(response)
574
+ - name: xlist_inbox
575
+ prelude: |2
576
+ response = load_response("../test/net/imap/fixtures/response_parser/list_responses.yml",
577
+ "test_xlist_inbox")
578
+ script: parser.parse(response)
@@ -24,7 +24,7 @@ prelude: |
24
24
  $LOAD_PATH.unshift "./lib"
25
25
  require "net/imap"
26
26
  def net_imap_saslprep(string)
27
- Net::IMAP::SASL::SASLprep.saslprep string, exception: false
27
+ Net::IMAP::StringPrep::SASLprep.saslprep string, exception: false
28
28
  end
29
29
 
30
30
  def libidn_saslprep(string)