gitlab-mail_room 0.0.9 → 0.0.23

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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/.gitlab/issue_templates/Default.md +9 -0
  3. data/.gitlab/issue_templates/Release.md +1 -0
  4. data/.gitlab-ci.yml +14 -24
  5. data/.rubocop.yml +5 -0
  6. data/.rubocop_todo.yml +494 -0
  7. data/.ruby-version +1 -1
  8. data/.travis.yml +12 -5
  9. data/CHANGELOG.md +4 -0
  10. data/CONTRIBUTING.md +40 -0
  11. data/README.md +125 -14
  12. data/Rakefile +1 -1
  13. data/lib/mail_room/arbitration/redis.rb +1 -1
  14. data/lib/mail_room/connection.rb +6 -1
  15. data/lib/mail_room/crash_handler.rb +2 -1
  16. data/lib/mail_room/delivery/letter_opener.rb +1 -1
  17. data/lib/mail_room/delivery/postback.rb +42 -6
  18. data/lib/mail_room/delivery/que.rb +15 -1
  19. data/lib/mail_room/delivery/sidekiq.rb +4 -3
  20. data/lib/mail_room/jwt.rb +39 -0
  21. data/lib/mail_room/logger/structured.rb +15 -1
  22. data/lib/mail_room/mailbox.rb +56 -17
  23. data/lib/mail_room/mailbox_watcher.rb +7 -1
  24. data/lib/mail_room/microsoft_graph/connection.rb +243 -0
  25. data/lib/mail_room/microsoft_graph.rb +7 -0
  26. data/lib/mail_room/version.rb +1 -1
  27. data/mail_room.gemspec +7 -1
  28. data/spec/fixtures/jwt_secret +1 -0
  29. data/spec/lib/arbitration/redis_spec.rb +6 -5
  30. data/spec/lib/cli_spec.rb +3 -3
  31. data/spec/lib/configuration_spec.rb +1 -1
  32. data/spec/lib/delivery/letter_opener_spec.rb +4 -3
  33. data/spec/lib/delivery/logger_spec.rb +3 -2
  34. data/spec/lib/delivery/postback_spec.rb +62 -14
  35. data/spec/lib/delivery/sidekiq_spec.rb +33 -11
  36. data/spec/lib/jwt_spec.rb +80 -0
  37. data/spec/lib/logger/structured_spec.rb +34 -2
  38. data/spec/lib/mailbox_spec.rb +65 -17
  39. data/spec/lib/mailbox_watcher_spec.rb +54 -38
  40. data/spec/lib/microsoft_graph/connection_spec.rb +252 -0
  41. data/spec/spec_helper.rb +14 -3
  42. metadata +97 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 046d032389d041dfea1d880c47ff567ad6ccd97439ba05db04f49fe8f6fd8596
4
- data.tar.gz: c1eda45ae5d2cbab863eabb843adfb89694ea563f73101bbf268fba18c25d175
3
+ metadata.gz: 1fa8e5569da85c3fa57acd7d2729af8f67429f281f13cc87fdbfdd8d533f3ee9
4
+ data.tar.gz: 50d4dccc94549ff477922d7318115e1992a87566e6d159d50f046015cf875e10
5
5
  SHA512:
6
- metadata.gz: 58986de036f80e17d25440c25d4d6bbdb54a0340f865b455847f7a7bf4d2206ae4fefccb91edbb3b56990cf468505501ad1fa30f5223f589483a1e291a59c49a
7
- data.tar.gz: a085cd90036662bf26516bd5574a64d921cfff6b0728ec3350cac8eba80f75faef08dc0a69bf4909adb6e31a1f62ff9e4f2d62560eff5226e493af777eaa5810
6
+ metadata.gz: 2e4d8fe88a968459036de06624cd917b3e68a6f4bf5a5cd1bcbb9e0d466dcff8608cead170a8e813f45bcccc2b5c342d603732b9520314d8792c23e4523d91ff
7
+ data.tar.gz: 5de2450bbd78041a19c4996ebaa74b2497af0e7362c4e6e5338ccc10a740bc4cc13a508bd3cc7cea55a7eabd7da25365b544d7baa0e33dd134c40b0bd1a0f577
@@ -0,0 +1,9 @@
1
+ Please read me!
2
+
3
+ This repository supports our packaged release of `mail_room` that ships with GitLab. We strive to diverge as little as possible from the canonical upstream at https://www.github.com/tpitale/mail_room. If we do diverge, our patches are sent upstream for review and we carry them here to support the GitLab application.
4
+
5
+ You can raise an issue here if you're having an issue *specifically in the context of a GitLab installation*.
6
+
7
+ Otherwise, please direct any issues upstream to https://www.github.com/tpitale/mail_room.
8
+
9
+ Thank you for contributing!
@@ -3,5 +3,6 @@
3
3
  - [ ] create tag in https://gitlab.com/gitlab-org/gitlab-mail_room/
