gitlab-mail_room 0.0.4 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab/issue_templates/Default.md +9 -0
- data/.gitlab/issue_templates/Release.md +8 -0
- data/.gitlab-ci.yml +18 -16
- data/.rubocop.yml +5 -0
- data/.rubocop_todo.yml +494 -0
- data/.ruby-version +1 -1
- data/.travis.yml +12 -5
- data/CHANGELOG.md +4 -0
- data/CONTRIBUTING.md +40 -0
- data/README.md +136 -10
- data/Rakefile +1 -1
- data/lib/mail_room/arbitration/redis.rb +1 -1
- data/lib/mail_room/cli.rb +2 -2
- data/lib/mail_room/configuration.rb +11 -1
- data/lib/mail_room/connection.rb +10 -177
- data/lib/mail_room/coordinator.rb +8 -4
- data/lib/mail_room/crash_handler.rb +8 -12
- data/lib/mail_room/delivery/letter_opener.rb +1 -1
- data/lib/mail_room/delivery/postback.rb +36 -4
- data/lib/mail_room/delivery/sidekiq.rb +4 -3
- data/lib/mail_room/health_check.rb +60 -0
- data/lib/mail_room/imap/connection.rb +200 -0
- data/lib/mail_room/imap/message.rb +19 -0
- data/lib/mail_room/imap.rb +8 -0
- data/lib/mail_room/jwt.rb +39 -0
- data/lib/mail_room/logger/structured.rb +15 -1
- data/lib/mail_room/mailbox.rb +62 -20
- data/lib/mail_room/mailbox_watcher.rb +15 -2
- data/lib/mail_room/message.rb +16 -0
- data/lib/mail_room/microsoft_graph/connection.rb +243 -0
- data/lib/mail_room/microsoft_graph.rb +7 -0
- data/lib/mail_room/version.rb +2 -2
- data/lib/mail_room.rb +2 -0
- data/mail_room.gemspec +13 -4
- data/spec/fixtures/jwt_secret +1 -0
- data/spec/fixtures/test_config.yml +3 -0
- data/spec/lib/arbitration/redis_spec.rb +9 -7
- data/spec/lib/cli_spec.rb +32 -17
- data/spec/lib/configuration_spec.rb +10 -3
- data/spec/lib/coordinator_spec.rb +27 -11
- data/spec/lib/crash_handler_spec.rb +10 -9
- data/spec/lib/delivery/letter_opener_spec.rb +10 -6
- data/spec/lib/delivery/logger_spec.rb +8 -10
- data/spec/lib/delivery/postback_spec.rb +73 -41
- data/spec/lib/delivery/que_spec.rb +5 -8
- data/spec/lib/delivery/sidekiq_spec.rb +33 -11
- data/spec/lib/health_check_spec.rb +57 -0
- data/spec/lib/{connection_spec.rb → imap/connection_spec.rb} +13 -17
- data/spec/lib/imap/message_spec.rb +36 -0
- data/spec/lib/jwt_spec.rb +80 -0
- data/spec/lib/logger/structured_spec.rb +34 -2
- data/spec/lib/mailbox_spec.rb +79 -34
- data/spec/lib/mailbox_watcher_spec.rb +54 -41
- data/spec/lib/message_spec.rb +35 -0
- data/spec/lib/microsoft_graph/connection_spec.rb +252 -0
- data/spec/spec_helper.rb +14 -4
- metadata +130 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d67e38380fdc5833ee32a9cacee0894a2f9533b869ada45847156a7d49e0130b
|
4
|
+
data.tar.gz: 51c4d4449a80f38d06b99d3fd0f62c9ddf3760f3f55ec7611887ab9e583dc77a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d52fb679aa2b3395e91d4d0f055fc5fb7e709495c5172148a1439d2472ea45a47115824dcf2717aaaa7312679ef48614007ffd4d8d4358e671bb40b037177d72
|
7
|
+
data.tar.gz: a4e43c65a7bd5561e2731a0056299f4c2f68c31c4854a91291f3d47874bccbefe9048f4872aef7a82750a3e4afdad4c7ac59e0c79c667bbc1b83006c35f2440a
|
@@ -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!
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# GitLab mail_room release checklist
|
2
|
+
|
3
|
+
- [ ] create tag in https://gitlab.com/gitlab-org/gitlab-mail_room/
|
4
|
+
- [ ] publish gem from this tag to rubygems.org
|
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
|
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)
|
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,27 +1,29 @@
|
|
1
|
-
|
1
|
+
default:
|
2
|
+
image: "ruby:${RUBY_VERSION}"
|
3
|
+
|
4
|
+
services:
|
5
|
+
- redis:latest
|
2
6
|
|
3
7
|
.test-template: &test
|
4
8
|
cache:
|
5
9
|
paths:
|
6
10
|
- vendor/ruby
|
7
|
-
|
8
|
-
|
11
|
+
variables:
|
12
|
+
REDIS_URL: redis://redis:6379
|
9
13
|
before_script:
|
10
14
|
- apt update && apt install -y libicu-dev
|
11
15
|
- ruby -v # Print out ruby version for debugging
|
12
|
-
|
13
|
-
|
14
|
-
-
|
15
|
-
|
16
|
-
|
17
|
-
rspec-2.4:
|
18
|
-
image: "ruby:2.4"
|
19
|
-
<<: *test
|
16
|
+
- gem install bundler --no-document # Bundler is not installed with the image
|
17
|
+
- bundle config set --local path 'vendor'
|
18
|
+
- bundle install -j $(nproc)
|
19
|
+
script:
|
20
|
+
- bundle exec rspec spec
|
20
21
|
|
21
|
-
rspec
|
22
|
-
|
22
|
+
rspec:
|
23
|
+
parallel:
|
24
|
+
matrix:
|
25
|
+
- RUBY_VERSION: [ "2.5", "2.6", "2.7", "3.0" ]
|
23
26
|
<<: *test
|
24
27
|
|
25
|
-
|
26
|
-
|
27
|
-
<<: *test
|
28
|
+
include:
|
29
|
+
- template: Security/Dependency-Scanning.gitlab-ci.yml
|
data/.rubocop.yml
ADDED
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.
|
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
|
9
|
-
script:
|
10
|
-
|
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
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/).
|