gmail 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +27 -27
  3. data/.rspec +1 -1
  4. data/.rubocop.yml +13 -13
  5. data/.rubocop_todo.yml +239 -239
  6. data/.travis.yml +19 -19
  7. data/CHANGELOG.md +145 -139
  8. data/Gemfile +3 -3
  9. data/LICENSE +21 -21
  10. data/README.md +355 -354
  11. data/Rakefile +46 -46
  12. data/gmail.gemspec +34 -34
  13. data/lib/gmail.rb +78 -78
  14. data/lib/gmail/client.rb +34 -34
  15. data/lib/gmail/client/base.rb +229 -229
  16. data/lib/gmail/client/plain.rb +24 -24
  17. data/lib/gmail/client/xoauth.rb +68 -68
  18. data/lib/gmail/client/xoauth2.rb +39 -39
  19. data/lib/gmail/imap_extensions.rb +159 -150
  20. data/lib/gmail/labels.rb +79 -79
  21. data/lib/gmail/mailbox.rb +175 -135
  22. data/lib/gmail/message.rb +207 -207
  23. data/lib/gmail/version.rb +3 -3
  24. data/spec/account.yml.example +1 -1
  25. data/spec/account.yml.obfus +2 -2
  26. data/spec/gmail/client/base_spec.rb +5 -5
  27. data/spec/gmail/client/plain_spec.rb +169 -168
  28. data/spec/gmail/client/xoauth2_spec.rb +186 -186
  29. data/spec/gmail/client/xoauth_spec.rb +5 -5
  30. data/spec/gmail/client_spec.rb +5 -5
  31. data/spec/gmail/imap_extensions_spec.rb +47 -12
  32. data/spec/gmail/labels_spec.rb +27 -18
  33. data/spec/gmail/mailbox_spec.rb +84 -47
  34. data/spec/gmail/message_spec.rb +181 -181
  35. data/spec/gmail_spec.rb +39 -39
  36. data/spec/recordings/gmail/_new_connects_with_client_and_give_it_context_when_block_given.yml +28 -28
  37. data/spec/recordings/gmail/_new_connects_with_gmail_service_and_return_valid_connection_object.yml +28 -28
  38. data/spec/recordings/gmail/_new_does_not_raise_error_when_couldn_t_connect_with_given_account.yml +13 -13
  39. data/spec/recordings/gmail/_new_raises_error_when_couldn_t_connect_with_given_account.yml +13 -13
  40. data/spec/recordings/gmail_client_plain/instance/_connection_automatically_logs_in_to_gmail_account_when_it_s_called.yml +42 -42
  41. data/spec/recordings/gmail_client_plain/instance/delivers_inline_composed_email.yml +42 -42
  42. data/spec/recordings/gmail_client_plain/instance/does_not_log_in_when_given_gmail_account_is_invalid.yml +13 -13
  43. data/spec/recordings/gmail_client_plain/instance/does_not_raise_error_even_though_gmail_account_is_invalid.yml +13 -13
  44. data/spec/recordings/gmail_client_plain/instance/labels/checks_if_there_is_given_label_defined.yml +196 -196
  45. data/spec/recordings/gmail_client_plain/instance/labels/creates_given_label.yml +151 -151
  46. data/spec/recordings/gmail_client_plain/instance/labels/removes_existing_label.yml +146 -146
  47. data/spec/recordings/gmail_client_plain/instance/labels/returns_list_of_all_available_labels.yml +113 -113
  48. data/spec/recordings/gmail_client_plain/instance/properly_logs_in_to_valid_gmail_account.yml +42 -42
  49. data/spec/recordings/gmail_client_plain/instance/properly_logs_out_from_gmail.yml +42 -42
  50. data/spec/recordings/gmail_client_plain/instance/properly_switches_to_given_mailbox.yml +109 -109
  51. data/spec/recordings/gmail_client_plain/instance/properly_switches_to_given_mailbox_using_block_style.yml +109 -109
  52. data/spec/recordings/gmail_client_plain/instance/raises_error_when_given_gmail_account_is_invalid_and_errors_enabled.yml +13 -13
  53. data/spec/recordings/gmail_client_xo_auth2/instance/does_not_log_in_when_given_gmail_account_is_invalid.yml +13 -13
  54. data/spec/recordings/gmail_client_xo_auth2/instance/labels/checks_if_there_is_given_label_defined.yml +27 -27
  55. data/spec/recordings/gmail_client_xo_auth2/instance/labels/creates_given_label.yml +39 -39
  56. data/spec/recordings/gmail_client_xo_auth2/instance/labels/removes_existing_label.yml +39 -39
  57. data/spec/recordings/gmail_client_xo_auth2/instance/labels/returns_list_of_all_available_labels.yml +27 -27
  58. data/spec/recordings/gmail_client_xo_auth2/instance/properly_logs_in_to_valid_gmail_account.yml +15 -15
  59. data/spec/recordings/gmail_client_xo_auth2/instance/properly_logs_out_from_gmail.yml +15 -15
  60. data/spec/recordings/gmail_client_xo_auth2/instance/properly_switches_to_given_mailbox.yml +40 -40
  61. data/spec/recordings/gmail_client_xo_auth2/instance/properly_switches_to_given_mailbox_using_block_style.yml +40 -40
  62. data/spec/recordings/gmail_client_xo_auth2/instance/raises_error_when_given_gmail_account_is_invalid_and_errors_enabled.yml +13 -13
  63. data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/all/localizes_into_the_appropriate_label.yml +116 -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 +110 -0
  65. data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/drafts/localizes_into_the_appropriate_label.yml +116 -116
  66. data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/flagged/localizes_into_the_appropriate_label.yml +116 -116
  67. data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/important/localizes_into_the_appropriate_label.yml +116 -116
  68. data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/inbox/localizes_into_the_appropriate_label.yml +42 -42
  69. data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/junk/localizes_into_the_appropriate_label.yml +116 -116
  70. data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/sent/localizes_into_the_appropriate_label.yml +116 -116
  71. data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/trash/localizes_into_the_appropriate_label.yml +116 -116
  72. data/spec/recordings/gmail_mailbox/instance/counts_all_emails.yml +277 -277
  73. data/spec/recordings/gmail_mailbox/instance/finds_messages.yml +586 -586
  74. data/spec/recordings/gmail_mailbox/instance/waits_once.yml +136 -0
  75. data/spec/recordings/gmail_mailbox/instance/waits_repeatedly.yml +141 -0
  76. data/spec/recordings/gmail_mailbox/instance/waits_with_29-minute_re-issue.yml +136 -0
  77. data/spec/recordings/gmail_mailbox/instance/waits_with_an_unblocked_connection.yml +207 -0
  78. data/spec/recordings/gmail_mailbox/on_initialize/sets_client_and_name.yml +42 -42
  79. data/spec/recordings/gmail_mailbox/on_initialize/works_in_inbox_by_default.yml +42 -42
  80. data/spec/recordings/gmail_message/initialize/sets_prefetch_attrs.yml +578 -578
  81. data/spec/recordings/gmail_message/initialize/sets_uid_and_mailbox.yml +580 -580
  82. data/spec/recordings/gmail_message/instance_methods/deletes_itself.yml +637 -637
  83. data/spec/recordings/gmail_message/instance_methods/marks_itself_read.yml +682 -682
  84. data/spec/recordings/gmail_message/instance_methods/marks_itself_unread.yml +686 -686
  85. data/spec/recordings/gmail_message/instance_methods/moves_from_one_tag_to_other.yml +862 -862
  86. data/spec/recordings/gmail_message/instance_methods/removes_a_given_label.yml +776 -776
  87. data/spec/recordings/gmail_message/instance_methods/removes_a_given_label_with_old_method.yml +776 -776
  88. data/spec/recordings/gmail_message/instance_methods/sets_given_label.yml +690 -690
  89. data/spec/recordings/gmail_message/instance_methods/sets_given_label_with_old_method.yml +691 -691
  90. data/spec/spec_helper.rb +53 -53
  91. data/spec/support/imap_mock.rb +181 -129
  92. data/spec/support/obfuscation.rb +52 -52
  93. metadata +78 -5