4
4
  - [ ] publish gem from this tag to rubygems.org
5
5
  - [ ] update https://gitlab.com/gitlab-org/gitlab/-/blob/master/Gemfile to use the new gem version
6
+ - [ ] update https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/master/config/software/mail_room.rb to use the new gem version
6
7
  - [ ] update gitlab-org/build/CNG to build container images from the new gem (example: https://gitlab.com/gitlab-org/build/CNG/-/merge_requests/451/diffs)
7
8
  - [ ] to deploy the new version to gitlab.com, update gitlab-com/gl-infra/k8s-workloads/gitlab-com to pin the new mailroom container image version and assign it the [release managers](https://about.gitlab.com/community/release-managers/) (example: https://gitlab.com/gitlab-com/gl-infra/k8s-workloads/gitlab-com/-/merge_requests/236/diffs)
data/.gitlab-ci.yml CHANGED
@@ -1,40 +1,30 @@
1
- # Cache gems in between builds
1
+ default:
2
+ image: "ruby:${RUBY_VERSION}"
2
3
 
3
4
  services:
4
5
  - redis:latest
5
6
 
6
7
  .test-template: &test
7
8
  cache:
9
+ key: ruby-$RUBY_VERSION
8
10
  paths:
9
11
  - vendor/ruby
10
12
  variables:
11
13
  REDIS_URL: redis://redis:6379
12
- script:
13
- - bundle exec rspec spec
14
14
  before_script:
15
15
  - apt update && apt install -y libicu-dev
16
16
  - ruby -v # Print out ruby version for debugging
17
- # Uncomment next line if your rails app needs a JS runtime:
18
- # - apt-get update -q && apt-get install nodejs -yqq
19
- - gem install bundler --no-document # Bundler is not installed with the image
20
- - bundle install -j $(nproc) --path vendor # Install dependencies into ./vendor/ruby
21
-
22
- rspec-2.4:
23
- image: "ruby:2.4"
24
- <<: *test
25
-
26
- rspec-2.5:
27
- image: "ruby:2.5"
28
- <<: *test
29
-
30
- rspec-2.6:
31
- image: "ruby:2.6"
32
- <<: *test
17
+ - gem install bundler --no-document # Bundler is not installed with the image
18
+ - bundle config set --local path 'vendor'
19
+ - bundle install -j $(nproc)
20
+ script:
21
+ - bundle exec rspec spec
33
22
 
34
- rspec-2.7:
35
- image: "ruby:2.7"
23
+ rspec:
24
+ parallel:
25
+ matrix:
26
+ - RUBY_VERSION: [ "2.6", "2.7", "3.0", "3.1", "3.2" ]
36
27
  <<: *test
37
28
 
38
- rspec-3.0:
39
- image: "ruby:3.0"
40
- <<: *test
29
+ include:
30
+ - template: Security/Dependency-Scanning.gitlab-ci.yml
data/.rubocop.yml ADDED
@@ -0,0 +1,5 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ Style/HashSyntax:
4
+ Enabled: true
5
+ EnforcedStyle: ruby19_no_mixed_keys
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,494 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2022-03-15 06:29:40 UTC using RuboCop version 1.26.0.
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 auto-correction (--auto-correct).
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: Include.
19
+ # Include: **/*.gemspec
20
+ Gemspec/RequiredRubyVersion:
21
+ Exclude:
22
+ - 'mail_room.gemspec'
23
+
24
+ # Offense count: 5
25
+ # This cop supports safe auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
41
+ Layout/EmptyLineAfterMagicComment:
42
+ Exclude:
43
+ - 'mail_room.gemspec'
44
+
45
+ # Offense count: 2
46
+ # This cop supports safe auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
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: IgnoredMethods, CountRepeatedAttributes.
218
+ Metrics/AbcSize:
219
+ Max: 27
220
+
221
+ # Offense count: 32
222
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
223
+ # IgnoredMethods: 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: IgnoredMethods.
234
+ Metrics/CyclomaticComplexity:
235
+ Max: 8
236
+
237
+ # Offense count: 13
238
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
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 safe auto-correction (--auto-correct).
254
+ Security/YAMLLoad:
255
+ Exclude:
256
+ - 'lib/mail_room/configuration.rb'
257
+
258
+ # Offense count: 1
259
+ # This cop supports safe auto-correction (--auto-correct).
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 auto-correction (--auto-correct).
268
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, 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
+ # IgnoredMethods: 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: 12
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/connection.rb'
294
+ - 'lib/mail_room/imap/message.rb'
295
+ - 'lib/mail_room/logger/structured.rb'
296
+ - 'lib/mail_room/message.rb'
297
+ - 'lib/mail_room/microsoft_graph/connection.rb'
298
+
299
+ # Offense count: 2
300
+ # This cop supports safe auto-correction (--auto-correct).
301
+ # Configuration parameters: EnforcedStyle.
302
+ # SupportedStyles: compact, expanded
303
+ Style/EmptyMethod:
304
+ Exclude:
305
+ - 'lib/mail_room/arbitration/noop.rb'
306
+ - 'lib/mail_room/delivery/noop.rb'
307
+
308
+ # Offense count: 1
309
+ # This cop supports safe auto-correction (--auto-correct).
310
+ Style/Encoding:
311
+ Exclude:
312
+ - 'mail_room.gemspec'
313
+
314
+ # Offense count: 2
315
+ # This cop supports safe auto-correction (--auto-correct).
316
+ Style/ExpandPathArguments:
317
+ Exclude:
318
+ - 'mail_room.gemspec'
319
+ - 'spec/spec_helper.rb'
320
+
321
+ # Offense count: 39
322
+ # This cop supports safe auto-correction (--auto-correct).
323
+ # Configuration parameters: EnforcedStyle.
324
+ # SupportedStyles: always, always_true, never
325
+ Style/FrozenStringLiteralComment:
326
+ Enabled: false
327
+
328
+ # Offense count: 5
329
+ # This cop supports safe auto-correction (--auto-correct).
330
+ Style/GlobalStdStream:
331
+ Exclude:
332
+ - 'lib/mail_room/crash_handler.rb'
333
+ - 'lib/mail_room/delivery/logger.rb'
334
+ - 'lib/mail_room/mailbox.rb'
335
+ - 'spec/lib/delivery/logger_spec.rb'
336
+
337
+ # Offense count: 3
338
+ # Configuration parameters: MinBodyLength.
339
+ Style/GuardClause:
340
+ Exclude:
341
+ - 'lib/mail_room/configuration.rb'
342
+ - 'lib/mail_room/imap/connection.rb'
343
+ - 'lib/mail_room/mailbox_watcher.rb'
344
+
345
+ # Offense count: 1
346
+ # This cop supports safe auto-correction (--auto-correct).
347
+ # Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
348
+ # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
349
+ # SupportedShorthandSyntax: always, never, either
350
+ Style/HashSyntax:
351
+ Exclude:
352
+ - 'spec/lib/microsoft_graph/connection_spec.rb'
353
+
354
+ # Offense count: 1
355
+ # This cop supports safe auto-correction (--auto-correct).
356
+ Style/IfUnlessModifier:
357
+ Exclude:
358
+ - 'lib/mail_room/mailbox_watcher.rb'
359
+
360
+ # Offense count: 5
361
+ # This cop supports safe auto-correction (--auto-correct).
362
+ # Configuration parameters: EnforcedStyle.
363
+ # SupportedStyles: literals, strict
364
+ Style/MutableConstant:
365
+ Exclude:
366
+ - 'lib/mail_room/crash_handler.rb'
367
+ - 'lib/mail_room/mailbox.rb'
368
+ - 'lib/mail_room/version.rb'
369
+ - 'spec/spec_helper.rb'
370
+
371
+ # Offense count: 1
372
+ # This cop supports unsafe auto-correction (--auto-correct-all).
373
+ # Configuration parameters: EnforcedStyle, IgnoredMethods.
374
+ # SupportedStyles: predicate, comparison
375
+ Style/NumericPredicate:
376
+ Exclude:
377
+ - 'spec/**/*'
378
+ - 'lib/mail_room/imap/connection.rb'
379
+
380
+ # Offense count: 2
381
+ # This cop supports unsafe auto-correction (--auto-correct-all).
382
+ # Configuration parameters: EnforcedStyle.
383
+ # SupportedStyles: short, verbose
384
+ Style/PreferredHashMethods:
385
+ Exclude:
386
+ - 'lib/mail_room/configuration.rb'
387
+ - 'lib/mail_room/mailbox.rb'
388
+
389
+ # Offense count: 1
390
+ # This cop supports safe auto-correction (--auto-correct).
391
+ # Configuration parameters: EnforcedStyle, AllowedCompactTypes.
392
+ # SupportedStyles: compact, exploded
393
+ Style/RaiseArgs:
394
+ Exclude:
395
+ - 'lib/mail_room/logger/structured.rb'
396
+
397
+ # Offense count: 2
398
+ # This cop supports safe auto-correction (--auto-correct).
399
+ Style/RedundantPercentQ:
400
+ Exclude:
401
+ - 'mail_room.gemspec'
402
+
403
+ # Offense count: 7
404
+ # This cop supports safe auto-correction (--auto-correct).
405
+ Style/RedundantSelf:
406
+ Exclude:
407
+ - 'lib/mail_room/configuration.rb'
408
+ - 'lib/mail_room/coordinator.rb'
409
+ - 'lib/mail_room/mailbox.rb'
410
+ - 'lib/mail_room/mailbox_watcher.rb'
411
+
412
+ # Offense count: 1
413
+ # This cop supports safe auto-correction (--auto-correct).
414
+ # Configuration parameters: EnforcedStyle.
415
+ # SupportedStyles: implicit, explicit
416
+ Style/RescueStandardError:
417
+ Exclude:
418
+ - 'lib/mail_room/configuration.rb'
419
+
420
+ # Offense count: 1
421
+ # This cop supports safe auto-correction (--auto-correct).
422
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
423
+ # AllowedMethods: present?, blank?, presence, try, try!
424
+ Style/SafeNavigation:
425
+ Exclude:
426
+ - 'lib/mail_room/mailbox_watcher.rb'
427
+
428
+ # Offense count: 1
429
+ # This cop supports safe auto-correction (--auto-correct).
430
+ # Configuration parameters: RequireEnglish, EnforcedStyle.
431
+ # SupportedStyles: use_perl_names, use_english_names
432
+ Style/SpecialGlobalVars:
433
+ Exclude:
434
+ - 'mail_room.gemspec'
435
+
436
+ # Offense count: 1
437
+ # This cop supports unsafe auto-correction (--auto-correct-all).
438
+ # Configuration parameters: Mode.
439
+ Style/StringConcatenation:
440
+ Exclude:
441
+ - 'lib/mail_room/logger/structured.rb'
442
+
443
+ # Offense count: 140
444
+ # This cop supports safe auto-correction (--auto-correct).
445
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
446
+ # SupportedStyles: single_quotes, double_quotes
447
+ Style/StringLiterals:
448
+ Enabled: false
449
+
450
+ # Offense count: 4
451
+ # This cop supports safe auto-correction (--auto-correct).
452
+ # Configuration parameters: EnforcedStyle, MinSize.
453
+ # SupportedStyles: percent, brackets
454
+ Style/SymbolArray:
455
+ Exclude:
456
+ - 'lib/mail_room/mailbox.rb'
457
+ - 'spec/lib/logger/structured_spec.rb'
458
+
459
+ # Offense count: 2
460
+ # This cop supports safe auto-correction (--auto-correct).
461
+ # Configuration parameters: EnforcedStyleForMultiline.
462
+ # SupportedStylesForMultiline: comma, consistent_comma, no_comma
463
+ Style/TrailingCommaInHashLiteral:
464
+ Exclude:
465
+ - 'spec/lib/mailbox_spec.rb'
466
+ - 'spec/spec_helper.rb'
467
+
468
+ # Offense count: 1
469
+ # This cop supports safe auto-correction (--auto-correct).
470
+ Style/WhileUntilDo:
471
+ Exclude:
472
+ - 'lib/mail_room/mailbox_watcher.rb'
473
+
474
+ # Offense count: 2
475
+ # This cop supports safe auto-correction (--auto-correct).
476
+ Style/WhileUntilModifier:
477
+ Exclude:
478
+ - 'lib/mail_room/coordinator.rb'
479
+ - 'lib/mail_room/mailbox_watcher.rb'
480
+
481
+ # Offense count: 3
482
+ # This cop supports safe auto-correction (--auto-correct).
483
+ # Configuration parameters: WordRegex.
484
+ # SupportedStyles: percent, brackets
485
+ Style/WordArray:
486
+ EnforcedStyle: percent
487
+ MinSize: 3
488
+
489
+ # Offense count: 7
490
+ # This cop supports safe auto-correction (--auto-correct).
491
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
492
+ # URISchemes: http, https
493
+ Layout/LineLength:
494
+ Max: 177
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.2
1
+ 2.7.5
data/.travis.yml CHANGED
@@ -1,10 +1,17 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.0
4
- - 2.4
5
3
  - 2.5
6
4
  - 2.6
5
+ - 2.7
6
+ - 3.0
7
+ - truffleruby
7
8
  services:
8
- - redis-server
9
- script: bundle exec rspec spec
10
- sudo: false
9
+ - redis
10
+ script:
11
+ - bundle exec rspec spec
12
+
13
+ jobs:
14
+ - language: ruby
15
+ rvm: 2.7
16
+ script:
17
+ - bundle exec rubocop
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## mail_room 0.10.1 ##
2
+
3
+ * Fix db attribute on redis URL PR#130 - @jarkaK
4
+
1
5
  ## mail_room 0.10.0 ##
2
6
 
3
7
  * Remove imap backports
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,40 @@
1
+ ## Developer Certificate of Origin and License
2
+
3
+ By contributing to GitLab B.V., you accept and agree to the following terms and
4
+ conditions for your present and future contributions submitted to GitLab B.V.
5
+ Except for the license granted herein to GitLab B.V. and recipients of software
6
+ distributed by GitLab B.V., you reserve all right, title, and interest in and to
7
+ your Contributions.
8
+
9
+ All contributions are subject to the Developer Certificate of Origin and license set out at [docs.gitlab.com/ce/legal/developer_certificate_of_origin](https://docs.gitlab.com/ce/legal/developer_certificate_of_origin).
10
+
11
+ _This notice should stay as the first item in the CONTRIBUTING.md file._
12
+
13
+ ## Code of conduct
14
+
15
+ As contributors and maintainers of this project, we pledge to respect all people
16
+ who contribute through reporting issues, posting feature requests, updating
17
+ documentation, submitting pull requests or patches, and other activities.
18
+
19
+ We are committed to making participation in this project a harassment-free
20
+ experience for everyone, regardless of level of experience, gender, gender
21
+ identity and expression, sexual orientation, disability, personal appearance,
22
+ body size, race, ethnicity, age, or religion.
23
+
24
+ Examples of unacceptable behavior by participants include the use of sexual
25
+ language or imagery, derogatory comments or personal attacks, trolling, public
26
+ or private harassment, insults, or other unprofessional conduct.
27
+
28
+ Project maintainers have the right and responsibility to remove, edit, or reject
29
+ comments, commits, code, wiki edits, issues, and other contributions that are
30
+ not aligned to this Code of Conduct. Project maintainers who do not follow the
31
+ Code of Conduct may be removed from the project team.
32
+
33
+ This code of conduct applies both within project spaces and in public spaces
34
+ when an individual is representing the project or its community.
35
+
36
+ Instances of abusive, harassing, or otherwise unacceptable behavior can be
37
+ reported by emailing contact@gitlab.com.
38
+
39
+ This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org), version 1.1.0,
40
+ available at [https://contributor-covenant.org/version/1/1/0/](https://contributor-covenant.org/version/1/1/0/).