gmail 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
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,116 +1,229 @@
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
- LIST-b30698c3407aff5520448484b159fc07:
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
- LIST:
40
- - !ruby/struct:Net::IMAP::MailboxList
41
- attr:
42
- - :Hasnochildren
43
- delim: "/"
44
- name: Awesome
45
- - !ruby/struct:Net::IMAP::MailboxList
46
- attr:
47
- - :Hasnochildren
48
- delim: "/"
49
- name: Great
50
- - !ruby/struct:Net::IMAP::MailboxList
51
- attr:
52
- - :Hasnochildren
53
- delim: "/"
54
- name: INBOX
55
- - !ruby/struct:Net::IMAP::MailboxList
56
- attr:
57
- - :Noselect
58
- - :Haschildren
59
- delim: "/"
60
- name: "[Gmail]"
61
- - !ruby/struct:Net::IMAP::MailboxList
62
- attr:
63
- - :Hasnochildren
64
- - :All
65
- delim: "/"
66
- name: "[Gmail]/All Mail"
67
- - !ruby/struct:Net::IMAP::MailboxList
68
- attr:
69
- - :Hasnochildren
70
- - :Drafts
71
- delim: "/"
72
- name: "[Gmail]/Drafts"
73
- - !ruby/struct:Net::IMAP::MailboxList
74
- attr:
75
- - :Hasnochildren
76
- - :Important
77
- delim: "/"
78
- name: "[Gmail]/Important"
79
- - !ruby/struct:Net::IMAP::MailboxList
80
- attr:
81
- - :Sent
82
- - :Hasnochildren
83
- delim: "/"
84
- name: "[Gmail]/Sent Mail"
85
- - !ruby/struct:Net::IMAP::MailboxList
86
- attr:
87
- - :Hasnochildren
88
- - :Junk
89
- delim: "/"
90
- name: "[Gmail]/Spam"
91
- - !ruby/struct:Net::IMAP::MailboxList
92
- attr:
93
- - :Hasnochildren
94
- - :Flagged
95
- delim: "/"
96
- name: "[Gmail]/Starred"
97
- - !ruby/struct:Net::IMAP::MailboxList
98
- attr:
99
- - :Trash
100
- - :Hasnochildren
101
- delim: "/"
102
- name: "[Gmail]/Trash"
103
- LOGOUT-e76a09b7766d60a37ff9e1af527a143e:
104
- - - :return
105
- - !ruby/struct:Net::IMAP::TaggedResponse
106
- tag: RUBY0003
107
- name: OK
108
- data: !ruby/struct:Net::IMAP::ResponseText
109
- code:
110
- text: 73 good day (Success)
111
- raw_data: "RUBY0003 OK 73 good day (Success)\r\n"
112
- - CAPABILITY: *1
113
- BYE:
114
- - !ruby/struct:Net::IMAP::ResponseText
115
- code:
116
- text: LOGOUT Requested
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
+ LIST-b30698c3407aff5520448484b159fc07:
45
+ - - :return
46
+ - !ruby/struct:Net::IMAP::TaggedResponse
47
+ tag: RUBY0002
48
+ name: OK
49
+ data: &20 !ruby/struct:Net::IMAP::ResponseText
50
+ code:
51
+ text: Success
52
+ raw_data: "RUBY0002 OK Success\r\n"
53
+ - CAPABILITY: *3
54
+ LIST:
55
+ - &4 !ruby/struct:Net::IMAP::MailboxList
56
+ attr:
57
+ - :Hasnochildren
58
+ delim: "/"
59
+ name: Awesome
60
+ - &5 !ruby/struct:Net::IMAP::MailboxList
61
+ attr:
62
+ - :Hasnochildren
63
+ delim: "/"
64
+ name: Great
65
+ - &6 !ruby/struct:Net::IMAP::MailboxList
66
+ attr:
67
+ - :Hasnochildren
68
+ delim: "/"
69
+ name: INBOX
70
+ - &7 !ruby/struct:Net::IMAP::MailboxList
71
+ attr:
72
+ - :Hasnochildren
73
+ delim: "/"
74
+ name: Ni&APE-os
75
+ - &8 !ruby/struct:Net::IMAP::MailboxList
76
+ attr:
77
+ - :Haschildren
78
+ - :Noselect
79
+ delim: "/"
80
+ name: "[Gmail]"
81
+ - &9 !ruby/struct:Net::IMAP::MailboxList
82
+ attr:
83
+ - :All
84
+ - :Hasnochildren
85
+ delim: "/"
86
+ name: "[Gmail]/All Mail"
87
+ - &10 !ruby/struct:Net::IMAP::MailboxList
88
+ attr:
89
+ - :Drafts
90
+ - :Hasnochildren
91
+ delim: "/"
92
+ name: "[Gmail]/Drafts"
93
+ - &11 !ruby/struct:Net::IMAP::MailboxList
94
+ attr:
95
+ - :Hasnochildren
96
+ - :Important
97
+ delim: "/"
98
+ name: "[Gmail]/Important"
99
+ - &12 !ruby/struct:Net::IMAP::MailboxList
100
+ attr:
101
+ - :Hasnochildren
102
+ - :Sent
103
+ delim: "/"
104
+ name: "[Gmail]/Sent Mail"
105
+ - &13 !ruby/struct:Net::IMAP::MailboxList
106
+ attr:
107
+ - :Hasnochildren
108
+ - :Junk
109
+ delim: "/"
110
+ name: "[Gmail]/Spam"
111
+ - &14 !ruby/struct:Net::IMAP::MailboxList
112
+ attr:
113
+ - :Flagged
114
+ - :Hasnochildren
115
+ delim: "/"
116
+ name: "[Gmail]/Starred"
117
+ - &15 !ruby/struct:Net::IMAP::MailboxList
118
+ attr:
119
+ - :Hasnochildren
120
+ - :Trash
121
+ delim: "/"
122
+ name: "[Gmail]/Trash"
123
+ - &16 !ruby/struct:Net::IMAP::MailboxList
124
+ attr:
125
+ - :Hasnochildren
126
+ delim: "/"
127
+ name: "\\Junk"
128
+ - &17 !ruby/struct:Net::IMAP::MailboxList
129
+ attr:
130
+ - :Hasnochildren
131
+ delim: "/"
132
+ name: one's and two's
133
+ - &18 !ruby/struct:Net::IMAP::MailboxList
134
+ attr:
135
+ - :Hasnochildren
136
+ delim: "/"
137
+ name: some new label
138
+ - &19 !ruby/struct:Net::IMAP::MailboxList
139
+ attr:
140
+ - :Hasnochildren
141
+ delim: "/"
142
+ name: some other label
143
+ - - !ruby/struct:Net::IMAP::UntaggedResponse
144
+ name: LIST
145
+ data: *4
146
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"Awesome\"\r\n"
147
+ - !ruby/struct:Net::IMAP::UntaggedResponse
148
+ name: LIST
149
+ data: *5
150
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"Great\"\r\n"
151
+ - !ruby/struct:Net::IMAP::UntaggedResponse
152
+ name: LIST
153
+ data: *6
154
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"INBOX\"\r\n"
155
+ - !ruby/struct:Net::IMAP::UntaggedResponse
156
+ name: LIST
157
+ data: *7
158
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"Ni&APE-os\"\r\n"
159
+ - !ruby/struct:Net::IMAP::UntaggedResponse
160
+ name: LIST
161
+ data: *8
162
+ raw_data: "* LIST (\\HasChildren \\Noselect) \"/\" \"[Gmail]\"\r\n"
163
+ - !ruby/struct:Net::IMAP::UntaggedResponse
164
+ name: LIST
165
+ data: *9
166
+ raw_data: "* LIST (\\All \\HasNoChildren) \"/\" \"[Gmail]/All Mail\"\r\n"
167
+ - !ruby/struct:Net::IMAP::UntaggedResponse
168
+ name: LIST
169
+ data: *10
170
+ raw_data: "* LIST (\\Drafts \\HasNoChildren) \"/\" \"[Gmail]/Drafts\"\r\n"
171
+ - !ruby/struct:Net::IMAP::UntaggedResponse
172
+ name: LIST
173
+ data: *11
174
+ raw_data: "* LIST (\\HasNoChildren \\Important) \"/\" \"[Gmail]/Important\"\r\n"
175
+ - !ruby/struct:Net::IMAP::UntaggedResponse
176
+ name: LIST
177
+ data: *12
178
+ raw_data: "* LIST (\\HasNoChildren \\Sent) \"/\" \"[Gmail]/Sent Mail\"\r\n"
179
+ - !ruby/struct:Net::IMAP::UntaggedResponse
180
+ name: LIST
181
+ data: *13
182
+ raw_data: "* LIST (\\HasNoChildren \\Junk) \"/\" \"[Gmail]/Spam\"\r\n"
183
+ - !ruby/struct:Net::IMAP::UntaggedResponse
184
+ name: LIST
185
+ data: *14
186
+ raw_data: "* LIST (\\Flagged \\HasNoChildren) \"/\" \"[Gmail]/Starred\"\r\n"
187
+ - !ruby/struct:Net::IMAP::UntaggedResponse
188
+ name: LIST
189
+ data: *15
190
+ raw_data: "* LIST (\\HasNoChildren \\Trash) \"/\" \"[Gmail]/Trash\"\r\n"
191
+ - !ruby/struct:Net::IMAP::UntaggedResponse
192
+ name: LIST
193
+ data: *16
194
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"\\\\Junk\"\r\n"
195
+ - !ruby/struct:Net::IMAP::UntaggedResponse
196
+ name: LIST
197
+ data: *17
198
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"one's and two's\"\r\n"
199
+ - !ruby/struct:Net::IMAP::UntaggedResponse
200
+ name: LIST
201
+ data: *18
202
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"some new label\"\r\n"
203
+ - !ruby/struct:Net::IMAP::UntaggedResponse
204
+ name: LIST
205
+ data: *19
206
+ raw_data: "* LIST (\\HasNoChildren) \"/\" \"some other label\"\r\n"
207
+ - !ruby/struct:Net::IMAP::TaggedResponse
208
+ tag: RUBY0002
209
+ name: OK
210
+ data: *20
211
+ raw_data: "RUBY0002 OK Success\r\n"
212
+ LOGOUT-e76a09b7766d60a37ff9e1af527a143e:
213
+ - - :return
214
+ - !ruby/struct:Net::IMAP::TaggedResponse
215
+ tag: RUBY0003
216
+ name: OK
217
+ data: !ruby/struct:Net::IMAP::ResponseText
218
+ code:
219
+ text: 73 good day (Success)
220
+ raw_data: "RUBY0003 OK 73 good day (Success)\r\n"
221
+ - CAPABILITY: *3
222
+ BYE:
223
+ - &21 !ruby/struct:Net::IMAP::ResponseText
224
+ code:
225
+ text: LOGOUT Requested
226
+ - - !ruby/struct:Net::IMAP::UntaggedResponse
227
+ name: BYE
228
+ data: *21
229
+ raw_data: "* BYE LOGOUT Requested\r\n"
@@ -1,277 +1,595 @@
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:
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
- SELECT-505f013d922af4caf157dc91d6b45a60:
30
- - - :return
31
- - !ruby/struct:Net::IMAP::TaggedResponse
32
- tag: RUBY0002
33
- name: OK
34
- data: !ruby/struct:Net::IMAP::ResponseText
35
- code: !ruby/struct:Net::IMAP::ResponseCode
36
- name: READ-WRITE
37
- data:
38
- text: " INBOX selected. (Success)"
39
- raw_data: "RUBY0002 OK [READ-WRITE] INBOX selected. (Success)\r\n"
40
- - FLAGS: &2
41
- - - :Answered
42
- - :Flagged
43
- - :Draft
44
- - :Deleted
45
- - :Seen
46
- - "$Phishing"
47
- - "$NotPhishing"
48
- OK: &3
49
- - !ruby/struct:Net::IMAP::ResponseText
50
- code: !ruby/struct:Net::IMAP::ResponseCode
51
- name: PERMANENTFLAGS
52
- data: &1
53
- - :Answered
54
- - :Flagged
55
- - :Draft
56
- - :Deleted
57
- - :Seen
58
- - "$Phishing"
59
- - "$NotPhishing"
60
- - :*
61
- text: " Flags permitted."
62
- - !ruby/struct:Net::IMAP::ResponseText
63
- code: !ruby/struct:Net::IMAP::ResponseCode
64
- name: UIDVALIDITY
65
- data: 1
66
- text: " UIDs valid."
67
- - !ruby/struct:Net::IMAP::ResponseText
68
- code: !ruby/struct:Net::IMAP::ResponseCode
69
- name: UIDNEXT
70
- data: 159
71
- text: " Predicted next UID."
72
- - !ruby/struct:Net::IMAP::ResponseText
73
- code: !ruby/struct:Net::IMAP::ResponseCode
74
- name: HIGHESTMODSEQ
75
- data: '13352'
76
- text: ''
77
- PERMANENTFLAGS: &4
78
- - *1
79
- UIDVALIDITY: &5
80
- - 1
81
- EXISTS: &6
82
- - 150
83
- RECENT: &7
84
- - 0
85
- UIDNEXT: &8
86
- - 159
87
- HIGHESTMODSEQ: &9
88
- - '13352'
89
- UID SEARCH-b19658413e2b63d2bac9c290a67c2cb3:
90
- - - :return
91
- - !ruby/struct:Net::IMAP::TaggedResponse
92
- tag: RUBY0003
93
- name: OK
94
- data: !ruby/struct:Net::IMAP::ResponseText
95
- code:
96
- text: SEARCH completed (Success)
97
- raw_data: "RUBY0003 OK SEARCH completed (Success)\r\n"
98
- - FLAGS: *2
99
- OK: *3
100
- PERMANENTFLAGS: *4
101
- UIDVALIDITY: *5
102
- EXISTS: *6
103
- RECENT: *7
104
- UIDNEXT: *8
105
- HIGHESTMODSEQ: *9
106
- SEARCH:
107
- - - 1
108
- - 2
109
- - 3
110
- - 4
111
- - 5
112
- - 6
113
- - 7
114
- - 8
115
- - 9
116
- - 10
117
- - 11
118
- - 12
119
- - 13
120
- - 14
121
- - 15
122
- - 16
123
- - 17
124
- - 18
125
- - 19
126
- - 20
127
- - 21
128
- - 22
129
- - 23
130
- - 24
131
- - 25
132
- - 26
133
- - 27
134
- - 28
135
- - 29
136
- - 30
137
- - 31
138
- - 32
139
- - 33
140
- - 34
141
- - 35
142
- - 36
143
- - 37
144
- - 38
145
- - 39
146
- - 40
147
- - 41
148
- - 42
149
- - 43
150
- - 44
151
- - 45
152
- - 46
153
- - 47
154
- - 48
155
- - 49
156
- - 50
157
- - 51
158
- - 52
159
- - 53
160
- - 54
161
- - 55
162
- - 56
163
- - 57
164
- - 58
165
- - 59
166
- - 60
167
- - 61
168
- - 62
169
- - 63
170
- - 64
171
- - 65
172
- - 66
173
- - 67
174
- - 68
175
- - 69
176
- - 70
177
- - 71
178
- - 72
179
- - 73
180
- - 74
181
- - 75
182
- - 76
183
- - 77
184
- - 78
185
- - 79
186
- - 80
187
- - 81
188
- - 82
189
- - 83
190
- - 84
191
- - 85
192
- - 86
193
- - 87
194
- - 88
195
- - 89
196
- - 90
197
- - 91
198
- - 92
199
- - 93
200
- - 94
201
- - 95
202
- - 96
203
- - 97
204
- - 98
205
- - 99
206
- - 100
207
- - 101
208
- - 102
209
- - 103
210
- - 104
211
- - 105
212
- - 106
213
- - 107
214
- - 108
215
- - 109
216
- - 110
217
- - 111
218
- - 112
219
- - 113
220
- - 114
221
- - 115
222
- - 116
223
- - 117
224
- - 118
225
- - 119
226
- - 120
227
- - 121
228
- - 122
229
- - 123
230
- - 124
231
- - 125
232
- - 126
233
- - 127
234
- - 128
235
- - 129
236
- - 130
237
- - 131
238
- - 132
239
- - 133
240
- - 134
241
- - 135
242
- - 136
243
- - 137
244
- - 138
245
- - 139
246
- - 140
247
- - 141
248
- - 142
249
- - 143
250
- - 144
251
- - 145
252
- - 150
253
- - 151
254
- - 156
255
- - 157
256
- - 158
257
- LOGOUT-e76a09b7766d60a37ff9e1af527a143e:
258
- - - :return
259
- - !ruby/struct:Net::IMAP::TaggedResponse
260
- tag: RUBY0004
261
- name: OK
262
- data: !ruby/struct:Net::IMAP::ResponseText
263
- code:
264
- text: 73 good day (Success)
265
- raw_data: "RUBY0004 OK 73 good day (Success)\r\n"
266
- - FLAGS: *2
267
- OK: *3
268
- PERMANENTFLAGS: *4
269
- UIDVALIDITY: *5
270
- EXISTS: *6
271
- RECENT: *7
272
- UIDNEXT: *8
273
- HIGHESTMODSEQ: *9
274
- BYE:
275
- - !ruby/struct:Net::IMAP::ResponseText
276
- code:
277
- text: LOGOUT Requested
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:
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
+ SELECT-505f013d922af4caf157dc91d6b45a60:
45
+ - - :return
46
+ - !ruby/struct:Net::IMAP::TaggedResponse
47
+ tag: RUBY0002
48
+ name: OK
49
+ data: &9 !ruby/struct:Net::IMAP::ResponseText
50
+ code: !ruby/struct:Net::IMAP::ResponseCode
51
+ name: READ-WRITE
52
+ data:
53
+ text: " INBOX selected. (Success)"
54
+ raw_data: "RUBY0002 OK [READ-WRITE] INBOX selected. (Success)\r\n"
55
+ - FLAGS: &10
56
+ - &4
57
+ - :Answered
58
+ - :Flagged
59
+ - :Draft
60
+ - :Deleted
61
+ - :Seen
62
+ - "$NotPhishing"
63
+ - "$Phishing"
64
+ OK: &11
65
+ - &5 !ruby/struct:Net::IMAP::ResponseText
66
+ code: !ruby/struct:Net::IMAP::ResponseCode
67
+ name: PERMANENTFLAGS
68
+ data: &3
69
+ - :Answered
70
+ - :Flagged
71
+ - :Draft
72
+ - :Deleted
73
+ - :Seen
74
+ - "$NotPhishing"
75
+ - "$Phishing"
76
+ - :*
77
+ text: " Flags permitted."
78
+ - &6 !ruby/struct:Net::IMAP::ResponseText
79
+ code: !ruby/struct:Net::IMAP::ResponseCode
80
+ name: UIDVALIDITY
81
+ data: 1
82
+ text: " UIDs valid."
83
+ - &7 !ruby/struct:Net::IMAP::ResponseText
84
+ code: !ruby/struct:Net::IMAP::ResponseCode
85
+ name: UIDNEXT
86
+ data: 397
87
+ text: " Predicted next UID."
88
+ - &8 !ruby/struct:Net::IMAP::ResponseText
89
+ code: !ruby/struct:Net::IMAP::ResponseCode
90
+ name: HIGHESTMODSEQ
91
+ data: '24238'
92
+ text: ''
93
+ PERMANENTFLAGS: &12
94
+ - *3
95
+ UIDVALIDITY: &13
96
+ - 1
97
+ EXISTS: &14
98
+ - 384
99
+ RECENT: &15
100
+ - 0
101
+ UIDNEXT: &16
102
+ - 397
103
+ HIGHESTMODSEQ: &17
104
+ - '24238'
105
+ - - !ruby/struct:Net::IMAP::UntaggedResponse
106
+ name: FLAGS
107
+ data: *4
108
+ raw_data: "* FLAGS (\\Answered \\Flagged \\Draft \\Deleted \\Seen $NotPhishing
109
+ $Phishing)\r\n"
110
+ - !ruby/struct:Net::IMAP::UntaggedResponse
111
+ name: OK
112
+ data: *5
113
+ raw_data: "* OK [PERMANENTFLAGS (\\Answered \\Flagged \\Draft \\Deleted \\Seen
114
+ $NotPhishing $Phishing \\*)] Flags permitted.\r\n"
115
+ - !ruby/struct:Net::IMAP::UntaggedResponse
116
+ name: OK
117
+ data: *6
118
+ raw_data: "* OK [UIDVALIDITY 1] UIDs valid.\r\n"
119
+ - !ruby/struct:Net::IMAP::UntaggedResponse
120
+ name: EXISTS
121
+ data: 384
122
+ raw_data: "* 384 EXISTS\r\n"
123
+ - !ruby/struct:Net::IMAP::UntaggedResponse
124
+ name: RECENT
125
+ data: 0
126
+ raw_data: "* 0 RECENT\r\n"
127
+ - !ruby/struct:Net::IMAP::UntaggedResponse
128
+ name: OK
129
+ data: *7
130
+ raw_data: "* OK [UIDNEXT 397] Predicted next UID.\r\n"
131
+ - !ruby/struct:Net::IMAP::UntaggedResponse
132
+ name: OK
133
+ data: *8
134
+ raw_data: "* OK [HIGHESTMODSEQ 24238]\r\n"
135
+ - !ruby/struct:Net::IMAP::TaggedResponse
136
+ tag: RUBY0002
137
+ name: OK
138
+ data: *9
139
+ raw_data: "RUBY0002 OK [READ-WRITE] INBOX selected. (Success)\r\n"
140
+ UID SEARCH-b19658413e2b63d2bac9c290a67c2cb3:
141
+ - - :return
142
+ - !ruby/struct:Net::IMAP::TaggedResponse
143
+ tag: RUBY0003
144
+ name: OK
145
+ data: &19 !ruby/struct:Net::IMAP::ResponseText
146
+ code:
147
+ text: SEARCH completed (Success)
148
+ raw_data: "RUBY0003 OK SEARCH completed (Success)\r\n"
149
+ - FLAGS: *10
150
+ OK: *11
151
+ PERMANENTFLAGS: *12
152
+ UIDVALIDITY: *13
153
+ EXISTS: *14
154
+ RECENT: *15
155
+ UIDNEXT: *16
156
+ HIGHESTMODSEQ: *17
157
+ SEARCH:
158
+ - &18
159
+ - 1
160
+ - 2
161
+ - 3
162
+ - 4
163
+ - 5
164
+ - 6
165
+ - 7
166
+ - 8
167
+ - 9
168
+ - 10
169
+ - 11
170
+ - 12
171
+ - 13
172
+ - 14
173
+ - 15
174
+ - 16
175
+ - 17
176
+ - 18
177
+ - 19
178
+ - 20
179
+ - 21
180
+ - 22
181
+ - 23
182
+ - 24
183
+ - 25
184
+ - 26
185
+ - 27
186
+ - 28
187
+ - 29
188
+ - 30
189
+ - 31
190
+ - 32
191
+ - 33
192
+ - 34
193
+ - 35
194
+ - 36
195
+ - 37
196
+ - 38
197
+ - 39
198
+ - 40
199
+ - 41
200
+ - 42
201
+ - 43
202
+ - 44
203
+ - 45
204
+ - 46
205
+ - 47
206
+ - 48
207
+ - 49
208
+ - 50
209
+ - 51
210
+ - 52
211
+ - 53
212
+ - 54
213
+ - 55
214
+ - 56
215
+ - 57
216
+ - 58
217
+ - 59
218
+ - 60
219
+ - 61
220
+ - 62
221
+ - 63
222
+ - 64
223
+ - 65
224
+ - 66
225
+ - 67
226
+ - 68
227
+ - 69
228
+ - 70
229
+ - 71
230
+ - 72
231
+ - 73
232
+ - 74
233
+ - 75
234
+ - 76
235
+ - 77
236
+ - 78
237
+ - 79
238
+ - 80
239
+ - 81
240
+ - 82
241
+ - 83
242
+ - 84
243
+ - 85
244
+ - 86
245
+ - 87
246
+ - 88
247
+ - 89
248
+ - 90
249
+ - 91
250
+ - 92
251
+ - 93
252
+ - 94
253
+ - 95
254
+ - 96
255
+ - 97
256
+ - 98
257
+ - 99
258
+ - 100
259
+ - 101
260
+ - 102
261
+ - 103
262
+ - 104
263
+ - 105
264
+ - 106
265
+ - 107
266
+ - 108
267
+ - 109
268
+ - 110
269
+ - 111
270
+ - 112
271
+ - 113
272
+ - 114
273
+ - 115
274
+ - 116
275
+ - 117
276
+ - 118
277
+ - 119
278
+ - 120
279
+ - 121
280
+ - 122
281
+ - 123
282
+ - 124
283
+ - 125
284
+ - 126
285
+ - 127
286
+ - 128
287
+ - 129
288
+ - 130
289
+ - 131
290
+ - 132
291
+ - 133
292
+ - 134
293
+ - 135
294
+ - 136
295
+ - 137
296
+ - 138
297
+ - 139
298
+ - 140
299
+ - 141
300
+ - 142
301
+ - 143
302
+ - 144
303
+ - 145
304
+ - 150
305
+ - 151
306
+ - 156
307
+ - 157
308
+ - 158
309
+ - 159
310
+ - 160
311
+ - 161
312
+ - 162
313
+ - 163
314
+ - 164
315
+ - 165
316
+ - 166
317
+ - 167
318
+ - 168
319
+ - 169
320
+ - 170
321
+ - 171
322
+ - 172
323
+ - 173
324
+ - 174
325
+ - 175
326
+ - 176
327
+ - 177
328
+ - 178
329
+ - 179
330
+ - 180
331
+ - 181
332
+ - 182
333
+ - 183
334
+ - 184
335
+ - 185
336
+ - 186
337
+ - 187
338
+ - 189
339
+ - 190
340
+ - 191
341
+ - 192
342
+ - 193
343
+ - 194
344
+ - 195
345
+ - 196
346
+ - 197
347
+ - 198
348
+ - 199
349
+ - 200
350
+ - 201
351
+ - 202
352
+ - 203
353
+ - 204
354
+ - 205
355
+ - 206
356
+ - 207
357
+ - 208
358
+ - 209
359
+ - 210
360
+ - 211
361
+ - 212
362
+ - 213
363
+ - 214
364
+ - 215
365
+ - 216
366
+ - 217
367
+ - 218
368
+ - 219
369
+ - 220
370
+ - 221
371
+ - 222
372
+ - 223
373
+ - 224
374
+ - 225
375
+ - 226
376
+ - 227
377
+ - 228
378
+ - 229
379
+ - 230
380
+ - 231
381
+ - 232
382
+ - 233
383
+ - 234
384
+ - 235
385
+ - 236
386
+ - 237
387
+ - 238
388
+ - 239
389
+ - 240
390
+ - 241
391
+ - 242
392
+ - 243
393
+ - 244
394
+ - 245
395
+ - 247
396
+ - 248
397
+ - 249
398
+ - 250
399
+ - 251
400
+ - 252
401
+ - 253
402
+ - 254
403
+ - 255
404
+ - 256
405
+ - 257
406
+ - 258
407
+ - 259
408
+ - 260
409
+ - 261
410
+ - 262
411
+ - 263
412
+ - 264
413
+ - 265
414
+ - 266
415
+ - 267
416
+ - 268
417
+ - 269
418
+ - 270
419
+ - 271
420
+ - 272
421
+ - 273
422
+ - 274
423
+ - 275
424
+ - 276
425
+ - 277
426
+ - 278
427
+ - 279
428
+ - 280
429
+ - 281
430
+ - 282
431
+ - 283
432
+ - 284
433
+ - 285
434
+ - 286
435
+ - 287
436
+ - 288
437
+ - 289
438
+ - 290
439
+ - 291
440
+ - 292
441
+ - 293
442
+ - 294
443
+ - 295
444
+ - 296
445
+ - 297
446
+ - 298
447
+ - 299
448
+ - 300
449
+ - 301
450
+ - 302
451
+ - 303
452
+ - 304
453
+ - 305
454
+ - 306
455
+ - 307
456
+ - 308
457
+ - 309
458
+ - 310
459
+ - 311
460
+ - 312
461
+ - 313
462
+ - 314
463
+ - 315
464
+ - 316
465
+ - 317
466
+ - 318
467
+ - 319
468
+ - 320
469
+ - 321
470
+ - 322
471
+ - 323
472
+ - 324
473
+ - 325
474
+ - 326
475
+ - 327
476
+ - 328
477
+ - 329
478
+ - 330
479
+ - 331
480
+ - 332
481
+ - 333
482
+ - 334
483
+ - 335
484
+ - 336
485
+ - 337
486
+ - 338
487
+ - 339
488
+ - 340
489
+ - 341
490
+ - 342
491
+ - 343
492
+ - 344
493
+ - 345
494
+ - 346
495
+ - 347
496
+ - 348
497
+ - 349
498
+ - 350
499
+ - 351
500
+ - 352
501
+ - 353
502
+ - 354
503
+ - 355
504
+ - 356
505
+ - 357
506
+ - 358
507
+ - 359
508
+ - 360
509
+ - 361
510
+ - 362
511
+ - 363
512
+ - 364
513
+ - 365
514
+ - 366
515
+ - 367
516
+ - 368
517
+ - 369
518
+ - 370
519
+ - 371
520
+ - 372
521
+ - 373
522
+ - 374
523
+ - 375
524
+ - 376
525
+ - 377
526
+ - 378
527
+ - 379
528
+ - 380
529
+ - 381
530
+ - 382
531
+ - 383
532
+ - 384
533
+ - 385
534
+ - 386
535
+ - 388
536
+ - 390
537
+ - 391
538
+ - 392
539
+ - 393
540
+ - 394
541
+ - 395
542
+ - 396
543
+ - - !ruby/struct:Net::IMAP::UntaggedResponse
544
+ name: SEARCH
545
+ data: *18
546
+ raw_data: "* SEARCH 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
547
+ 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
548
+ 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
549
+ 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
550
+ 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
551
+ 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
552
+ 136 137 138 139 140 141 142 143 144 145 150 151 156 157 158 159 160 161 162
553
+ 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
554
+ 182 183 184 185 186 187 189 190 191 192 193 194 195 196 197 198 199 200 201
555
+ 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220
556
+ 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
557
+ 240 241 242 243 244 245 247 248 249 250 251 252 253 254 255 256 257 258 259
558
+ 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278
559
+ 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297
560
+ 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316
561
+ 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335
562
+ 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354
563
+ 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373
564
+ 374 375 376 377 378 379 380 381 382 383 384 385 386 388 390 391 392 393 394
565
+ 395 396\r\n"
566
+ - !ruby/struct:Net::IMAP::TaggedResponse
567
+ tag: RUBY0003
568
+ name: OK
569
+ data: *19
570
+ raw_data: "RUBY0003 OK SEARCH completed (Success)\r\n"
571
+ LOGOUT-e76a09b7766d60a37ff9e1af527a143e:
572
+ - - :return
573
+ - !ruby/struct:Net::IMAP::TaggedResponse
574
+ tag: RUBY0004
575
+ name: OK
576
+ data: !ruby/struct:Net::IMAP::ResponseText
577
+ code:
578
+ text: 73 good day (Success)
579
+ raw_data: "RUBY0004 OK 73 good day (Success)\r\n"
580
+ - FLAGS: *10
581
+ OK: *11
582
+ PERMANENTFLAGS: *12
583
+ UIDVALIDITY: *13
584
+ EXISTS: *14
585
+ RECENT: *15
586
+ UIDNEXT: *16
587
+ HIGHESTMODSEQ: *17
588
+ BYE:
589
+ - &20 !ruby/struct:Net::IMAP::ResponseText
590
+ code:
591
+ text: LOGOUT Requested
592
+ - - !ruby/struct:Net::IMAP::UntaggedResponse
593
+ name: BYE
594
+ data: *20
595
+ raw_data: "* BYE LOGOUT Requested\r\n"