mail_room 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +10 -0
  3. data/.github/workflows/ci.yml +54 -0
  4. data/.gitlab-ci.yml +14 -12
  5. data/.rubocop.yml +6 -0
  6. data/.rubocop_todo.yml +497 -0
  7. data/.ruby-version +1 -1
  8. data/.tool-versions +1 -0
  9. data/CHANGELOG.md +8 -0
  10. data/README.md +136 -28
  11. data/Rakefile +1 -1
  12. data/lib/mail_room/arbitration/redis.rb +8 -1
  13. data/lib/mail_room/cli.rb +9 -2
  14. data/lib/mail_room/connection.rb +10 -177
  15. data/lib/mail_room/crash_handler.rb +26 -0
  16. data/lib/mail_room/delivery/letter_opener.rb +1 -1
  17. data/lib/mail_room/delivery/postback.rb +60 -10
  18. data/lib/mail_room/delivery/que.rb +15 -1
  19. data/lib/mail_room/delivery/sidekiq.rb +11 -3
  20. data/lib/mail_room/imap/connection.rb +200 -0
  21. data/lib/mail_room/imap/message.rb +19 -0
  22. data/lib/mail_room/imap.rb +8 -0
  23. data/lib/mail_room/jwt.rb +39 -0
  24. data/lib/mail_room/logger/structured.rb +15 -1
  25. data/lib/mail_room/mailbox.rb +77 -21
  26. data/lib/mail_room/mailbox_watcher.rb +9 -1
  27. data/lib/mail_room/message.rb +16 -0
  28. data/lib/mail_room/microsoft_graph/connection.rb +243 -0
  29. data/lib/mail_room/microsoft_graph.rb +7 -0
  30. data/lib/mail_room/version.rb +1 -1
  31. data/lib/mail_room.rb +2 -0
  32. data/mail_room.gemspec +9 -4
  33. data/spec/fixtures/jwt_secret +1 -0
  34. data/spec/lib/arbitration/redis_spec.rb +9 -7
  35. data/spec/lib/cli_spec.rb +46 -11
  36. data/spec/lib/configuration_spec.rb +2 -3
  37. data/spec/lib/coordinator_spec.rb +11 -9
  38. data/spec/lib/crash_handler_spec.rb +42 -0
  39. data/spec/lib/delivery/letter_opener_spec.rb +12 -7
  40. data/spec/lib/delivery/logger_spec.rb +10 -11
  41. data/spec/lib/delivery/postback_spec.rb +92 -24
  42. data/spec/lib/delivery/que_spec.rb +5 -8
  43. data/spec/lib/delivery/sidekiq_spec.rb +33 -11
  44. data/spec/lib/{connection_spec.rb → imap/connection_spec.rb} +13 -17
  45. data/spec/lib/imap/message_spec.rb +36 -0
  46. data/spec/lib/jwt_spec.rb +80 -0
  47. data/spec/lib/logger/structured_spec.rb +35 -3
  48. data/spec/lib/mailbox_spec.rb +85 -34
  49. data/spec/lib/mailbox_watcher_spec.rb +54 -41
  50. data/spec/lib/message_spec.rb +35 -0
  51. data/spec/lib/microsoft_graph/connection_spec.rb +252 -0
  52. data/spec/spec_helper.rb +14 -4
  53. metadata +110 -24
  54. data/.travis.yml +0 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50ef3164bc5ce5e15087123671dadb214280376dc4e92cc9bdf62ec3c92a6ca1
4
- data.tar.gz: 1dd1a45af0fcd31f5b64aac56d6546a7b46eb2d2c0c1cb7e1753fe8d09e57b49
3
+ metadata.gz: 8937600a24f4f4321d47b0f1deb08d80a333785295b4e150fbe0e999e323ef3d
4
+ data.tar.gz: a83dfa14d4b068d6147298cdb6eb94f06f247616abc2631392316beb3eb79002
5
5
  SHA512:
