gmail 0.6.0 → 0.7.0

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 (94) hide show
  1. checksums.yaml +4 -4
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +27 -27
  4. data/.rspec +1 -1
  5. data/.rubocop.yml +53 -13
  6. data/.rubocop_todo.yml +299 -239
  7. data/.travis.yml +19 -19
  8. data/CHANGELOG.md +152 -145
  9. data/Gemfile +5 -3
  10. data/LICENSE +21 -21
  11. data/README.md +380 -355
  12. data/Rakefile +44 -46
  13. data/gmail.gemspec +32 -34
  14. data/lib/gmail.rb +72 -78
  15. data/lib/gmail/client.rb +35 -34
  16. data/lib/gmail/client/base.rb +244 -229
  17. data/lib/gmail/client/plain.rb +24 -24
  18. data/lib/gmail/client/xoauth.rb +67 -68
  19. data/lib/gmail/client/xoauth2.rb +39 -39
  20. data/lib/gmail/imap_extensions.rb +156 -159
  21. data/lib/gmail/labels.rb +80 -79
  22. data/lib/gmail/mailbox.rb +178 -175
  23. data/lib/gmail/message.rb +212 -207
  24. data/lib/gmail/version.rb +3 -3
  25. data/spec/account.yml.example +1 -1
  26. data/spec/account.yml.obfus +2 -2
  27. data/spec/gmail/client/base_spec.rb +5 -5
  28. data/spec/gmail/client/plain_spec.rb +169 -169
  29. data/spec/gmail/client/xoauth2_spec.rb +186 -186
  30. data/spec/gmail/client/xoauth_spec.rb +5 -5
  31. data/spec/gmail/client_spec.rb +5 -5
  32. data/spec/gmail/imap_extensions_spec.rb +47 -47
  33. data/spec/gmail/labels_spec.rb +27 -27
  34. data/spec/gmail/mailbox_spec.rb +84 -84
  35. data/spec/gmail/message_spec.rb +181 -181
  36. data/spec/gmail_spec.rb +40 -39
  37. data/spec/recordings/gmail/_new_connects_with_client_and_give_it_context_when_block_given.yml +61 -28
  38. data/spec/recordings/gmail/_new_connects_with_gmail_service_and_return_valid_connection_object.yml +43 -28
  39. data/spec/recordings/gmail/_new_does_not_raise_error_when_couldn_t_connect_with_given_account.yml +21 -13
  40. data/spec/recordings/gmail/_new_raises_error_when_couldn_t_connect_with_given_account.yml +21 -13
  41. data/spec/recordings/gmail_client_plain/instance/delivers_inline_composed_email.yml +61 -42
  42. data/spec/recordings/gmail_client_plain/instance/does_not_log_in_when_given_gmail_account_is_invalid.yml +21 -13
  43. data/spec/recordings/gmail_client_plain/instance/does_not_raise_error_even_though_gmail_account_is_invalid.yml +21 -13
  44. data/spec/recordings/gmail_client_plain/instance/labels/checks_if_there_is_given_label_defined.yml +409 -196
  45. data/spec/recordings/gmail_client_plain/instance/labels/creates_given_label.yml +280 -151
  46. data/spec/recordings/gmail_client_plain/instance/labels/removes_existing_label.yml +271 -146
  47. data/spec/recordings/gmail_client_plain/instance/labels/returns_list_of_all_available_labels.yml +227 -113
  48. data/spec/recordings/gmail_client_plain/instance/properly_logs_in_to_valid_gmail_account.yml +61 -42
  49. data/spec/recordings/gmail_client_plain/instance/properly_logs_out_from_gmail.yml +61 -42
  50. data/spec/recordings/gmail_client_plain/instance/properly_switches_to_given_mailbox.yml +164 -109
  51. data/spec/recordings/gmail_client_plain/instance/properly_switches_to_given_mailbox_using_block_style.yml +164 -109
  52. data/spec/recordings/gmail_client_plain/instance/raises_error_when_given_gmail_account_is_invalid_and_errors_enabled.yml +21 -13
  53. data/spec/recordings/gmail_client_xo_auth2/instance/does_not_log_in_when_given_gmail_account_is_invalid.yml +24 -13
  54. data/spec/recordings/gmail_client_xo_auth2/instance/labels/checks_if_there_is_given_label_defined.yml +39 -27
  55. data/spec/recordings/gmail_client_xo_auth2/instance/labels/creates_given_label.yml +52 -39
  56. data/spec/recordings/gmail_client_xo_auth2/instance/labels/removes_existing_label.yml +52 -39
  57. data/spec/recordings/gmail_client_xo_auth2/instance/labels/returns_list_of_all_available_labels.yml +39 -27
  58. data/spec/recordings/gmail_client_xo_auth2/instance/properly_logs_in_to_valid_gmail_account.yml +26 -15
  59. data/spec/recordings/gmail_client_xo_auth2/instance/properly_logs_out_from_gmail.yml +26 -15
  60. data/spec/recordings/gmail_client_xo_auth2/instance/properly_switches_to_given_mailbox.yml +63 -40
  61. data/spec/recordings/gmail_client_xo_auth2/instance/properly_switches_to_given_mailbox_using_block_style.yml +63 -40
  62. data/spec/recordings/gmail_client_xo_auth2/instance/raises_error_when_given_gmail_account_is_invalid_and_errors_enabled.yml +24 -13
  63. data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/all/localizes_into_the_appropriate_label.yml +229 -116
  64. data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/and_the_mailbox_does_not_exist/returns_the_mailbox_name_as_a_string.yml +229 -110
  65. data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/drafts/localizes_into_the_appropriate_label.yml +229 -116
  66. data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/flagged/localizes_into_the_appropriate_label.yml +229 -116
  67. data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/important/localizes_into_the_appropriate_label.yml +229 -116
  68. data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/inbox/localizes_into_the_appropriate_label.yml +61 -42
  69. data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/junk/localizes_into_the_appropriate_label.yml +229 -116
  70. data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/sent/localizes_into_the_appropriate_label.yml +229 -116
  71. data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/trash/localizes_into_the_appropriate_label.yml +229 -116
  72. data/spec/recordings/gmail_mailbox/instance/counts_all_emails.yml +595 -277
  73. data/spec/recordings/gmail_mailbox/instance/finds_messages.yml +1049 -586
  74. data/spec/recordings/gmail_mailbox/instance/waits_once.yml +191 -136
  75. data/spec/recordings/gmail_mailbox/instance/waits_repeatedly.yml +217 -141
  76. data/spec/recordings/gmail_mailbox/instance/waits_with_29-minute_re-issue.yml +188 -136
  77. data/spec/recordings/gmail_mailbox/instance/waits_with_an_unblocked_connection.yml +644 -207
  78. data/spec/recordings/gmail_mailbox/on_initialize/sets_client_and_name.yml +61 -42
  79. data/spec/recordings/gmail_mailbox/on_initialize/works_in_inbox_by_default.yml +61 -42
  80. data/spec/recordings/gmail_message/initialize/sets_prefetch_attrs.yml +1068 -578
  81. data/spec/recordings/gmail_message/initialize/sets_uid_and_mailbox.yml +1068 -580
  82. data/spec/recordings/gmail_message/instance_methods/deletes_itself.yml +1084 -637
  83. data/spec/recordings/gmail_message/instance_methods/marks_itself_read.yml +1137 -682
  84. data/spec/recordings/gmail_message/instance_methods/marks_itself_unread.yml +1153 -686
  85. data/spec/recordings/gmail_message/instance_methods/moves_from_one_tag_to_other.yml +1447 -862
  86. data/spec/recordings/gmail_message/instance_methods/removes_a_given_label.yml +1288 -776
  87. data/spec/recordings/gmail_message/instance_methods/removes_a_given_label_with_old_method.yml +1288 -776
  88. data/spec/recordings/gmail_message/instance_methods/sets_given_label.yml +1165 -690
  89. data/spec/recordings/gmail_message/instance_methods/sets_given_label_with_old_method.yml +1157 -691
  90. data/spec/spec_helper.rb +56 -53
  91. data/spec/support/imap_mock.rb +181 -181
  92. data/spec/support/obfuscation.rb +49 -52
  93. metadata +21 -90
  94. data/spec/recordings/gmail_client_plain/instance/_connection_automatically_logs_in_to_gmail_account_when_it_s_called.yml +0 -42
