gmail 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +27 -27
- data/.rspec +1 -1
- data/.rubocop.yml +13 -13
- data/.rubocop_todo.yml +239 -239
- data/.travis.yml +19 -19
- data/CHANGELOG.md +145 -139
- data/Gemfile +3 -3
- data/LICENSE +21 -21
- data/README.md +355 -354
- data/Rakefile +46 -46
- data/gmail.gemspec +34 -34
- data/lib/gmail.rb +78 -78
- data/lib/gmail/client.rb +34 -34
- data/lib/gmail/client/base.rb +229 -229
- data/lib/gmail/client/plain.rb +24 -24
- data/lib/gmail/client/xoauth.rb +68 -68
- data/lib/gmail/client/xoauth2.rb +39 -39
- data/lib/gmail/imap_extensions.rb +159 -150
- data/lib/gmail/labels.rb +79 -79
- data/lib/gmail/mailbox.rb +175 -135
- data/lib/gmail/message.rb +207 -207
- data/lib/gmail/version.rb +3 -3
- data/spec/account.yml.example +1 -1
- data/spec/account.yml.obfus +2 -2
- data/spec/gmail/client/base_spec.rb +5 -5
- data/spec/gmail/client/plain_spec.rb +169 -168
- data/spec/gmail/client/xoauth2_spec.rb +186 -186
- data/spec/gmail/client/xoauth_spec.rb +5 -5
- data/spec/gmail/client_spec.rb +5 -5
- data/spec/gmail/imap_extensions_spec.rb +47 -12
- data/spec/gmail/labels_spec.rb +27 -18
- data/spec/gmail/mailbox_spec.rb +84 -47
- data/spec/gmail/message_spec.rb +181 -181
- data/spec/gmail_spec.rb +39 -39
- data/spec/recordings/gmail/_new_connects_with_client_and_give_it_context_when_block_given.yml +28 -28
- data/spec/recordings/gmail/_new_connects_with_gmail_service_and_return_valid_connection_object.yml +28 -28
- data/spec/recordings/gmail/_new_does_not_raise_error_when_couldn_t_connect_with_given_account.yml +13 -13
- data/spec/recordings/gmail/_new_raises_error_when_couldn_t_connect_with_given_account.yml +13 -13
- data/spec/recordings/gmail_client_plain/instance/_connection_automatically_logs_in_to_gmail_account_when_it_s_called.yml +42 -42
- data/spec/recordings/gmail_client_plain/instance/delivers_inline_composed_email.yml +42 -42
- data/spec/recordings/gmail_client_plain/instance/does_not_log_in_when_given_gmail_account_is_invalid.yml +13 -13
- data/spec/recordings/gmail_client_plain/instance/does_not_raise_error_even_though_gmail_account_is_invalid.yml +13 -13
- data/spec/recordings/gmail_client_plain/instance/labels/checks_if_there_is_given_label_defined.yml +196 -196
- data/spec/recordings/gmail_client_plain/instance/labels/creates_given_label.yml +151 -151
- data/spec/recordings/gmail_client_plain/instance/labels/removes_existing_label.yml +146 -146
- data/spec/recordings/gmail_client_plain/instance/labels/returns_list_of_all_available_labels.yml +113 -113
- data/spec/recordings/gmail_client_plain/instance/properly_logs_in_to_valid_gmail_account.yml +42 -42
- data/spec/recordings/gmail_client_plain/instance/properly_logs_out_from_gmail.yml +42 -42
- data/spec/recordings/gmail_client_plain/instance/properly_switches_to_given_mailbox.yml +109 -109
- data/spec/recordings/gmail_client_plain/instance/properly_switches_to_given_mailbox_using_block_style.yml +109 -109
- data/spec/recordings/gmail_client_plain/instance/raises_error_when_given_gmail_account_is_invalid_and_errors_enabled.yml +13 -13
- data/spec/recordings/gmail_client_xo_auth2/instance/does_not_log_in_when_given_gmail_account_is_invalid.yml +13 -13
- data/spec/recordings/gmail_client_xo_auth2/instance/labels/checks_if_there_is_given_label_defined.yml +27 -27
- data/spec/recordings/gmail_client_xo_auth2/instance/labels/creates_given_label.yml +39 -39
- data/spec/recordings/gmail_client_xo_auth2/instance/labels/removes_existing_label.yml +39 -39
- data/spec/recordings/gmail_client_xo_auth2/instance/labels/returns_list_of_all_available_labels.yml +27 -27
- data/spec/recordings/gmail_client_xo_auth2/instance/properly_logs_in_to_valid_gmail_account.yml +15 -15
- data/spec/recordings/gmail_client_xo_auth2/instance/properly_logs_out_from_gmail.yml +15 -15
- data/spec/recordings/gmail_client_xo_auth2/instance/properly_switches_to_given_mailbox.yml +40 -40
- data/spec/recordings/gmail_client_xo_auth2/instance/properly_switches_to_given_mailbox_using_block_style.yml +40 -40
- data/spec/recordings/gmail_client_xo_auth2/instance/raises_error_when_given_gmail_account_is_invalid_and_errors_enabled.yml +13 -13
- data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/all/localizes_into_the_appropriate_label.yml +116 -116
- 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
- data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/drafts/localizes_into_the_appropriate_label.yml +116 -116
- data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/flagged/localizes_into_the_appropriate_label.yml +116 -116
- data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/important/localizes_into_the_appropriate_label.yml +116 -116
- data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/inbox/localizes_into_the_appropriate_label.yml +42 -42
- data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/junk/localizes_into_the_appropriate_label.yml +116 -116
- data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/sent/localizes_into_the_appropriate_label.yml +116 -116
- data/spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/trash/localizes_into_the_appropriate_label.yml +116 -116
- data/spec/recordings/gmail_mailbox/instance/counts_all_emails.yml +277 -277
- data/spec/recordings/gmail_mailbox/instance/finds_messages.yml +586 -586
- data/spec/recordings/gmail_mailbox/instance/waits_once.yml +136 -0
- data/spec/recordings/gmail_mailbox/instance/waits_repeatedly.yml +141 -0
- data/spec/recordings/gmail_mailbox/instance/waits_with_29-minute_re-issue.yml +136 -0
- data/spec/recordings/gmail_mailbox/instance/waits_with_an_unblocked_connection.yml +207 -0
- data/spec/recordings/gmail_mailbox/on_initialize/sets_client_and_name.yml +42 -42
- data/spec/recordings/gmail_mailbox/on_initialize/works_in_inbox_by_default.yml +42 -42
- data/spec/recordings/gmail_message/initialize/sets_prefetch_attrs.yml +578 -578
- data/spec/recordings/gmail_message/initialize/sets_uid_and_mailbox.yml +580 -580
- data/spec/recordings/gmail_message/instance_methods/deletes_itself.yml +637 -637
- data/spec/recordings/gmail_message/instance_methods/marks_itself_read.yml +682 -682
- data/spec/recordings/gmail_message/instance_methods/marks_itself_unread.yml +686 -686
- data/spec/recordings/gmail_message/instance_methods/moves_from_one_tag_to_other.yml +862 -862
- data/spec/recordings/gmail_message/instance_methods/removes_a_given_label.yml +776 -776
- data/spec/recordings/gmail_message/instance_methods/removes_a_given_label_with_old_method.yml +776 -776
- data/spec/recordings/gmail_message/instance_methods/sets_given_label.yml +690 -690
- data/spec/recordings/gmail_message/instance_methods/sets_given_label_with_old_method.yml +691 -691
- data/spec/spec_helper.rb +53 -53
- data/spec/support/imap_mock.rb +181 -129
- data/spec/support/obfuscation.rb +52 -52
- metadata +78 -5
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gmail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Kowalik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mail
|
@@ -165,6 +165,7 @@ files:
|
|
165
165
|
- spec/recordings/gmail_client_xo_auth2/instance/properly_switches_to_given_mailbox_using_block_style.yml
|
166
166
|
- spec/recordings/gmail_client_xo_auth2/instance/raises_error_when_given_gmail_account_is_invalid_and_errors_enabled.yml
|
167
167
|
- spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/all/localizes_into_the_appropriate_label.yml
|
168
|
+
- 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
|
168
169
|
- spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/drafts/localizes_into_the_appropriate_label.yml
|
169
170
|
- spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/flagged/localizes_into_the_appropriate_label.yml
|
170
171
|
- spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/important/localizes_into_the_appropriate_label.yml
|
@@ -174,6 +175,10 @@ files:
|
|
174
175
|
- spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/trash/localizes_into_the_appropriate_label.yml
|
175
176
|
- spec/recordings/gmail_mailbox/instance/counts_all_emails.yml
|
176
177
|
- spec/recordings/gmail_mailbox/instance/finds_messages.yml
|
178
|
+
- spec/recordings/gmail_mailbox/instance/waits_once.yml
|
179
|
+
- spec/recordings/gmail_mailbox/instance/waits_repeatedly.yml
|
180
|
+
- spec/recordings/gmail_mailbox/instance/waits_with_29-minute_re-issue.yml
|
181
|
+
- spec/recordings/gmail_mailbox/instance/waits_with_an_unblocked_connection.yml
|
177
182
|
- spec/recordings/gmail_mailbox/on_initialize/sets_client_and_name.yml
|
178
183
|
- spec/recordings/gmail_mailbox/on_initialize/works_in_inbox_by_default.yml
|
179
184
|
- spec/recordings/gmail_message/initialize/sets_prefetch_attrs.yml
|
@@ -209,9 +214,77 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
214
|
version: '0'
|
210
215
|
requirements: []
|
211
216
|
rubyforge_project:
|
212
|
-
rubygems_version: 2.
|
217
|
+
rubygems_version: 2.4.8
|
213
218
|
signing_key:
|
214
219
|
specification_version: 4
|
215
220
|
summary: A Rubyesque interface to Gmail, with all the tools you will need.
|
216
|
-
test_files:
|
217
|
-
|
221
|
+
test_files:
|
222
|
+
- spec/account.yml.example
|
223
|
+
- spec/account.yml.obfus
|
224
|
+
- spec/gmail/client/base_spec.rb
|
225
|
+
- spec/gmail/client/plain_spec.rb
|
226
|
+
- spec/gmail/client/xoauth2_spec.rb
|
227
|
+
- spec/gmail/client/xoauth_spec.rb
|
228
|
+
- spec/gmail/client_spec.rb
|
229
|
+
- spec/gmail/imap_extensions_spec.rb
|
230
|
+
- spec/gmail/labels_spec.rb
|
231
|
+
- spec/gmail/mailbox_spec.rb
|
232
|
+
- spec/gmail/message_spec.rb
|
233
|
+
- spec/gmail_spec.rb
|
234
|
+
- spec/recordings/gmail/_new_connects_with_client_and_give_it_context_when_block_given.yml
|
235
|
+
- spec/recordings/gmail/_new_connects_with_gmail_service_and_return_valid_connection_object.yml
|
236
|
+
- spec/recordings/gmail/_new_does_not_raise_error_when_couldn_t_connect_with_given_account.yml
|
237
|
+
- spec/recordings/gmail/_new_raises_error_when_couldn_t_connect_with_given_account.yml
|
238
|
+
- spec/recordings/gmail_client_plain/instance/_connection_automatically_logs_in_to_gmail_account_when_it_s_called.yml
|
239
|
+
- spec/recordings/gmail_client_plain/instance/delivers_inline_composed_email.yml
|
240
|
+
- spec/recordings/gmail_client_plain/instance/does_not_log_in_when_given_gmail_account_is_invalid.yml
|
241
|
+
- spec/recordings/gmail_client_plain/instance/does_not_raise_error_even_though_gmail_account_is_invalid.yml
|
242
|
+
- spec/recordings/gmail_client_plain/instance/labels/checks_if_there_is_given_label_defined.yml
|
243
|
+
- spec/recordings/gmail_client_plain/instance/labels/creates_given_label.yml
|
244
|
+
- spec/recordings/gmail_client_plain/instance/labels/removes_existing_label.yml
|
245
|
+
- spec/recordings/gmail_client_plain/instance/labels/returns_list_of_all_available_labels.yml
|
246
|
+
- spec/recordings/gmail_client_plain/instance/properly_logs_in_to_valid_gmail_account.yml
|
247
|
+
- spec/recordings/gmail_client_plain/instance/properly_logs_out_from_gmail.yml
|
248
|
+
- spec/recordings/gmail_client_plain/instance/properly_switches_to_given_mailbox.yml
|
249
|
+
- spec/recordings/gmail_client_plain/instance/properly_switches_to_given_mailbox_using_block_style.yml
|
250
|
+
- spec/recordings/gmail_client_plain/instance/raises_error_when_given_gmail_account_is_invalid_and_errors_enabled.yml
|
251
|
+
- spec/recordings/gmail_client_xo_auth2/instance/does_not_log_in_when_given_gmail_account_is_invalid.yml
|
252
|
+
- spec/recordings/gmail_client_xo_auth2/instance/labels/checks_if_there_is_given_label_defined.yml
|
253
|
+
- spec/recordings/gmail_client_xo_auth2/instance/labels/creates_given_label.yml
|
254
|
+
- spec/recordings/gmail_client_xo_auth2/instance/labels/removes_existing_label.yml
|
255
|
+
- spec/recordings/gmail_client_xo_auth2/instance/labels/returns_list_of_all_available_labels.yml
|
256
|
+
- spec/recordings/gmail_client_xo_auth2/instance/properly_logs_in_to_valid_gmail_account.yml
|
257
|
+
- spec/recordings/gmail_client_xo_auth2/instance/properly_logs_out_from_gmail.yml
|
258
|
+
- spec/recordings/gmail_client_xo_auth2/instance/properly_switches_to_given_mailbox.yml
|
259
|
+
- spec/recordings/gmail_client_xo_auth2/instance/properly_switches_to_given_mailbox_using_block_style.yml
|
260
|
+
- spec/recordings/gmail_client_xo_auth2/instance/raises_error_when_given_gmail_account_is_invalid_and_errors_enabled.yml
|
261
|
+
- spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/all/localizes_into_the_appropriate_label.yml
|
262
|
+
- 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
|
263
|
+
- spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/drafts/localizes_into_the_appropriate_label.yml
|
264
|
+
- spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/flagged/localizes_into_the_appropriate_label.yml
|
265
|
+
- spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/important/localizes_into_the_appropriate_label.yml
|
266
|
+
- spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/inbox/localizes_into_the_appropriate_label.yml
|
267
|
+
- spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/junk/localizes_into_the_appropriate_label.yml
|
268
|
+
- spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/sent/localizes_into_the_appropriate_label.yml
|
269
|
+
- spec/recordings/gmail_labels/localize/when_given_the_xl_is_tflag/trash/localizes_into_the_appropriate_label.yml
|
270
|
+
- spec/recordings/gmail_mailbox/instance/counts_all_emails.yml
|
271
|
+
- spec/recordings/gmail_mailbox/instance/finds_messages.yml
|
272
|
+
- spec/recordings/gmail_mailbox/instance/waits_once.yml
|
273
|
+
- spec/recordings/gmail_mailbox/instance/waits_repeatedly.yml
|
274
|
+
- spec/recordings/gmail_mailbox/instance/waits_with_29-minute_re-issue.yml
|
275
|
+
- spec/recordings/gmail_mailbox/instance/waits_with_an_unblocked_connection.yml
|
276
|
+
- spec/recordings/gmail_mailbox/on_initialize/sets_client_and_name.yml
|
277
|
+
- spec/recordings/gmail_mailbox/on_initialize/works_in_inbox_by_default.yml
|
278
|
+
- spec/recordings/gmail_message/initialize/sets_prefetch_attrs.yml
|
279
|
+
- spec/recordings/gmail_message/initialize/sets_uid_and_mailbox.yml
|
280
|
+
- spec/recordings/gmail_message/instance_methods/deletes_itself.yml
|
281
|
+
- spec/recordings/gmail_message/instance_methods/marks_itself_read.yml
|
282
|
+
- spec/recordings/gmail_message/instance_methods/marks_itself_unread.yml
|
283
|
+
- spec/recordings/gmail_message/instance_methods/moves_from_one_tag_to_other.yml
|
284
|
+
- spec/recordings/gmail_message/instance_methods/removes_a_given_label.yml
|
285
|
+
- spec/recordings/gmail_message/instance_methods/removes_a_given_label_with_old_method.yml
|
286
|
+
- spec/recordings/gmail_message/instance_methods/sets_given_label.yml
|
287
|
+
- spec/recordings/gmail_message/instance_methods/sets_given_label_with_old_method.yml
|
288
|
+
- spec/spec_helper.rb
|
289
|
+
- spec/support/imap_mock.rb
|
290
|
+
- spec/support/obfuscation.rb
|