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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: afccbbf649f71728d76ebb4c7a3423ccefc1f2a7
4
- data.tar.gz: cc06b8370e2a0749711e4e603263bb043647b85a
3
+ metadata.gz: b9004bac96504f2376823a5eb1e5a713ab95679f
4
+ data.tar.gz: 83048df9735f6f3a53307b1e3e84601fc3989630
5
5
  SHA512:
6
- metadata.gz: 1fac62628fd505868cdae167080ef470cd7bcdb1b3f987d51deba6f8cd30bdbf737d3be751d79aa3eb163674207720c6c6552429fce5ea6ab4fd7b176b96792b
7
- data.tar.gz: 9defe569b019be86350726c72d101e25973f19c04d0197caca0a5fd6dad1ae9939482da1f58ba8f02ca9b8fbc904a8622a7989d0770c720335009329c8415245
6
+ metadata.gz: 2eb36e627cd4230f22e045546dc9a6934640b611451a2f2bd89c1cd828b2daf8f9eacd982c2347d5841b37ddcac270059683ca29e858a615ebc53ca74aeb7179
7
+ data.tar.gz: 71bf8272ad612190c64f4ffbf0e98f0395fd15b2b9ee23ed22b51f5fa5999a91ec10889c872fe1cf6342d7943393abbd277ec92136cf6ff36431d74fd0572807
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.gitignore CHANGED
@@ -1,27 +1,27 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
- Gemfile.lock
21
- *.gem
22
-
23
- ## PROJECT::SPECIFIC
24
- *.rdb
25
-
26
- ## Test Account details
27
- spec/account.yml
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+ Gemfile.lock
21
+ *.gem
22
+
23
+ ## PROJECT::SPECIFIC
24
+ *.rdb
25
+
26
+ ## Test Account details
27
+ spec/account.yml
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
- --colour
1
+ --colour
2
2
  --backtrace