@@ -1,151 +1,280 @@
1
- ---
2
- LOGIN-9a890af1c86854f5170d99be6e10b8f1:
3
- - - :return
4
- - !ruby/struct:Net::IMAP::TaggedResponse
5
- tag: RUBY0001
6
- name: OK
7
- data: !ruby/struct:Net::IMAP::ResponseText
8
- code:
9
- text: ki0zvkyi1yzgy7xu4f4dh46nqrcecm@gmail.com authenticated (Success)
10
- raw_data: "RUBY0001 OK ki0zvkyi1yzgy7xu4f4dh46nqrcecm@gmail.com authenticated
11
- (Success)\r\n"
12
- - CAPABILITY: &1
13
- - - IMAP4REV1
14
- - UNSELECT
15
- - IDLE
16
- - NAMESPACE
17
- - QUOTA
18
- - ID
19
- - XLIST
20
- - CHILDREN
21
- - X-GM-EXT-1
22
- - UIDPLUS
23
- - COMPRESS=DEFLATE
24
- - ENABLE
25
- - MOVE
26
- - CONDSTORE
27
- - ESEARCH
28
- - UTF8=ACCEPT
29
- CREATE-873546102acc7776d52edef1516784eb:
30
- - - :return
31
- - !ruby/struct:Net::IMAP::TaggedResponse
32
- tag: RUBY0002
33
- name: OK
34
- data: !ruby/struct:Net::IMAP::ResponseText
35
- code:
36
- text: Success
37
- raw_data: "RUBY0002 OK Success\r\n"
38
- - CAPABILITY: *1
39
- - - :raise
40
- - !ruby/exception:Net::IMAP::NoResponseError
41
- message: " Duplicate folder name MYLABEL (Failure)"
42
- response: !ruby/struct:Net::IMAP::TaggedResponse
43
- tag: RUBY0005
44
- name: 'NO'
45
- data: !ruby/struct:Net::IMAP::ResponseText
46
- code: !ruby/struct:Net::IMAP::ResponseCode
47
- name: ALREADYEXISTS
48
- data:
49
- text: " Duplicate folder name MYLABEL (Failure)"
50
- raw_data: "RUBY0005 NO [ALREADYEXISTS] Duplicate folder name MYLABEL (Failure)\r\n"
51
- - CAPABILITY: *1
52
- LIST-e0583fa6130ee374cef031c01d8cc486:
53
- - - :return
54
- - !ruby/struct:Net::IMAP::TaggedResponse
55
- tag: RUBY0003
56
- name: OK
57
- data: !ruby/struct:Net::IMAP::ResponseText
58
- code:
59
- text: Success
60
- raw_data: "RUBY0003 OK Success\r\n"
61
- - CAPABILITY: *1
62
- LIST:
63
- - !ruby/struct:Net::IMAP::MailboxList
64
- attr:
65
- - :Hasnochildren
66
- delim: "/"
67
- name: Awesome
68
- - !ruby/struct:Net::IMAP::MailboxList
69
- attr:
70
- - :Hasnochildren
71
- delim: "/"
72
- name: Great
73
- - !ruby/struct:Net::IMAP::MailboxList
74
- attr:
75
- - :Hasnochildren
76
- delim: "/"
77
- name: INBOX
78
- - !ruby/struct:Net::IMAP::MailboxList
79
- attr:
80
- - :Hasnochildren
81
- delim: "/"
82
- name: MYLABEL
83
- - !ruby/struct:Net::IMAP::MailboxList
84
- attr:
85
- - :Noselect
86
- - :Haschildren
87
- delim: "/"
88
- name: "[Gmail]"
89
- LIST-94cc1ce946087e61b81baed886d31dbc:
90
- - - :return
91
- - !ruby/struct:Net::IMAP::TaggedResponse
92
- tag: RUBY0004
93
- name: OK
94
- data: !ruby/struct:Net::IMAP::ResponseText
95
- code:
96
- text: Success
97
- raw_data: "RUBY0004 OK Success\r\n"
98
- - CAPABILITY: *1
99
- LIST:
100
- - !ruby/struct:Net::IMAP::MailboxList
101
- attr:
102
- - :Hasnochildren
103
- - :All
104
- delim: "/"
105
- name: "[Gmail]/All Mail"
106
- - !ruby/struct:Net::IMAP::MailboxList
107
- attr:
108
- - :Hasnochildren
109
- - :Drafts
110
- delim: "/"
111
- name: "[Gmail]/Drafts"
112
- - !ruby/struct:Net::IMAP::MailboxList
113
- attr:
114
- - :Hasnochildren
115
- - :Important
116
- delim: "/"
117
- name: "[Gmail]/Important"
118
- - !ruby/struct:Net::IMAP::MailboxList
119
- attr:
120
- - :Sent
121
- - :Hasnochildren
122
- delim: "/"
123
- name: "[Gmail]/Sent Mail"
124
- - !ruby/struct:Net::IMAP::MailboxList
125
- attr:
126
- - :Hasnochildren
127
- - :Junk
128
- delim: "/"
129
- name: "[Gmail]/Spam"
130
- - !ruby/struct:Net::IMAP::MailboxList
131
- attr:
132
- - :Hasnochildren
133
- - :Flagged
134
- delim: "/"
135
- name: "[Gmail]/Starred"
136
- - !ruby/struct:Net::IMAP::MailboxList
137
- attr:
138
- - :Trash
139
- - :Hasnochildren
140
- delim: "/"
141
- name: "[Gmail]/Trash"
142
- DELETE-842c8f8a15eef1d47151d7a37868de75:
143
- - - :return
144
- - !ruby/struct:Net::IMAP::TaggedResponse
145
- tag: RUBY0006
146
- name: OK
147
- data: !ruby/struct:Net::IMAP::ResponseText
148
- code:
149
- text: Success
150
- raw_data: "RUBY0006 OK Success\r\n"
151
- - CAPABILITY: *1
1
+ ---
2
+ LOGIN-9a890af1c86854f5170d99be6e10b8f1:
3
+ - - :return
4
+ - !ruby/struct:Net::IMAP::TaggedResponse
5
+ tag: RUBY0001
6
+ name: OK
7
+ data: &2 !ruby/struct:Net::IMAP::ResponseText
8
+ code:
9
+ text: ki0zvkyi1yzgy7xu4f4dh46nqrcecm@gmail.com authenticated (Success)
10
+ raw_data: "RUBY0001 OK ki0zvkyi1yzgy7xu4f4dh46nqrcecm@gmail.com authenticated
11
+ (Success)\r\n"
12
+ - CAPABILITY: &3
13
+ - &1
14
+ - IMAP4REV1
15
+ - UNSELECT
16
+ - IDLE
17
+ - NAMESPACE
18
+ - QUOTA
19
+ - ID
20
+ - XLIST
21
+ - CHILDREN
22
+ - X-GM-EXT-1
23
+ - UIDPLUS
24
+ - COMPRESS=DEFLATE
25
+ - ENABLE
26
+ - MOVE
27
+ - CONDSTORE
28
+ - ESEARCH
29
+ - UTF8=ACCEPT
30
+ - LIST-EXTENDED
31
+ - LIST-STATUS
32
+ - - !ruby/struct:Net::IMAP::UntaggedResponse
33
+ name: CAPABILITY
34
+ data: *1
35
+ raw_data: "* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN
36
+ X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE ENABLE MOVE CONDSTORE ESEARCH UTF8=ACCEPT
37
+ LIST-EXTENDED LIST-STATUS\r\n"
38
+ - !ruby/struct:Net::IMAP::TaggedResponse
39
+ tag: RUBY0001
40
+ name: OK
41
+ data: *2
42
+ raw_data: "RUBY0001 OK ki0zvkyi1yzgy7xu4f4dh46nqrcecm@gmail.com authenticated
43
+ (Success)\r\n"
44
+ CREATE-873546102acc7776d52edef1516784eb:
45
+ - - :return
46
+ - !ruby/struct:Net::IMAP::TaggedResponse
47
+ tag: RUBY0002
48
+ name: OK
49
+ data: &4 !ruby/struct:Net::IMAP::ResponseText
50
+ code:
51
+ text: Success
52
+ raw_data: "RUBY0002 OK Success\r\n"
53
+ - CAPABILITY: *3
54
+ - - !ruby/struct:Net::IMAP::TaggedResponse
55
+ tag: RUBY0002
56
+ name: OK
57
+ data: *4
58
+ raw_data: "RUBY0002 OK Success\r\n"
59
+ - - :raise
60
+ - !ruby/exception:Net::IMAP::NoResponseError
61
+ message: " Duplicate folder name MYLABEL (Failure)"
62
+ response: &5 !ruby/struct:Net::IMAP::TaggedResponse
63
+ tag: RUBY0005
64
+ name: 'NO'
65
+ data: !ruby/struct:Net::IMAP::ResponseText
66
+ code: !ruby/struct:Net::IMAP::ResponseCode
67
+ name: ALREADYEXISTS
68
+ data:
69
+ text: " Duplicate folder name MYLABEL (Failure)"
70
+ raw_data: "RUBY0005 NO [ALREADYEXISTS] Duplicate folder name MYLABEL (Failure)\r\n"
71
+ - CAPABILITY: *3
72
+ - - *5
73
+ LIST-e0583fa6130ee374cef031c01d8cc486:
74
+ - - :return
75
+ - !ruby/struct:Net::IMAP::TaggedResponse
76
+ tag: RUBY0003
77
+ name: OK
78
+ data: &16 !ruby/struct:Net::IMAP::ResponseText
79
+ code:
80
+ text: Success
81
+ raw_data: "RUBY0003 OK Success\r\n"
82
+ - CAPABILITY: *3
83
+ LIST:
84
+ - &6 !ruby/struct:Net::IMAP::MailboxList
85
+ attr:
86
+ - :Hasnochildren
87
+ delim: "/"
88
+ name: Awesome
89
+ - &7 !ruby/struct:Net::IMAP::MailboxList
90
+ attr:
91
+ - :Hasnochildren
92
+ delim: "/"
93
+ name: Great
94
+ - &8 !ruby/struct:Net::IMAP::MailboxList
95
+ attr:
96
+ - :Hasnochildren
97
+ delim: "/"
98
+ name: INBOX
99
+ - &9 !ruby/struct:Net::IMAP::MailboxList
100
+ attr:
101
+ - :Hasnochildren
102
+ delim: "/"
103
+ name: MYLABEL
104
+ - &10 !ruby/struct:Net::IMAP::MailboxList
105
+ attr:
106
+ - :Hasnochildren
107
+ delim: "/"
108
+ name: Ni&APE-os
109
+ - &11 !ruby/struct:Net::IMAP::MailboxList
110
+ attr:
111
+ - :Haschildren
112
+ - :Noselect
113
+ delim: "/"
114
+ name: "[Gmail]"
115
+ - &12 !ruby/struct:Net::IMAP::MailboxList
116
+ attr:
117
+ - :Hasnochildren
118
+ delim: "/"
119
+ name: "\\Junk"
120
+ - &13 !ruby/struct:Net::IMAP::MailboxList
121
+ attr:
122
+ - :Hasnochildren
123
+ delim: "/"
124
+ name: one's and two's
125
+ - &14 !ruby/struct:Net::IMAP::MailboxList
126
+ attr:
127
+ - :Hasnochildren
128
+ delim: "/"
129
+ name: some new label
130
+ - &15 !ruby/struct:Net::IMAP::MailboxList
131
+ attr:
132
+ - :Hasnochildren
133
+ delim: "/"
134
+ name: some other label
135
+ - - !ruby/struct:Net::IMAP::UntaggedResponse
136
+ name: LIST
137
+ data: *6
138
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"Awesome\"\r\n"
139
+ - !ruby/struct:Net::IMAP::UntaggedResponse
140
+ name: LIST
141
+ data: *7
142
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"Great\"\r\n"
143
+ - !ruby/struct:Net::IMAP::UntaggedResponse
144
+ name: LIST
145
+ data: *8
146
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"INBOX\"\r\n"
147
+ - !ruby/struct:Net::IMAP::UntaggedResponse
148
+ name: LIST
149
+ data: *9
150
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"MYLABEL\"\r\n"
151
+ - !ruby/struct:Net::IMAP::UntaggedResponse
152
+ name: LIST
153
+ data: *10
154
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"Ni&APE-os\"\r\n"
155
+ - !ruby/struct:Net::IMAP::UntaggedResponse
156
+ name: LIST
157
+ data: *11
158
+ raw_data: "* LIST (\\HasChildren \\Noselect) \"/\" \"[Gmail]\"\r\n"
159
+ - !ruby/struct:Net::IMAP::UntaggedResponse
160
+ name: LIST
161
+ data: *12
162
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"\\\\Junk\"\r\n"
163
+ - !ruby/struct:Net::IMAP::UntaggedResponse
164
+ name: LIST
165
+ data: *13
166
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"one's and two's\"\r\n"
167
+ - !ruby/struct:Net::IMAP::UntaggedResponse
168
+ name: LIST
169
+ data: *14
170
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"some new label\"\r\n"
171
+ - !ruby/struct:Net::IMAP::UntaggedResponse
172
+ name: LIST
173
+ data: *15
174
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"some other label\"\r\n"
175
+ - !ruby/struct:Net::IMAP::TaggedResponse
176
+ tag: RUBY0003
177
+ name: OK
178
+ data: *16
179
+ raw_data: "RUBY0003 OK Success\r\n"
180
+ LIST-94cc1ce946087e61b81baed886d31dbc:
181
+ - - :return
182
+ - !ruby/struct:Net::IMAP::TaggedResponse
183
+ tag: RUBY0004
184
+ name: OK
185
+ data: &24 !ruby/struct:Net::IMAP::ResponseText
186
+ code:
187
+ text: Success
188
+ raw_data: "RUBY0004 OK Success\r\n"
189
+ - CAPABILITY: *3
190
+ LIST:
191
+ - &17 !ruby/struct:Net::IMAP::MailboxList
192
+ attr:
193
+ - :All
194
+ - :Hasnochildren
195
+ delim: "/"
196
+ name: "[Gmail]/All Mail"
197
+ - &18 !ruby/struct:Net::IMAP::MailboxList
198
+ attr:
199
+ - :Drafts
200
+ - :Hasnochildren
201
+ delim: "/"
202
+ name: "[Gmail]/Drafts"
203
+ - &19 !ruby/struct:Net::IMAP::MailboxList
204
+ attr:
205
+ - :Hasnochildren
206
+ - :Important
207
+ delim: "/"
208
+ name: "[Gmail]/Important"
209
+ - &20 !ruby/struct:Net::IMAP::MailboxList
210
+ attr:
211
+ - :Hasnochildren
212
+ - :Sent
213
+ delim: "/"
214
+ name: "[Gmail]/Sent Mail"
215
+ - &21 !ruby/struct:Net::IMAP::MailboxList
216
+ attr:
217
+ - :Hasnochildren
218
+ - :Junk
219
+ delim: "/"
220
+ name: "[Gmail]/Spam"
221
+ - &22 !ruby/struct:Net::IMAP::MailboxList
222
+ attr:
223
+ - :Flagged
224
+ - :Hasnochildren
225
+ delim: "/"
226
+ name: "[Gmail]/Starred"
227
+ - &23 !ruby/struct:Net::IMAP::MailboxList
228
+ attr:
229
+ - :Hasnochildren
230
+ - :Trash
231
+ delim: "/"
232
+ name: "[Gmail]/Trash"
233
+ - - !ruby/struct:Net::IMAP::UntaggedResponse
234
+ name: LIST
235
+ data: *17
236
+ raw_data: "* LIST (\\All \\HasNoChildren) \"/\" \"[Gmail]/All Mail\"\r\n"
237
+ - !ruby/struct:Net::IMAP::UntaggedResponse
238
+ name: LIST
239
+ data: *18
240
+ raw_data: "* LIST (\\Drafts \\HasNoChildren) \"/\" \"[Gmail]/Drafts\"\r\n"
241
+ - !ruby/struct:Net::IMAP::UntaggedResponse
242
+ name: LIST
243
+ data: *19
244
+ raw_data: "* LIST (\\HasNoChildren \\Important) \"/\" \"[Gmail]/Important\"\r\n"
245
+ - !ruby/struct:Net::IMAP::UntaggedResponse
246
+ name: LIST
247
+ data: *20
248
+ raw_data: "* LIST (\\HasNoChildren \\Sent) \"/\" \"[Gmail]/Sent Mail\"\r\n"
249
+ - !ruby/struct:Net::IMAP::UntaggedResponse
250
+ name: LIST
251
+ data: *21
252
+ raw_data: "* LIST (\\HasNoChildren \\Junk) \"/\" \"[Gmail]/Spam\"\r\n"
253
+ - !ruby/struct:Net::IMAP::UntaggedResponse
254
+ name: LIST
255
+ data: *22
256
+ raw_data: "* LIST (\\Flagged \\HasNoChildren) \"/\" \"[Gmail]/Starred\"\r\n"
257
+ - !ruby/struct:Net::IMAP::UntaggedResponse
258
+ name: LIST
259
+ data: *23
260
+ raw_data: "* LIST (\\HasNoChildren \\Trash) \"/\" \"[Gmail]/Trash\"\r\n"
261
+ - !ruby/struct:Net::IMAP::TaggedResponse
262
+ tag: RUBY0004
263
+ name: OK
264
+ data: *24
265
+ raw_data: "RUBY0004 OK Success\r\n"
266
+ DELETE-842c8f8a15eef1d47151d7a37868de75:
267
+ - - :return
268
+ - !ruby/struct:Net::IMAP::TaggedResponse
269
+ tag: RUBY0006
270
+ name: OK
271
+ data: &25 !ruby/struct:Net::IMAP::ResponseText
272
+ code:
273
+ text: Success
274
+ raw_data: "RUBY0006 OK Success\r\n"
275
+ - CAPABILITY: *3
276
+ - - !ruby/struct:Net::IMAP::TaggedResponse
277
+ tag: RUBY0006
278
+ name: OK
279
+ data: *25
280
+ raw_data: "RUBY0006 OK Success\r\n"
@@ -1,146 +1,271 @@
1
- ---
2
- LOGIN-9a890af1c86854f5170d99be6e10b8f1:
3
- - - :return
4
- - !ruby/struct:Net::IMAP::TaggedResponse
5
- tag: RUBY0001
6
- name: OK
7
- data: !ruby/struct:Net::IMAP::ResponseText
8
- code:
9
- text: ki0zvkyi1yzgy7xu4f4dh46nqrcecm@gmail.com authenticated (Success)
10
- raw_data: "RUBY0001 OK ki0zvkyi1yzgy7xu4f4dh46nqrcecm@gmail.com authenticated
11
- (Success)\r\n"
12
- - CAPABILITY: &1
13
- - - IMAP4REV1
14
- - UNSELECT
15
- - IDLE
16
- - NAMESPACE
17
- - QUOTA
18
- - ID
19
- - XLIST
20
- - CHILDREN
21
- - X-GM-EXT-1
22
- - UIDPLUS
23
- - COMPRESS=DEFLATE
24
- - ENABLE
25
- - MOVE
26
- - CONDSTORE
27
- - ESEARCH
28
- - UTF8=ACCEPT
29
- CREATE-873546102acc7776d52edef1516784eb:
30
- - - :return
31
- - !ruby/struct:Net::IMAP::TaggedResponse
32
- tag: RUBY0002
33
- name: OK
34
- data: !ruby/struct:Net::IMAP::ResponseText
35
- code:
36
- text: Success
37
- raw_data: "RUBY0002 OK Success\r\n"
38
- - CAPABILITY: *1
39
- DELETE-842c8f8a15eef1d47151d7a37868de75:
40
- - - :return
41
- - !ruby/struct:Net::IMAP::TaggedResponse
42
- tag: RUBY0003
43
- name: OK
44
- data: !ruby/struct:Net::IMAP::ResponseText
45
- code:
46
- text: Success
47
- raw_data: "RUBY0003 OK Success\r\n"
48
- - CAPABILITY: *1
49
- - - :raise
50
- - !ruby/exception:Net::IMAP::NoResponseError
51
- message: " Unknown folder. (Failure)"
52
- response: !ruby/struct:Net::IMAP::TaggedResponse
53
- tag: RUBY0006
54
- name: 'NO'
55
- data: !ruby/struct:Net::IMAP::ResponseText
56
- code: !ruby/struct:Net::IMAP::ResponseCode
57
- name: NONEXISTENT
58
- data:
59
- text: " Unknown folder. (Failure)"
60
- raw_data: "RUBY0006 NO [NONEXISTENT] Unknown folder. (Failure)\r\n"
61
- - CAPABILITY: *1
62
- LIST-e0583fa6130ee374cef031c01d8cc486:
63
- - - :return
64
- - !ruby/struct:Net::IMAP::TaggedResponse
65
- tag: RUBY0004
66
- name: OK
67
- data: !ruby/struct:Net::IMAP::ResponseText
68
- code:
69
- text: Success
70
- raw_data: "RUBY0004 OK Success\r\n"
71
- - CAPABILITY: *1
72
- LIST:
73
- - !ruby/struct:Net::IMAP::MailboxList
74
- attr:
75
- - :Hasnochildren
76
- delim: "/"
77
- name: Awesome
78
- - !ruby/struct:Net::IMAP::MailboxList
79
- attr:
80
- - :Hasnochildren
81
- delim: "/"
82
- name: Great
83
- - !ruby/struct:Net::IMAP::MailboxList
84
- attr:
85
- - :Hasnochildren
86
- delim: "/"
87
- name: INBOX
88
- - !ruby/struct:Net::IMAP::MailboxList
89
- attr:
90
- - :Noselect
91
- - :Haschildren
92
- delim: "/"
93
- name: "[Gmail]"
94
- LIST-94cc1ce946087e61b81baed886d31dbc:
95
- - - :return
96
- - !ruby/struct:Net::IMAP::TaggedResponse
97
- tag: RUBY0005
98
- name: OK
99
- data: !ruby/struct:Net::IMAP::ResponseText
100
- code:
101
- text: Success
102
- raw_data: "RUBY0005 OK Success\r\n"
103
- - CAPABILITY: *1
104
- LIST:
105
- - !ruby/struct:Net::IMAP::MailboxList
106
- attr:
107
- - :Hasnochildren
108
- - :All
109
- delim: "/"
110
- name: "[Gmail]/All Mail"
111
- - !ruby/struct:Net::IMAP::MailboxList
112
- attr:
113
- - :Hasnochildren
114
- - :Drafts
115
- delim: "/"
116
- name: "[Gmail]/Drafts"
117
- - !ruby/struct:Net::IMAP::MailboxList
118
- attr:
119
- - :Hasnochildren
120
- - :Important
121
- delim: "/"
122
- name: "[Gmail]/Important"
123
- - !ruby/struct:Net::IMAP::MailboxList
124
- attr:
125
- - :Sent
126
- - :Hasnochildren
127
- delim: "/"
128
- name: "[Gmail]/Sent Mail"
129
- - !ruby/struct:Net::IMAP::MailboxList
130
- attr:
131
- - :Hasnochildren
132
- - :Junk
133
- delim: "/"
134
- name: "[Gmail]/Spam"
135
- - !ruby/struct:Net::IMAP::MailboxList
136
- attr:
137
- - :Hasnochildren
138
- - :Flagged
139
- delim: "/"
140
- name: "[Gmail]/Starred"
141
- - !ruby/struct:Net::IMAP::MailboxList
142
- attr:
143
- - :Trash
144
- - :Hasnochildren
145
- delim: "/"
146
- name: "[Gmail]/Trash"
1
+ ---
2
+ LOGIN-9a890af1c86854f5170d99be6e10b8f1:
3
+ - - :return
4
+ - !ruby/struct:Net::IMAP::TaggedResponse
5
+ tag: RUBY0001
6
+ name: OK
7
+ data: &2 !ruby/struct:Net::IMAP::ResponseText
8
+ code:
9
+ text: ki0zvkyi1yzgy7xu4f4dh46nqrcecm@gmail.com authenticated (Success)
10
+ raw_data: "RUBY0001 OK ki0zvkyi1yzgy7xu4f4dh46nqrcecm@gmail.com authenticated
11
+ (Success)\r\n"
12
+ - CAPABILITY: &3
13
+ - &1
14
+ - IMAP4REV1
15
+ - UNSELECT
16
+ - IDLE
17
+ - NAMESPACE
18
+ - QUOTA
19
+ - ID
20
+ - XLIST
21
+ - CHILDREN
22
+ - X-GM-EXT-1
23
+ - UIDPLUS
24
+ - COMPRESS=DEFLATE
25
+ - ENABLE
26
+ - MOVE
27
+ - CONDSTORE
28
+ - ESEARCH
29
+ - UTF8=ACCEPT
30
+ - LIST-EXTENDED
31
+ - LIST-STATUS
32
+ - - !ruby/struct:Net::IMAP::UntaggedResponse
33
+ name: CAPABILITY
34
+ data: *1
35
+ raw_data: "* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN
36
+ X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE ENABLE MOVE CONDSTORE ESEARCH UTF8=ACCEPT
37
+ LIST-EXTENDED LIST-STATUS\r\n"
38
+ - !ruby/struct:Net::IMAP::TaggedResponse
39
+ tag: RUBY0001
40
+ name: OK
41
+ data: *2
42
+ raw_data: "RUBY0001 OK ki0zvkyi1yzgy7xu4f4dh46nqrcecm@gmail.com authenticated
43
+ (Success)\r\n"
44
+ CREATE-873546102acc7776d52edef1516784eb:
45
+ - - :return
46
+ - !ruby/struct:Net::IMAP::TaggedResponse
47
+ tag: RUBY0002
48
+ name: OK
49
+ data: &4 !ruby/struct:Net::IMAP::ResponseText
50
+ code:
51
+ text: Success
52
+ raw_data: "RUBY0002 OK Success\r\n"
53
+ - CAPABILITY: *3
54
+ - - !ruby/struct:Net::IMAP::TaggedResponse
55
+ tag: RUBY0002
56
+ name: OK
57
+ data: *4
58
+ raw_data: "RUBY0002 OK Success\r\n"
59
+ DELETE-842c8f8a15eef1d47151d7a37868de75:
60
+ - - :return
61
+ - !ruby/struct:Net::IMAP::TaggedResponse
62
+ tag: RUBY0003
63
+ name: OK
64
+ data: &5 !ruby/struct:Net::IMAP::ResponseText
65
+ code:
66
+ text: Success
67
+ raw_data: "RUBY0003 OK Success\r\n"
68
+ - CAPABILITY: *3
69
+ - - !ruby/struct:Net::IMAP::TaggedResponse
70
+ tag: RUBY0003
71
+ name: OK
72
+ data: *5
73
+ raw_data: "RUBY0003 OK Success\r\n"
74
+ - - :raise
75
+ - !ruby/exception:Net::IMAP::NoResponseError
76
+ message: " Unknown folder. (Failure)"
77
+ response: &6 !ruby/struct:Net::IMAP::TaggedResponse
78
+ tag: RUBY0006
79
+ name: 'NO'
80
+ data: !ruby/struct:Net::IMAP::ResponseText
81
+ code: !ruby/struct:Net::IMAP::ResponseCode
82
+ name: NONEXISTENT
83
+ data:
84
+ text: " Unknown folder. (Failure)"
85
+ raw_data: "RUBY0006 NO [NONEXISTENT] Unknown folder. (Failure)\r\n"
86
+ - CAPABILITY: *3
87
+ - - *6
88
+ LIST-e0583fa6130ee374cef031c01d8cc486:
89
+ - - :return
90
+ - !ruby/struct:Net::IMAP::TaggedResponse
91
+ tag: RUBY0004
92
+ name: OK
93
+ data: &16 !ruby/struct:Net::IMAP::ResponseText
94
+ code:
95
+ text: Success
96
+ raw_data: "RUBY0004 OK Success\r\n"
97
+ - CAPABILITY: *3
98
+ LIST:
99
+ - &7 !ruby/struct:Net::IMAP::MailboxList
100
+ attr:
101
+ - :Hasnochildren
102
+ delim: "/"
103
+ name: Awesome
104
+ - &8 !ruby/struct:Net::IMAP::MailboxList
105
+ attr:
106
+ - :Hasnochildren
107
+ delim: "/"
108
+ name: Great
109
+ - &9 !ruby/struct:Net::IMAP::MailboxList
110
+ attr:
111
+ - :Hasnochildren
112
+ delim: "/"
113
+ name: INBOX
114
+ - &10 !ruby/struct:Net::IMAP::MailboxList
115
+ attr:
116
+ - :Hasnochildren
117
+ delim: "/"
118
+ name: Ni&APE-os
119
+ - &11 !ruby/struct:Net::IMAP::MailboxList
120
+ attr:
121
+ - :Haschildren
122
+ - :Noselect
123
+ delim: "/"
124
+ name: "[Gmail]"
125
+ - &12 !ruby/struct:Net::IMAP::MailboxList
126
+ attr:
127
+ - :Hasnochildren
128
+ delim: "/"
129
+ name: "\\Junk"
130
+ - &13 !ruby/struct:Net::IMAP::MailboxList
131
+ attr:
132
+ - :Hasnochildren
133
+ delim: "/"
134
+ name: one's and two's
135
+ - &14 !ruby/struct:Net::IMAP::MailboxList
136
+ attr:
137
+ - :Hasnochildren
138
+ delim: "/"
139
+ name: some new label
140
+ - &15 !ruby/struct:Net::IMAP::MailboxList
141
+ attr:
142
+ - :Hasnochildren
143
+ delim: "/"
144
+ name: some other label
145
+ - - !ruby/struct:Net::IMAP::UntaggedResponse
146
+ name: LIST
147
+ data: *7
148
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"Awesome\"\r\n"
149
+ - !ruby/struct:Net::IMAP::UntaggedResponse
150
+ name: LIST
151
+ data: *8
152
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"Great\"\r\n"
153
+ - !ruby/struct:Net::IMAP::UntaggedResponse
154
+ name: LIST
155
+ data: *9
156
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"INBOX\"\r\n"
157
+ - !ruby/struct:Net::IMAP::UntaggedResponse
158
+ name: LIST
159
+ data: *10
160
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"Ni&APE-os\"\r\n"
161
+ - !ruby/struct:Net::IMAP::UntaggedResponse
162
+ name: LIST
163
+ data: *11
164
+ raw_data: "* LIST (\\HasChildren \\Noselect) \"/\" \"[Gmail]\"\r\n"
165
+ - !ruby/struct:Net::IMAP::UntaggedResponse
166
+ name: LIST
167
+ data: *12
168
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"\\\\Junk\"\r\n"
169
+ - !ruby/struct:Net::IMAP::UntaggedResponse
170
+ name: LIST
171
+ data: *13
172
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"one's and two's\"\r\n"
173
+ - !ruby/struct:Net::IMAP::UntaggedResponse
174
+ name: LIST
175
+ data: *14
176
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"some new label\"\r\n"
177
+ - !ruby/struct:Net::IMAP::UntaggedResponse
178
+ name: LIST
179
+ data: *15
180
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"some other label\"\r\n"
181
+ - !ruby/struct:Net::IMAP::TaggedResponse
182
+ tag: RUBY0004
183
+ name: OK
184
+ data: *16
185
+ raw_data: "RUBY0004 OK Success\r\n"
186
+ LIST-94cc1ce946087e61b81baed886d31dbc:
187
+ - - :return
188
+ - !ruby/struct:Net::IMAP::TaggedResponse
189
+ tag: RUBY0005
190
+ name: OK
191
+ data: &24 !ruby/struct:Net::IMAP::ResponseText
192
+ code:
193
+ text: Success
194
+ raw_data: "RUBY0005 OK Success\r\n"
195
+ - CAPABILITY: *3
196
+ LIST:
197
+ - &17 !ruby/struct:Net::IMAP::MailboxList
198
+ attr:
199
+ - :All
200
+ - :Hasnochildren
201
+ delim: "/"
202
+ name: "[Gmail]/All Mail"
203
+ - &18 !ruby/struct:Net::IMAP::MailboxList
204
+ attr:
205
+ - :Drafts
206
+ - :Hasnochildren
207
+ delim: "/"
208
+ name: "[Gmail]/Drafts"
209
+ - &19 !ruby/struct:Net::IMAP::MailboxList
210
+ attr:
211
+ - :Hasnochildren
212
+ - :Important
213
+ delim: "/"
214
+ name: "[Gmail]/Important"
215
+ - &20 !ruby/struct:Net::IMAP::MailboxList
216
+ attr:
217
+ - :Hasnochildren
218
+ - :Sent
219
+ delim: "/"
220
+ name: "[Gmail]/Sent Mail"
221
+ - &21 !ruby/struct:Net::IMAP::MailboxList
222
+ attr:
223
+ - :Hasnochildren
224
+ - :Junk
225
+ delim: "/"
226
+ name: "[Gmail]/Spam"
227
+ - &22 !ruby/struct:Net::IMAP::MailboxList
228
+ attr:
229
+ - :Flagged
230
+ - :Hasnochildren
231
+ delim: "/"
232
+ name: "[Gmail]/Starred"
233
+ - &23 !ruby/struct:Net::IMAP::MailboxList
234
+ attr:
235
+ - :Hasnochildren
236
+ - :Trash
237
+ delim: "/"
238
+ name: "[Gmail]/Trash"
239
+ - - !ruby/struct:Net::IMAP::UntaggedResponse
240
+ name: LIST
241
+ data: *17
242
+ raw_data: "* LIST (\\All \\HasNoChildren) \"/\" \"[Gmail]/All Mail\"\r\n"
243
+ - !ruby/struct:Net::IMAP::UntaggedResponse
244
+ name: LIST
245
+ data: *18
246
+ raw_data: "* LIST (\\Drafts \\HasNoChildren) \"/\" \"[Gmail]/Drafts\"\r\n"
247
+ - !ruby/struct:Net::IMAP::UntaggedResponse
248
+ name: LIST
249
+ data: *19
250
+ raw_data: "* LIST (\\HasNoChildren \\Important) \"/\" \"[Gmail]/Important\"\r\n"
251
+ - !ruby/struct:Net::IMAP::UntaggedResponse
252
+ name: LIST
253
+ data: *20
254
+ raw_data: "* LIST (\\HasNoChildren \\Sent) \"/\" \"[Gmail]/Sent Mail\"\r\n"
255
+ - !ruby/struct:Net::IMAP::UntaggedResponse
256
+ name: LIST
257
+ data: *21
258
+ raw_data: "* LIST (\\HasNoChildren \\Junk) \"/\" \"[Gmail]/Spam\"\r\n"
259
+ - !ruby/struct:Net::IMAP::UntaggedResponse
260
+ name: LIST
261
+ data: *22
262
+ raw_data: "* LIST (\\Flagged \\HasNoChildren) \"/\" \"[Gmail]/Starred\"\r\n"
263
+ - !ruby/struct:Net::IMAP::UntaggedResponse
264
+ name: LIST
265
+ data: *23
266
+ raw_data: "* LIST (\\HasNoChildren \\Trash) \"/\" \"[Gmail]/Trash\"\r\n"
267
+ - !ruby/struct:Net::IMAP::TaggedResponse
268
+ tag: RUBY0005
269
+ name: OK
270
+ data: *24
271
+ raw_data: "RUBY0005 OK Success\r\n"