6
- metadata.gz: a661b81b53b230a51b89a68d54a9711b8f68b7b9ed0ebafc206db9839894abb42f361efe49014ea325b0b528303b5ed9e78c38be7a301b2df91c6efd22565f5c
7
- data.tar.gz: 97f6e54d35ea41c3935db82b57c932d89869c5dd76e8ba2fd92b5024e41bfc79a26dbaa67caffce3952d93ff3144de9ff0a8d10c78f1c52f2043c15282af3d22
6
+ metadata.gz: bd3e703bca57dae0549cbc8cb51ab5fb63f5ad49ceb721b4567758c10779949c540c8bce100cbc656b0a420e761513a0d15716107e4443cfb1f1e35053fd60fe
7
+ data.tar.gz: 5e873c3fdf2ee82aec7d7ec4485223c386c3ed0e274113670ca5c949467d6abb7551d8777d601d9e3f3a14bfceff44c24fbdb46cb4bdf084a0124ce63215fd67
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "bundler"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "daily"
7
+ - package-ecosystem: "github-actions"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "weekly"
@@ -0,0 +1,54 @@
1
+ name: CI
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+
9
+ services:
10
+ # Label used to access the service container
11
+ redis:
12
+ # Docker Hub image
13
+ image: redis
14
+ # Set health checks to wait until redis has started
15
+ options: >-
16
+ --health-cmd "redis-cli ping"
17
+ --health-interval 10s
18
+ --health-timeout 5s
19
+ --health-retries 5
20
+ ports:
21
+ # Maps port 6379 on service container to the host
22
+ - 6379:6379
23
+
24
+ strategy:
25
+ fail-fast: false
26
+ matrix:
27
+ ruby-version:
28
+ - head
29
+ - '3.2'
30
+ - '3.1'
31
+ - '3.0'
32
+ - '2.7'
33
+ steps:
34
+ - uses: actions/checkout@v3
35
+ - name: Set up Ruby ${{ matrix.ruby-version }}
36
+ uses: ruby/setup-ruby@v1
37
+ with:
38
+ ruby-version: ${{ matrix.ruby-version }}
39
+ bundler-cache: true # 'bundle install' and cache
40
+ - name: Run tests
41
+ run: bundle exec rspec
42
+
43
+ rubocop:
44
+ runs-on: ubuntu-latest
45
+ steps:
46
+ - uses: actions/checkout@v3
47
+ - name: Set up Ruby ${{ matrix.ruby-version }}
48
+ uses: ruby/setup-ruby@v1
49
+ with:
50
+ ruby-version: ${{ matrix.ruby-version }}
51
+ bundler-cache: true # 'bundle install' and cache
52
+ - name: Run Rubocop
53
+ run: bundle exec rubocop
54
+
data/.gitlab-ci.yml CHANGED
@@ -1,31 +1,33 @@
1
1
  # Cache gems in between builds
2
2
 
3
+ services:
4
+ - redis:latest
5
+
3
6
  .test-template: &test
4
7
  cache:
5
8
  paths:
6
9
  - vendor/ruby
10
+ variables:
11
+ REDIS_URL: redis://redis:6379
12
+
7
13
  script:
8
- - bundle exec rspec spec
14
+ - bundle exec rspec spec
9
15
  before_script:
10
16
  - apt update && apt install -y libicu-dev
11
17
  - ruby -v # Print out ruby version for debugging
12
18
  # Uncomment next line if your rails app needs a JS runtime:
13
19
  # - apt-get update -q && apt-get install nodejs -yqq
14
- - gem install bundler --no-ri --no-rdoc # Bundler is not installed with the image
20
+ - gem install bundler --no-document # Bundler is not installed with the image
15
21
  - bundle install -j $(nproc) --path vendor # Install dependencies into ./vendor/ruby
16
22
 
17
- rspec-2.0:
18
- image: "ruby:2.0"
19
- <<: *test
20
-
21
- rspec-2.1:
22
- image: "ruby:2.1"
23
+ rspec-2.5:
24
+ image: "ruby:2.5"
23
25
  <<: *test
24
26
 
25
- rspec-2.2:
26
- image: "ruby:2.2"
27
+ rspec-2.6:
28
+ image: "ruby:2.6"
27
29
  <<: *test
28
30
 
29
- rspec-2.3:
30
- image: "ruby:2.3"
31
+ rspec-2.7:
32
+ image: "ruby:2.7"
31
33
  <<: *test