@@ -1,13 +1,53 @@
1
- inherit_from: .rubocop_todo.yml
2
-
3
- Style/HashSyntax:
4
- EnforcedStyle: hash_rockets
5
- SupportedStyles:
6
- - ruby19
7
- - hash_rockets
8
-
9
- Style/StringLiterals:
10
- EnforcedStyle: single_quotes
11
- SupportedStyles:
12
- - single_quotes
13
- - double_quotes
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ Style/HashSyntax:
4
+ EnforcedStyle: hash_rockets
5
+ SupportedStyles:
6
+ - ruby19
7
+ - hash_rockets
8
+
9
+ Style/StringLiterals:
10
+ EnforcedStyle: single_quotes
11
+ SupportedStyles:
12
+ - single_quotes
13
+ - double_quotes
14
+
15
+ Style/RegexpLiteral:
16
+ Enabled: false
17
+
18
+ Metrics/ModuleLength:
19
+ Enabled: false
20
+
21
+ Metrics/BlockLength:
22
+ Max: 100
23
+ Exclude:
24
+ - spec/**/*
25
+
26
+ Lint/NestedMethodDefinition:
27
+ Enabled: false
28
+
29
+ Layout/SpaceAroundOperators:
30
+ Enabled: false
31
+
32
+ Layout/ClosingParenthesisIndentation:
33
+ Enabled: false
34
+
35
+ Style/ParallelAssignment:
36
+ Enabled: false
37
+
38
+ Style/RescueModifier:
39
+ Enabled: false
40
+
41
+ Style/CommentedKeyword:
42
+ Exclude:
43
+ - lib/**/*
44
+
45
+ Lint/LiteralAsCondition:
46
+ Enabled: false
47
+
48
+ Style/SymbolArray:
49
+ Enabled: false
50
+
51
+ Security/YAMLLoad:
52
+ Exclude:
53
+ - spec/support/obfuscation.rb
@@ -1,239 +1,299 @@
1
- # This configuration was generated by `rubocop --auto-gen-config`
2
- # on 2015-01-19 09:48:24 -0500 using RuboCop version 0.28.0.
3
- # The point is for the user to remove these configuration records
4
- # one by one as the offenses are removed from the code base.
5
- # Note that changes in the inspected code, or installation of new
6
- # versions of RuboCop, may require this file to be generated again.
7
-
8
- # Offense count: 1
9
- # Configuration parameters: AllowSafeAssignment.
10
- Lint/AssignmentInCondition:
11
- Enabled: false
12
-
13
- # Offense count: 1
14
- # Cop supports --auto-correct.
15
- Lint/BlockAlignment:
16
- Enabled: false
17
-
18
- # Offense count: 1
19
- Lint/LiteralInCondition:
20
- Enabled: false
21
-
22
- # Offense count: 2
23
- Lint/RescueException:
24
- Enabled: false
25
-
26
- # Offense count: 1
27
- Lint/ShadowingOuterLocalVariable:
28
- Enabled: false
29
-
30
- # Offense count: 1
31
- # Cop supports --auto-correct.
32
- Lint/StringConversionInInterpolation:
33
- Enabled: false
34
-
35
- # Offense count: 1
36
- Lint/UnderscorePrefixedVariableName:
37
- Enabled: false
38
-
39
- # Offense count: 2
40
- # Cop supports --auto-correct.
41
- Lint/UnusedBlockArgument:
42
- Enabled: false
43
-
44
- # Offense count: 7
45
- # Cop supports --auto-correct.
46
- Lint/UnusedMethodArgument:
47
- Enabled: false
48
-
49
- # Offense count: 2
50
- Lint/UselessAssignment:
51
- Enabled: false
52
-
53
- # Offense count: 12
54
- Lint/Void:
55
- Enabled: false
56
-
57
- # Offense count: 10
58
- Metrics/AbcSize:
59
- Max: 1000
60
-
61
- # Offense count: 2
62
- # Configuration parameters: CountComments.
63
- Metrics/ClassLength:
64
- Max: 1000
65
-
66
- # Offense count: 5
67
- Metrics/CyclomaticComplexity:
68
- Max: 1000
69
-
70
- # Offense count: 67
71
- # Configuration parameters: AllowURI, URISchemes.
72
- Metrics/LineLength:
73
- Max: 1000
74
-
75
- # Offense count: 12
76
- # Configuration parameters: CountComments.
77
- Metrics/MethodLength:
78
- Max: 1000
79
-
80
- # Offense count: 3
81
- Metrics/PerceivedComplexity:
82
- Max: 1000
83
-
84
- # Offense count: 27
85
- # Cop supports --auto-correct.
86
- Style/Alias:
87
- Enabled: false
88
-
89
- # Offense count: 1
90
- # Cop supports --auto-correct.
91
- # Configuration parameters: EnforcedStyle, SupportedStyles.
92
- Style/AlignParameters:
93
- Enabled: false
94
-
95
- # Offense count: 21
96
- # Cop supports --auto-correct.
97
- # Configuration parameters: EnforcedStyle, SupportedStyles.
98
- Style/AndOr:
99
- Enabled: false
100
-
101
- # Offense count: 18
102
- # Cop supports --auto-correct.
103
- Style/Blocks:
104
- Enabled: false
105
-
106
- # Offense count: 4
107
- # Cop supports --auto-correct.
108
- # Configuration parameters: EnforcedStyle, SupportedStyles.
109
- Style/BracesAroundHashParameters:
110
- Enabled: false
111
-
112
- # Offense count: 2
113
- # Cop supports --auto-correct.
114
- Style/ColonMethodCall:
115
- Enabled: false
116
-
117
- # Offense count: 2
118
- # Cop supports --auto-correct.
119
- Style/CommentIndentation:
120
- Enabled: false
121
-
122
- # Offense count: 18
123
- Style/Documentation:
124
- Enabled: false
125
-
126
- # Offense count: 5
127
- Style/DoubleNegation:
128
- Enabled: false
129
-
130
- # Offense count: 1
131
- Style/EachWithObject:
132
- Enabled: false
133
-
134
- # Offense count: 1
135
- # Cop supports --auto-correct.
136
- Style/ElseAlignment:
137
- Enabled: false
138
-
139
- # Offense count: 1
140
- # Cop supports --auto-correct.
141
- Style/EmptyLiteral:
142
- Enabled: false
143
-
144
- # Offense count: 4
145
- # Configuration parameters: EnforcedStyle, SupportedStyles.
146
- Style/FormatString:
147
- Enabled: false
148
-
149
- # Offense count: 2
150
- # Configuration parameters: MaxLineLength.
151
- Style/IfUnlessModifier:
152
- Enabled: false
153
-
154
- # Offense count: 6
155
- # Cop supports --auto-correct.
156
- # Configuration parameters: EnforcedStyle, SupportedStyles.
157
- Style/IndentHash:
158
- Enabled: false
159
-
160
- # Offense count: 2
161
- # Cop supports --auto-correct.
162
- # Configuration parameters: Width.
163
- Style/IndentationWidth:
164
- Enabled: false
165
-
166
- # Offense count: 1
167
- # Cop supports --auto-correct.
168
- Style/InfiniteLoop:
169
- Enabled: false
170
-
171
- # Offense count: 5
172
- Style/Lambda:
173
- Enabled: false
174
-
175
- # Offense count: 1
176
- Style/ModuleFunction:
177
- Enabled: false
178
-
179
- # Offense count: 4
180
- # Cop supports --auto-correct.
181
- # Configuration parameters: EnforcedStyle, SupportedStyles.
182
- Style/MultilineOperationIndentation:
183
- Enabled: false
184
-
185
- # Offense count: 2
186
- # Cop supports --auto-correct.
187
- Style/NegatedIf:
188
- Enabled: false
189
-
190
- # Offense count: 1
191
- # Cop supports --auto-correct.
192
- Style/NumericLiterals:
193
- MinDigits: 1000
194
-
195
- # Offense count: 3
196
- # Cop supports --auto-correct.
197
- # Configuration parameters: PreferredDelimiters.
198
- Style/PercentLiteralDelimiters:
199
- Enabled: false
200
-
201
- # Offense count: 2
202
- # Cop supports --auto-correct.
203
- # Configuration parameters: AllowMultipleReturnValues.
204
- Style/RedundantReturn:
205
- Enabled: false
206
-
207
- # Offense count: 1
208
- # Cop supports --auto-correct.
209
- Style/RedundantSelf:
210
- Enabled: false
211
-
212
- # Offense count: 7
213
- # Cop supports --auto-correct.
214
- # Configuration parameters: EnforcedStyle, SupportedStyles.
215
- Style/SignalException:
216
- Enabled: false
217
-
218
- # Offense count: 1
219
- # Cop supports --auto-correct.
220
- Style/SpecialGlobalVars:
221
- Enabled: false
222
-
223
- # Offense count: 234
224
- # Cop supports --auto-correct.
225
- # Configuration parameters: EnforcedStyle, SupportedStyles.
226
- Style/StringLiterals:
227
- Enabled: false
228
-
229
- # Offense count: 1
230
- # Cop supports --auto-correct.
231
- # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, Whitelist.
232
- Style/TrivialAccessors:
233
- Enabled: false
234
-
235
- # Offense count: 1
236
- # Cop supports --auto-correct.
237
- # Configuration parameters: WordRegex.
238
- Style/WordArray:
239
- MinSize: 1000
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2018-07-19 01:18:32 +0900 using RuboCop version 0.58.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
12
+ # SupportedStyles: outdent, indent
13
+ Layout/AccessModifierIndentation:
14
+ Exclude:
15
+ - 'lib/gmail/mailbox.rb'
16
+
17
+ # Offense count: 1
18
+ # Cop supports --auto-correct.
19
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
20
+ # SupportedStyles: with_first_parameter, with_fixed_indentation
21
+ Layout/AlignParameters:
22
+ Exclude:
23
+ - 'lib/gmail/client/xoauth.rb'
24
+
25
+ # Offense count: 1
26
+ # Cop supports --auto-correct.
27
+ Layout/CommentIndentation:
28
+ Exclude:
29
+ - 'spec/gmail_spec.rb'
30
+
31
+ # Offense count: 6
32
+ # Cop supports --auto-correct.
33
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
34
+ # SupportedStyles: special_inside_parentheses, consistent, align_braces
35
+ Layout/IndentHash:
36
+ Exclude:
37
+ - 'lib/gmail/client/xoauth.rb'
38
+ - 'lib/gmail/client/xoauth2.rb'
39
+ - 'spec/gmail/client/xoauth2_spec.rb'
40
+
41
+ # Offense count: 1
42
+ # Configuration parameters: AllowSafeAssignment.
43
+ Lint/AssignmentInCondition:
44
+ Exclude:
45
+ - 'lib/gmail/client.rb'
46
+
47
+ # Offense count: 2
48
+ Lint/RescueException:
49
+ Exclude:
50
+ - 'spec/support/obfuscation.rb'
51
+
52
+ # Offense count: 1
53
+ Lint/ShadowingOuterLocalVariable:
54
+ Exclude:
55
+ - 'spec/support/obfuscation.rb'
56
+
57
+ # Offense count: 1
58
+ # Cop supports --auto-correct.
59
+ Lint/StringConversionInInterpolation:
60
+ Exclude:
61
+ - 'lib/gmail/client/base.rb'
62
+
63
+ # Offense count: 1
64
+ Lint/UnderscorePrefixedVariableName:
65
+ Exclude:
66
+ - 'lib/gmail/message.rb'
67
+
68
+ # Offense count: 2
69
+ # Cop supports --auto-correct.
70
+ # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
71
+ Lint/UnusedBlockArgument:
72
+ Exclude:
73
+ - 'spec/gmail/mailbox_spec.rb'
74
+
75
+ # Offense count: 9
76
+ # Cop supports --auto-correct.
77
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
78
+ Lint/UnusedMethodArgument:
79
+ Exclude:
80
+ - 'lib/gmail.rb'
81
+ - 'lib/gmail/client/base.rb'
82
+ - 'lib/gmail/mailbox.rb'
83
+ - 'spec/gmail/client/xoauth2_spec.rb'
84
+ - 'spec/spec_helper.rb'
85
+
86
+ # Offense count: 2
87
+ Lint/UselessAssignment:
88
+ Exclude:
89
+ - 'spec/support/obfuscation.rb'
90
+
91
+ # Offense count: 12
92
+ Metrics/AbcSize:
93
+ Max: 84
94
+
95
+ # Offense count: 3
96
+ # Configuration parameters: CountComments.
97
+ Metrics/ClassLength:
98
+ Max: 149
99
+
100
+ # Offense count: 6
101
+ Metrics/CyclomaticComplexity:
102
+ Max: 24
103
+
104
+ # Offense count: 15
105
+ # Configuration parameters: CountComments.
106
+ Metrics/MethodLength:
107
+ Max: 88
108
+
109
+ # Offense count: 4
110
+ Metrics/PerceivedComplexity:
111
+ Max: 20
112
+
113
+ # Offense count: 1
114
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
115
+ # AllowedNames: io, id, to, by, on, in, at
116
+ Naming/UncommunicativeMethodParamName:
117
+ Exclude:
118
+ - 'lib/gmail/imap_extensions.rb'
119
+
120
+ # Offense count: 1
121
+ # Cop supports --auto-correct.
122
+ Performance/InefficientHashSearch:
123
+ Exclude:
124
+ - 'lib/gmail/imap_extensions.rb'
125
+
126
+ # Offense count: 37
127
+ # Cop supports --auto-correct.
128
+ # Configuration parameters: EnforcedStyle.
129
+ # SupportedStyles: prefer_alias, prefer_alias_method
130
+ Style/Alias:
131
+ Exclude:
132
+ - 'lib/gmail.rb'
133
+ - 'lib/gmail/client/base.rb'
134
+ - 'lib/gmail/labels.rb'
135
+ - 'lib/gmail/mailbox.rb'
136
+ - 'lib/gmail/message.rb'
137
+ - 'spec/support/imap_mock.rb'
138
+
139
+ # Offense count: 22
140
+ # Cop supports --auto-correct.
141
+ # Configuration parameters: EnforcedStyle.
142
+ # SupportedStyles: always, conditionals
143
+ Style/AndOr:
144
+ Exclude:
145
+ - 'lib/gmail/client/base.rb'
146
+ - 'lib/gmail/client/plain.rb'
147
+ - 'lib/gmail/client/xoauth.rb'
148
+ - 'lib/gmail/client/xoauth2.rb'
149
+ - 'lib/gmail/mailbox.rb'
150
+ - 'spec/support/imap_mock.rb'
151
+
152
+ # Offense count: 5
153
+ # Cop supports --auto-correct.
154
+ # Configuration parameters: EnforcedStyle.
155
+ # SupportedStyles: braces, no_braces, context_dependent
156
+ Style/BracesAroundHashParameters:
157
+ Exclude:
158
+ - 'spec/gmail/client/xoauth2_spec.rb'
159
+
160
+ # Offense count: 7
161
+ # Cop supports --auto-correct.
162
+ Style/ColonMethodCall:
163
+ Exclude:
164
+ - 'spec/gmail/imap_extensions_spec.rb'
165
+ - 'spec/support/obfuscation.rb'
166
+
167
+ # Offense count: 13
168
+ Style/Documentation:
169
+ Exclude:
170
+ - 'spec/**/*'
171
+ - 'test/**/*'
172
+ - 'lib/gmail.rb'
173
+ - 'lib/gmail/client.rb'
174
+ - 'lib/gmail/client/base.rb'
175
+ - 'lib/gmail/client/plain.rb'
176
+ - 'lib/gmail/client/xoauth.rb'
177
+ - 'lib/gmail/client/xoauth2.rb'
178
+ - 'lib/gmail/imap_extensions.rb'
179
+ - 'lib/gmail/labels.rb'
180
+ - 'lib/gmail/mailbox.rb'
181
+ - 'lib/gmail/message.rb'
182
+
183
+ # Offense count: 5
184
+ Style/DoubleNegation:
185
+ Exclude:
186
+ - 'lib/gmail/client/base.rb'
187
+ - 'lib/gmail/labels.rb'
188
+ - 'lib/gmail/message.rb'
189
+
190
+ # Offense count: 1
191
+ # Cop supports --auto-correct.
192
+ Style/EachWithObject:
193
+ Exclude:
194
+ - 'lib/gmail/labels.rb'
195
+
196
+ # Offense count: 1
197
+ # Cop supports --auto-correct.
198
+ Style/ExpandPathArguments:
199
+ Exclude:
200
+ - 'gmail.gemspec'
201
+
202
+ # Offense count: 4
203
+ # Cop supports --auto-correct.
204
+ # Configuration parameters: EnforcedStyle.
205
+ # SupportedStyles: format, sprintf, percent
206
+ Style/FormatString:
207
+ Exclude:
208
+ - 'lib/gmail/client/base.rb'
209
+ - 'lib/gmail/labels.rb'
210
+ - 'lib/gmail/mailbox.rb'
211
+ - 'lib/gmail/message.rb'
212
+
213
+ # Offense count: 1
214
+ # Cop supports --auto-correct.
215
+ # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
216
+ # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
217
+ Style/HashSyntax:
218
+ Exclude:
219
+ - 'lib/gmail/message.rb'
220
+
221
+ # Offense count: 3
222
+ # Cop supports --auto-correct.
223
+ Style/IfUnlessModifier:
224
+ Exclude:
225
+ - 'lib/gmail.rb'
226
+ - 'lib/gmail/client/base.rb'
227
+ - 'spec/support/imap_mock.rb'
228
+
229
+ # Offense count: 1
230
+ # Cop supports --auto-correct.
231
+ Style/InfiniteLoop:
232
+ Exclude:
233
+ - 'lib/gmail/imap_extensions.rb'
234
+
235
+ # Offense count: 5
236
+ # Cop supports --auto-correct.
237
+ # Configuration parameters: EnforcedStyle.
238
+ # SupportedStyles: line_count_dependent, lambda, literal
239
+ Style/Lambda:
240
+ Exclude:
241
+ - 'spec/gmail/client/xoauth2_spec.rb'
242
+
243
+ # Offense count: 1
244
+ # Cop supports --auto-correct.
245
+ # Configuration parameters: EnforcedStyle.
246
+ # SupportedStyles: module_function, extend_self
247
+ Style/ModuleFunction:
248
+ Exclude:
249
+ - 'spec/support/obfuscation.rb'
250
+
251
+ # Offense count: 1
252
+ # Cop supports --auto-correct.
253
+ # Configuration parameters: EnforcedStyle.
254
+ # SupportedStyles: both, prefix, postfix
255
+ Style/NegatedIf:
256
+ Exclude:
257
+ - 'lib/gmail/client/base.rb'
258
+
259
+ # Offense count: 2
260
+ # Cop supports --auto-correct.
261
+ # Configuration parameters: AllowMultipleReturnValues.
262
+ Style/RedundantReturn:
263
+ Exclude:
264
+ - 'lib/gmail/imap_extensions.rb'
265
+
266
+ # Offense count: 1
267
+ # Cop supports --auto-correct.
268
+ Style/RedundantSelf:
269
+ Exclude:
270
+ - 'lib/gmail/imap_extensions.rb'
271
+
272
+ # Offense count: 1
273
+ # Cop supports --auto-correct.
274
+ # Configuration parameters: EnforcedStyle.
275
+ # SupportedStyles: use_perl_names, use_english_names
276
+ Style/SpecialGlobalVars:
277
+ Exclude:
278
+ - 'gmail.gemspec'
279
+
280
+ # Offense count: 256
281
+ # Cop supports --auto-correct.
282
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
283
+ # SupportedStyles: single_quotes, double_quotes
284
+ Style/StringLiterals:
285
+ Enabled: false
286
+
287
+ # Offense count: 1
288
+ # Cop supports --auto-correct.
289
+ # Configuration parameters: EnforcedStyle, MinSize, WordRegex.
290
+ # SupportedStyles: percent, brackets
291
+ Style/WordArray:
292
+ Exclude:
293
+ - 'lib/gmail/mailbox.rb'
294
+
295
+ # Offense count: 67
296
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
297
+ # URISchemes: http, https
298
+ Metrics/LineLength:
299
+ Max: 153