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