data/.rubocop.yml ADDED
@@ -0,0 +1,6 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ Style/HashSyntax:
4
+ Enabled: true
5
+ EnforcedStyle: ruby19_no_mixed_keys
6
+ EnforcedShorthandSyntax: either
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,497 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2023-03-15 01:41:21 UTC using RuboCop version 1.48.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: 5
10
+ # This cop supports safe autocorrection (--autocorrect).
11
+ # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
12
+ # Include: **/*.gemspec
13
+ Gemspec/OrderedDependencies:
14
+ Exclude:
15
+ - 'mail_room.gemspec'
16
+
17
+ # Offense count: 1
18
+ # Configuration parameters: Severity, Include.
19
+ # Include: **/*.gemspec
20
+ Gemspec/RequiredRubyVersion:
21
+ Exclude:
22
+ - 'mail_room.gemspec'
23
+
24
+ # Offense count: 5
25
+ # This cop supports safe autocorrection (--autocorrect).
26
+ Layout/BlockEndNewline:
27
+ Exclude:
28
+ - 'spec/lib/delivery/postback_spec.rb'
29
+ - 'spec/lib/delivery/que_spec.rb'
30
+
31
+ # Offense count: 5
32
+ # This cop supports safe autocorrection (--autocorrect).
33
+ # Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth.
34
+ # SupportedStyles: case, end
35
+ Layout/CaseIndentation:
36
+ Exclude:
37
+ - 'lib/mail_room/mailbox.rb'
38
+
39
+ # Offense count: 1
40
+ # This cop supports safe autocorrection (--autocorrect).
41
+ Layout/EmptyLineAfterMagicComment:
42
+ Exclude:
43
+ - 'mail_room.gemspec'
44
+
45
+ # Offense count: 2
46
+ # This cop supports safe autocorrection (--autocorrect).
47
+ # Configuration parameters: EnforcedStyle.
48
+ # SupportedStyles: around, only_before
49
+ Layout/EmptyLinesAroundAccessModifier:
50
+ Exclude:
51
+ - 'lib/mail_room/coordinator.rb'
52
+ - 'lib/mail_room/delivery/que.rb'
53
+
54
+ # Offense count: 4
55
+ # This cop supports safe autocorrection (--autocorrect).
56
+ # Configuration parameters: EnforcedStyle.
57
+ # SupportedStyles: empty_lines, no_empty_lines
58
+ Layout/EmptyLinesAroundBlockBody:
59
+ Exclude:
60
+ - 'spec/lib/crash_handler_spec.rb'
61
+ - 'spec/lib/delivery/sidekiq_spec.rb'
62
+ - 'spec/lib/logger/structured_spec.rb'
63
+
64
+ # Offense count: 1
65
+ # This cop supports safe autocorrection (--autocorrect).
66
+ # Configuration parameters: EnforcedStyle.
67
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
68
+ Layout/EmptyLinesAroundClassBody:
69
+ Exclude:
70
+ - 'lib/mail_room/logger/structured.rb'
71
+
72
+ # Offense count: 15
73
+ # This cop supports safe autocorrection (--autocorrect).
74
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
75
+ # SupportedStyles: special_inside_parentheses, consistent, align_braces
76
+ Layout/FirstHashElementIndentation:
77
+ Exclude:
78
+ - 'spec/lib/delivery/postback_spec.rb'
79
+ - 'spec/lib/delivery/que_spec.rb'
80
+ - 'spec/lib/logger/structured_spec.rb'
81
+
82
+ # Offense count: 5
83
+ # This cop supports safe autocorrection (--autocorrect).
84
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
85
+ # SupportedHashRocketStyles: key, separator, table
86
+ # SupportedColonStyles: key, separator, table
87
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
88
+ Layout/HashAlignment:
89
+ Exclude:
90
+ - 'lib/mail_room/delivery/sidekiq.rb'
91
+
92
+ # Offense count: 2
93
+ # This cop supports safe autocorrection (--autocorrect).
94
+ # Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
95
+ Layout/LeadingCommentSpace:
96
+ Exclude:
97
+ - 'lib/mail_room/mailbox.rb'
98
+ - 'spec/lib/arbitration/redis_spec.rb'
99
+
100
+ # Offense count: 5
101
+ # This cop supports safe autocorrection (--autocorrect).
102
+ Layout/MultilineBlockLayout:
103
+ Exclude:
104
+ - 'spec/lib/delivery/postback_spec.rb'
105
+ - 'spec/lib/delivery/que_spec.rb'
106
+
107
+ # Offense count: 3
108
+ # This cop supports safe autocorrection (--autocorrect).
109
+ # Configuration parameters: EnforcedStyle.
110
+ # SupportedStyles: space, no_space
111
+ Layout/SpaceAroundEqualsInParameterDefault:
112
+ Exclude:
113
+ - 'lib/mail_room/configuration.rb'
114
+ - 'lib/mail_room/crash_handler.rb'
115
+ - 'lib/mail_room/mailbox.rb'
116
+
117
+ # Offense count: 2
118
+ # This cop supports safe autocorrection (--autocorrect).
119
+ Layout/SpaceAroundKeyword:
120
+ Exclude:
121
+ - 'lib/mail_room/coordinator.rb'
122
+ - 'lib/mail_room/mailbox_watcher.rb'
123
+
124
+ # Offense count: 2
125
+ # This cop supports safe autocorrection (--autocorrect).
126
+ # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
127
+ # SupportedStylesForExponentOperator: space, no_space
128
+ Layout/SpaceAroundOperators:
129
+ Exclude:
130
+ - 'lib/mail_room/mailbox.rb'
131
+ - 'spec/lib/arbitration/redis_spec.rb'
132
+
133
+ # Offense count: 7
134
+ # This cop supports safe autocorrection (--autocorrect).
135
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
136
+ # SupportedStyles: space, no_space
137
+ # SupportedStylesForEmptyBraces: space, no_space
138
+ Layout/SpaceBeforeBlockBraces:
139
+ Exclude:
140
+ - 'mail_room.gemspec'
141
+ - 'spec/lib/crash_handler_spec.rb'
142
+ - 'spec/lib/mailbox_spec.rb'
143
+
144
+ # Offense count: 51
145
+ # This cop supports safe autocorrection (--autocorrect).
146
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
147
+ # SupportedStyles: space, no_space
148
+ # SupportedStylesForEmptyBraces: space, no_space
149
+ Layout/SpaceInsideBlockBraces:
150
+ Exclude:
151
+ - 'lib/mail_room/coordinator.rb'
152
+ - 'spec/lib/cli_spec.rb'
153
+ - 'spec/lib/configuration_spec.rb'
154
+ - 'spec/lib/delivery/letter_opener_spec.rb'
155
+ - 'spec/lib/delivery/logger_spec.rb'
156
+ - 'spec/lib/delivery/postback_spec.rb'
157
+ - 'spec/lib/delivery/que_spec.rb'
158
+ - 'spec/lib/imap/connection_spec.rb'
159
+ - 'spec/lib/mailbox_watcher_spec.rb'
160
+
161
+ # Offense count: 32
162
+ # This cop supports safe autocorrection (--autocorrect).
163
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
164
+ # SupportedStyles: space, no_space, compact
165
+ # SupportedStylesForEmptyBraces: space, no_space
166
+ Layout/SpaceInsideHashLiteralBraces:
167
+ Exclude:
168
+ - 'lib/mail_room/mailbox.rb'
169
+ - 'spec/lib/cli_spec.rb'
170
+ - 'spec/lib/mailbox_spec.rb'
171
+
172
+ # Offense count: 1
173
+ # This cop supports safe autocorrection (--autocorrect).
174
+ # Configuration parameters: EnforcedStyle.
175
+ # SupportedStyles: space, compact, no_space
176
+ Layout/SpaceInsideParens:
177
+ Exclude:
178
+ - 'spec/lib/logger/structured_spec.rb'
179
+
180
+ # Offense count: 1
181
+ # This cop supports safe autocorrection (--autocorrect).
182
+ # Configuration parameters: EnforcedStyle.
183
+ # SupportedStyles: final_newline, final_blank_line
184
+ Layout/TrailingEmptyLines:
185
+ Exclude:
186
+ - 'spec/lib/delivery/letter_opener_spec.rb'
187
+
188
+ # Offense count: 4
189
+ # This cop supports safe autocorrection (--autocorrect).
190
+ # Configuration parameters: AllowInHeredoc.
191
+ Layout/TrailingWhitespace:
192
+ Exclude:
193
+ - 'lib/mail_room/coordinator.rb'
194
+ - 'lib/mail_room/imap.rb'
195
+ - 'spec/lib/coordinator_spec.rb'
196
+
197
+ # Offense count: 5
198
+ # Configuration parameters: AllowedMethods.
199
+ # AllowedMethods: enums
200
+ Lint/ConstantDefinitionInBlock:
201
+ Exclude:
202
+ - 'lib/mail_room/mailbox.rb'
203
+
204
+ # Offense count: 1
205
+ Lint/RescueException:
206
+ Exclude:
207
+ - 'lib/mail_room/cli.rb'
208
+
209
+ # Offense count: 1
210
+ # This cop supports safe autocorrection (--autocorrect).
211
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
212
+ Lint/UnusedMethodArgument:
213
+ Exclude:
214
+ - 'lib/mail_room/logger/structured.rb'
215
+
216
+ # Offense count: 5
217
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
218
+ Metrics/AbcSize:
219
+ Max: 27
220
+
221
+ # Offense count: 32
222
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
223
+ # AllowedMethods: refine
224
+ Metrics/BlockLength:
225
+ Max: 198
226
+
227
+ # Offense count: 3
228
+ # Configuration parameters: CountComments, CountAsOne.
229
+ Metrics/ClassLength:
230
+ Max: 169
231
+
232
+ # Offense count: 1
233
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
234
+ Metrics/CyclomaticComplexity:
235
+ Max: 8
236
+
237
+ # Offense count: 13
238
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
239
+ Metrics/MethodLength:
240
+ Max: 22
241
+
242
+ # Offense count: 1
243
+ # Configuration parameters: CountComments, CountAsOne.
244
+ Metrics/ModuleLength:
245
+ Max: 172
246
+
247
+ # Offense count: 1
248
+ Naming/AccessorMethodName:
249
+ Exclude:
250
+ - 'lib/mail_room/configuration.rb'
251
+
252
+ # Offense count: 1
253
+ # This cop supports unsafe autocorrection (--autocorrect-all).
254
+ Security/YAMLLoad:
255
+ Exclude:
256
+ - 'lib/mail_room/configuration.rb'
257
+
258
+ # Offense count: 1
259
+ # This cop supports safe autocorrection (--autocorrect).
260
+ # Configuration parameters: EnforcedStyle.
261
+ # SupportedStyles: prefer_alias, prefer_alias_method
262
+ Style/Alias:
263
+ Exclude:
264
+ - 'lib/mail_room/coordinator.rb'
265
+
266
+ # Offense count: 16
267
+ # This cop supports safe autocorrection (--autocorrect).
268
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
269
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
270
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
271
+ # FunctionalMethods: let, let!, subject, watch
272
+ # AllowedMethods: lambda, proc, it
273
+ Style/BlockDelimiters:
274
+ Exclude:
275
+ - 'spec/lib/arbitration/redis_spec.rb'
276
+ - 'spec/lib/delivery/postback_spec.rb'
277
+ - 'spec/lib/delivery/que_spec.rb'
278
+ - 'spec/lib/delivery/sidekiq_spec.rb'
279
+
280
+ # Offense count: 14
281
+ # Configuration parameters: AllowedConstants.
282
+ Style/Documentation:
283
+ Exclude:
284
+ - 'spec/**/*'
285
+ - 'test/**/*'
286
+ - 'lib/mail_room.rb'
287
+ - 'lib/mail_room/arbitration.rb'
288
+ - 'lib/mail_room/arbitration/noop.rb'
289
+ - 'lib/mail_room/arbitration/redis.rb'
290
+ - 'lib/mail_room/connection.rb'
291
+ - 'lib/mail_room/crash_handler.rb'
292
+ - 'lib/mail_room/delivery.rb'
293
+ - 'lib/mail_room/imap.rb'
294
+ - 'lib/mail_room/imap/connection.rb'
295
+ - 'lib/mail_room/imap/message.rb'
296
+ - 'lib/mail_room/logger/structured.rb'
297
+ - 'lib/mail_room/message.rb'
298
+ - 'lib/mail_room/microsoft_graph.rb'
299
+ - 'lib/mail_room/microsoft_graph/connection.rb'
300
+
301
+ # Offense count: 2
302
+ # This cop supports safe autocorrection (--autocorrect).
303
+ # Configuration parameters: EnforcedStyle.
304
+ # SupportedStyles: compact, expanded
305
+ Style/EmptyMethod:
306
+ Exclude:
307
+ - 'lib/mail_room/arbitration/noop.rb'
308
+ - 'lib/mail_room/delivery/noop.rb'
309
+
310
+ # Offense count: 1
311
+ # This cop supports safe autocorrection (--autocorrect).
312
+ Style/Encoding:
313
+ Exclude:
314
+ - 'mail_room.gemspec'
315
+
316
+ # Offense count: 2
317
+ # This cop supports safe autocorrection (--autocorrect).
318
+ Style/ExpandPathArguments:
319
+ Exclude:
320
+ - 'mail_room.gemspec'
321
+ - 'spec/spec_helper.rb'
322
+
323
+ # Offense count: 39
324
+ # This cop supports unsafe autocorrection (--autocorrect-all).
325
+ # Configuration parameters: EnforcedStyle.
326
+ # SupportedStyles: always, always_true, never
327
+ Style/FrozenStringLiteralComment:
328
+ Enabled: false
329
+
330
+ # Offense count: 5
331
+ # This cop supports unsafe autocorrection (--autocorrect-all).
332
+ Style/GlobalStdStream:
333
+ Exclude:
334
+ - 'lib/mail_room/crash_handler.rb'
335
+ - 'lib/mail_room/delivery/logger.rb'
336
+ - 'lib/mail_room/mailbox.rb'
337
+ - 'spec/lib/delivery/logger_spec.rb'
338
+
339
+ # Offense count: 3
340
+ # This cop supports safe autocorrection (--autocorrect).
341
+ # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
342
+ Style/GuardClause:
343
+ Exclude:
344
+ - 'lib/mail_room/configuration.rb'
345
+ - 'lib/mail_room/imap/connection.rb'
346
+ - 'lib/mail_room/mailbox_watcher.rb'
347
+
348
+ # Offense count: 1
349
+ # This cop supports safe autocorrection (--autocorrect).
350
+ # Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
351
+ # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
352
+ # SupportedShorthandSyntax: always, never, either, consistent
353
+ Style/HashSyntax:
354
+ Exclude:
355
+ - 'spec/lib/microsoft_graph/connection_spec.rb'
356
+
357
+ # Offense count: 1
358
+ # This cop supports safe autocorrection (--autocorrect).
359
+ Style/IfUnlessModifier:
360
+ Exclude:
361
+ - 'lib/mail_room/mailbox_watcher.rb'
362
+
363
+ # Offense count: 5
364
+ # This cop supports unsafe autocorrection (--autocorrect-all).
365
+ # Configuration parameters: EnforcedStyle.
366
+ # SupportedStyles: literals, strict
367
+ Style/MutableConstant:
368
+ Exclude:
369
+ - 'lib/mail_room/crash_handler.rb'
370
+ - 'lib/mail_room/mailbox.rb'
371
+ - 'lib/mail_room/version.rb'
372
+ - 'spec/spec_helper.rb'
373
+
374
+ # Offense count: 1
375
+ # This cop supports unsafe autocorrection (--autocorrect-all).
376
+ # Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
377
+ # SupportedStyles: predicate, comparison
378
+ Style/NumericPredicate:
379
+ Exclude:
380
+ - 'spec/**/*'
381
+ - 'lib/mail_room/imap/connection.rb'
382
+
383
+ # Offense count: 2
384
+ # This cop supports unsafe autocorrection (--autocorrect-all).
385
+ # Configuration parameters: EnforcedStyle.
386
+ # SupportedStyles: short, verbose
387
+ Style/PreferredHashMethods:
388
+ Exclude:
389
+ - 'lib/mail_room/configuration.rb'
390
+ - 'lib/mail_room/mailbox.rb'
391
+
392
+ # Offense count: 1
393
+ # This cop supports safe autocorrection (--autocorrect).
394
+ # Configuration parameters: EnforcedStyle, AllowedCompactTypes.
395
+ # SupportedStyles: compact, exploded
396
+ Style/RaiseArgs:
397
+ Exclude:
398
+ - 'lib/mail_room/logger/structured.rb'
399
+
400
+ # Offense count: 2
401
+ # This cop supports safe autocorrection (--autocorrect).
402
+ Style/RedundantPercentQ:
403
+ Exclude:
404
+ - 'mail_room.gemspec'
405
+
406
+ # Offense count: 7
407
+ # This cop supports safe autocorrection (--autocorrect).
408
+ Style/RedundantSelf:
409
+ Exclude:
410
+ - 'lib/mail_room/configuration.rb'
411
+ - 'lib/mail_room/coordinator.rb'
412
+ - 'lib/mail_room/mailbox.rb'
413
+ - 'lib/mail_room/mailbox_watcher.rb'
414
+
415
+ # Offense count: 1
416
+ # This cop supports safe autocorrection (--autocorrect).
417
+ # Configuration parameters: EnforcedStyle.
418
+ # SupportedStyles: implicit, explicit
419
+ Style/RescueStandardError:
420
+ Exclude:
421
+ - 'lib/mail_room/configuration.rb'
422
+
423
+ # Offense count: 1
424
+ # This cop supports unsafe autocorrection (--autocorrect-all).
425
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
426
+ # AllowedMethods: present?, blank?, presence, try, try!
427
+ Style/SafeNavigation:
428
+ Exclude:
429
+ - 'lib/mail_room/mailbox_watcher.rb'
430
+
431
+ # Offense count: 1
432
+ # This cop supports unsafe autocorrection (--autocorrect-all).
433
+ # Configuration parameters: RequireEnglish, EnforcedStyle.
434
+ # SupportedStyles: use_perl_names, use_english_names, use_builtin_english_names
435
+ Style/SpecialGlobalVars:
436
+ Exclude:
437
+ - 'mail_room.gemspec'
438
+
439
+ # Offense count: 1
440
+ # This cop supports unsafe autocorrection (--autocorrect-all).
441
+ # Configuration parameters: Mode.
442
+ Style/StringConcatenation:
443
+ Exclude:
444
+ - 'lib/mail_room/logger/structured.rb'
445
+
446
+ # Offense count: 142
447
+ # This cop supports safe autocorrection (--autocorrect).
448
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
449
+ # SupportedStyles: single_quotes, double_quotes
450
+ Style/StringLiterals:
451
+ Enabled: false
452
+
453
+ # Offense count: 4
454
+ # This cop supports safe autocorrection (--autocorrect).
455
+ # Configuration parameters: EnforcedStyle, MinSize.
456
+ # SupportedStyles: percent, brackets
457
+ Style/SymbolArray:
458
+ Exclude:
459
+ - 'lib/mail_room/mailbox.rb'
460
+ - 'spec/lib/logger/structured_spec.rb'
461
+
462
+ # Offense count: 2
463
+ # This cop supports safe autocorrection (--autocorrect).
464
+ # Configuration parameters: EnforcedStyleForMultiline.
465
+ # SupportedStylesForMultiline: comma, consistent_comma, no_comma
466
+ Style/TrailingCommaInHashLiteral:
467
+ Exclude:
468
+ - 'spec/lib/mailbox_spec.rb'
469
+ - 'spec/spec_helper.rb'
470
+
471
+ # Offense count: 1
472
+ # This cop supports safe autocorrection (--autocorrect).
473
+ Style/WhileUntilDo:
474
+ Exclude:
475
+ - 'lib/mail_room/mailbox_watcher.rb'
476
+
477
+ # Offense count: 2
478
+ # This cop supports safe autocorrection (--autocorrect).
479
+ Style/WhileUntilModifier:
480
+ Exclude:
481
+ - 'lib/mail_room/coordinator.rb'
482
+ - 'lib/mail_room/mailbox_watcher.rb'
483
+
484
+ # Offense count: 3
485
+ # This cop supports safe autocorrection (--autocorrect).
486
+ # Configuration parameters: WordRegex.
487
+ # SupportedStyles: percent, brackets
488
+ Style/WordArray:
489
+ EnforcedStyle: percent
490
+ MinSize: 3
491
+
492
+ # Offense count: 7
493
+ # This cop supports safe autocorrection (--autocorrect).
494
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
495
+ # URISchemes: http, https
496
+ Layout/LineLength:
497
+ Max: 177
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6
1
+ 3.2
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 3.2.2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## mail_room 0.11.0 ##
2
+
3
+ https://github.com/tpitale/mail_room/compare/v0.10.1...v0.11.0
4
+
5
+ ## mail_room 0.10.1 ##
6
+
7
+ * Fix db attribute on redis URL PR#130 - @jarkaK
8
+
1
9
  ## mail_room 0.10.0 ##
2
10
 
3
11
  * Remove imap backports