@@ -1,196 +1,196 @@
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-e0583fa6130ee374cef031c01d8cc486:
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
- - - :return
62
- - !ruby/struct:Net::IMAP::TaggedResponse
63
- tag: RUBY0004
64
- name: OK
65
- data: !ruby/struct:Net::IMAP::ResponseText
66
- code:
67
- text: Success
68
- raw_data: "RUBY0004 OK Success\r\n"
69
- - CAPABILITY: *1
70
- LIST:
71
- - !ruby/struct:Net::IMAP::MailboxList
72
- attr:
73
- - :Hasnochildren
74
- delim: "/"
75
- name: Awesome
76
- - !ruby/struct:Net::IMAP::MailboxList
77
- attr:
78
- - :Hasnochildren
79
- delim: "/"
80
- name: Great
81
- - !ruby/struct:Net::IMAP::MailboxList
82
- attr:
83
- - :Hasnochildren
84
- delim: "/"
85
- name: INBOX
86
- - !ruby/struct:Net::IMAP::MailboxList
87
- attr:
88
- - :Noselect
89
- - :Haschildren
90
- delim: "/"
91
- name: "[Gmail]"
92
- LIST-94cc1ce946087e61b81baed886d31dbc:
93
- - - :return
94
- - !ruby/struct:Net::IMAP::TaggedResponse
95
- tag: RUBY0003
96
- name: OK
97
- data: !ruby/struct:Net::IMAP::ResponseText
98
- code:
99
- text: Success
100
- raw_data: "RUBY0003 OK Success\r\n"
101
- - CAPABILITY: *1
102
- LIST:
103
- - !ruby/struct:Net::IMAP::MailboxList
104
- attr:
105
- - :Hasnochildren
106
- - :All
107
- delim: "/"
108
- name: "[Gmail]/All Mail"
109
- - !ruby/struct:Net::IMAP::MailboxList
110
- attr:
111
- - :Hasnochildren
112
- - :Drafts
113
- delim: "/"
114
- name: "[Gmail]/Drafts"
115
- - !ruby/struct:Net::IMAP::MailboxList
116
- attr:
117
- - :Hasnochildren
118
- - :Important
119
- delim: "/"
120
- name: "[Gmail]/Important"
121
- - !ruby/struct:Net::IMAP::MailboxList
122
- attr:
123
- - :Sent
124
- - :Hasnochildren
125
- delim: "/"
126
- name: "[Gmail]/Sent Mail"
127
- - !ruby/struct:Net::IMAP::MailboxList
128
- attr:
129
- - :Hasnochildren
130
- - :Junk
131
- delim: "/"
132
- name: "[Gmail]/Spam"
133
- - !ruby/struct:Net::IMAP::MailboxList
134
- attr:
135
- - :Hasnochildren
136
- - :Flagged
137
- delim: "/"
138
- name: "[Gmail]/Starred"
139
- - !ruby/struct:Net::IMAP::MailboxList
140
- attr:
141
- - :Trash
142
- - :Hasnochildren
143
- delim: "/"
144
- name: "[Gmail]/Trash"
145
- - - :return
146
- - !ruby/struct:Net::IMAP::TaggedResponse
147
- tag: RUBY0005
148
- name: OK
149
- data: !ruby/struct:Net::IMAP::ResponseText
150
- code:
151
- text: Success
152
- raw_data: "RUBY0005 OK Success\r\n"
153
- - CAPABILITY: *1
154
- LIST:
155
- - !ruby/struct:Net::IMAP::MailboxList
156
- attr:
157
- - :Hasnochildren
158
- - :All
159
- delim: "/"
160
- name: "[Gmail]/All Mail"
161
- - !ruby/struct:Net::IMAP::MailboxList
162
- attr:
163
- - :Hasnochildren
164
- - :Drafts
165
- delim: "/"
166
- name: "[Gmail]/Drafts"
167
- - !ruby/struct:Net::IMAP::MailboxList
168
- attr:
169
- - :Hasnochildren
170
- - :Important
171
- delim: "/"
172
- name: "[Gmail]/Important"
173
- - !ruby/struct:Net::IMAP::MailboxList
174
- attr:
175
- - :Sent
176
- - :Hasnochildren
177
- delim: "/"
178
- name: "[Gmail]/Sent Mail"
179
- - !ruby/struct:Net::IMAP::MailboxList
180
- attr:
181
- - :Hasnochildren
182
- - :Junk
183
- delim: "/"
184
- name: "[Gmail]/Spam"
185
- - !ruby/struct:Net::IMAP::MailboxList
186
- attr:
187
- - :Hasnochildren
188
- - :Flagged
189
- delim: "/"
190
- name: "[Gmail]/Starred"
191
- - !ruby/struct:Net::IMAP::MailboxList
192
- attr:
193
- - :Trash
194
- - :Hasnochildren
195
- delim: "/"
196
- name: "[Gmail]/Trash"
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-e0583fa6130ee374cef031c01d8cc486:
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
+ - - :return
62
+ - !ruby/struct:Net::IMAP::TaggedResponse
63
+ tag: RUBY0004
64
+ name: OK
65
+ data: !ruby/struct:Net::IMAP::ResponseText
66
+ code:
67
+ text: Success
68
+ raw_data: "RUBY0004 OK Success\r\n"
69
+ - CAPABILITY: *1
70
+ LIST:
71
+ - !ruby/struct:Net::IMAP::MailboxList
72
+ attr:
73
+ - :Hasnochildren
74
+ delim: "/"
75
+ name: Awesome
76
+ - !ruby/struct:Net::IMAP::MailboxList
77
+ attr:
78
+ - :Hasnochildren
79
+ delim: "/"
80
+ name: Great
81
+ - !ruby/struct:Net::IMAP::MailboxList
82
+ attr:
83
+ - :Hasnochildren
84
+ delim: "/"
85
+ name: INBOX
86
+ - !ruby/struct:Net::IMAP::MailboxList
87
+ attr:
88
+ - :Noselect
89
+ - :Haschildren
90
+ delim: "/"
91
+ name: "[Gmail]"
92
+ LIST-94cc1ce946087e61b81baed886d31dbc:
93
+ - - :return
94
+ - !ruby/struct:Net::IMAP::TaggedResponse
95
+ tag: RUBY0003
96
+ name: OK
97
+ data: !ruby/struct:Net::IMAP::ResponseText
98
+ code:
99
+ text: Success
100
+ raw_data: "RUBY0003 OK Success\r\n"
101
+ - CAPABILITY: *1
102
+ LIST:
103
+ - !ruby/struct:Net::IMAP::MailboxList
104
+ attr:
105
+ - :Hasnochildren
106
+ - :All
107
+ delim: "/"
108
+ name: "[Gmail]/All Mail"
109
+ - !ruby/struct:Net::IMAP::MailboxList
110
+ attr:
111
+ - :Hasnochildren
112
+ - :Drafts
113
+ delim: "/"
114
+ name: "[Gmail]/Drafts"
115
+ - !ruby/struct:Net::IMAP::MailboxList
116
+ attr:
117
+ - :Hasnochildren
118
+ - :Important
119
+ delim: "/"
120
+ name: "[Gmail]/Important"
121
+ - !ruby/struct:Net::IMAP::MailboxList
122
+ attr:
123
+ - :Sent
124
+ - :Hasnochildren
125
+ delim: "/"
126
+ name: "[Gmail]/Sent Mail"
127
+ - !ruby/struct:Net::IMAP::MailboxList
128
+ attr:
129
+ - :Hasnochildren
130
+ - :Junk
131
+ delim: "/"
132
+ name: "[Gmail]/Spam"
133
+ - !ruby/struct:Net::IMAP::MailboxList
134
+ attr:
135
+ - :Hasnochildren
136
+ - :Flagged
137
+ delim: "/"
138
+ name: "[Gmail]/Starred"
139
+ - !ruby/struct:Net::IMAP::MailboxList
140
+ attr:
141
+ - :Trash
142
+ - :Hasnochildren
143
+ delim: "/"
144
+ name: "[Gmail]/Trash"
145
+ - - :return
146
+ - !ruby/struct:Net::IMAP::TaggedResponse
147
+ tag: RUBY0005
148
+ name: OK
149
+ data: !ruby/struct:Net::IMAP::ResponseText
150
+ code:
151
+ text: Success
152
+ raw_data: "RUBY0005 OK Success\r\n"
153
+ - CAPABILITY: *1
154
+ LIST:
155
+ - !ruby/struct:Net::IMAP::MailboxList
156
+ attr:
157
+ - :Hasnochildren
158
+ - :All
159
+ delim: "/"
160
+ name: "[Gmail]/All Mail"
161
+ - !ruby/struct:Net::IMAP::MailboxList
162
+ attr:
163
+ - :Hasnochildren
164
+ - :Drafts
165
+ delim: "/"
166
+ name: "[Gmail]/Drafts"
167
+ - !ruby/struct:Net::IMAP::MailboxList
168
+ attr:
169
+ - :Hasnochildren
170
+ - :Important
171
+ delim: "/"
172
+ name: "[Gmail]/Important"
173
+ - !ruby/struct:Net::IMAP::MailboxList
174
+ attr:
175
+ - :Sent
176
+ - :Hasnochildren
177
+ delim: "/"
178
+ name: "[Gmail]/Sent Mail"
179
+ - !ruby/struct:Net::IMAP::MailboxList
180
+ attr:
181
+ - :Hasnochildren
182
+ - :Junk
183
+ delim: "/"
184
+ name: "[Gmail]/Spam"
185
+ - !ruby/struct:Net::IMAP::MailboxList
186
+ attr:
187
+ - :Hasnochildren
188
+ - :Flagged
189
+ delim: "/"
190
+ name: "[Gmail]/Starred"
191
+ - !ruby/struct:Net::IMAP::MailboxList
192
+ attr:
193
+ - :Trash
194
+ - :Hasnochildren
195
+ delim: "/"
196
+ name: "[Gmail]/Trash"
@@ -1,151 +1,151 @@
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: !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