gitlab-mail_room 0.0.6 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +9 -5
- data/.ruby-version +1 -1
- data/.travis.yml +3 -2
- data/README.md +104 -10
- data/lib/mail_room.rb +2 -0
- data/lib/mail_room/cli.rb +1 -1
- data/lib/mail_room/configuration.rb +11 -1
- data/lib/mail_room/connection.rb +7 -179
- data/lib/mail_room/coordinator.rb +8 -4
- data/lib/mail_room/crash_handler.rb +2 -2
- data/lib/mail_room/health_check.rb +60 -0
- data/lib/mail_room/imap.rb +8 -0
- data/lib/mail_room/imap/connection.rb +200 -0
- data/lib/mail_room/imap/message.rb +19 -0
- data/lib/mail_room/logger/structured.rb +15 -1
- data/lib/mail_room/mailbox.rb +49 -7
- data/lib/mail_room/mailbox_watcher.rb +15 -2
- data/lib/mail_room/message.rb +16 -0
- data/lib/mail_room/microsoft_graph.rb +7 -0
- data/lib/mail_room/microsoft_graph/connection.rb +216 -0
- data/lib/mail_room/version.rb +1 -1
- data/mail_room.gemspec +5 -0
- data/spec/fixtures/test_config.yml +3 -0
- data/spec/lib/cli_spec.rb +3 -3
- data/spec/lib/configuration_spec.rb +9 -1
- data/spec/lib/coordinator_spec.rb +16 -2
- data/spec/lib/health_check_spec.rb +57 -0
- data/spec/lib/{connection_spec.rb → imap/connection_spec.rb} +12 -8
- data/spec/lib/imap/message_spec.rb +36 -0
- data/spec/lib/logger/structured_spec.rb +34 -2
- data/spec/lib/mailbox_spec.rb +58 -10
- data/spec/lib/mailbox_watcher_spec.rb +54 -38
- data/spec/lib/message_spec.rb +35 -0
- data/spec/lib/microsoft_graph/connection_spec.rb +183 -0
- data/spec/spec_helper.rb +11 -0
- metadata +76 -5
data/spec/spec_helper.rb
CHANGED
@@ -2,6 +2,7 @@ require 'simplecov'
|
|
2
2
|
SimpleCov.start
|
3
3
|
|
4
4
|
require 'bundler/setup'
|
5
|
+
require 'date'
|
5
6
|
|
6
7
|
require 'rspec'
|
7
8
|
require 'mocha/api'
|
@@ -26,6 +27,16 @@ REQUIRED_MAILBOX_DEFAULTS = {
|
|
26
27
|
:password => "password123"
|
27
28
|
}
|
28
29
|
|
30
|
+
REQUIRED_MICROSOFT_GRAPH_DEFAULTS = {
|
31
|
+
password: nil,
|
32
|
+
inbox_method: :microsoft_graph,
|
33
|
+
inbox_options: {
|
34
|
+
tenant_id: '98776',
|
35
|
+
client_id: '12345',
|
36
|
+
client_secret: 'MY-SECRET',
|
37
|
+
}.freeze
|
38
|
+
}.freeze
|
39
|
+
|
29
40
|
def build_mailbox(options = {})
|
30
41
|
MailRoom::Mailbox.new(REQUIRED_MAILBOX_DEFAULTS.merge(options))
|
31
42
|
end
|
metadata
CHANGED
@@ -1,15 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-mail_room
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Pitale
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: net-imap
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.2.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.2.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: oauth2
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.4.4
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.4.4
|
13
41
|
- !ruby/object:Gem::Dependency
|
14
42
|
name: rake
|
15
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +94,20 @@ dependencies:
|
|
66
94
|
- - ">="
|
67
95
|
- !ruby/object:Gem::Version
|
68
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: webrick
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.6'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.6'
|
69
111
|
- !ruby/object:Gem::Dependency
|
70
112
|
name: faraday
|
71
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,6 +206,20 @@ dependencies:
|
|
164
206
|
- - ">="
|
165
207
|
- !ruby/object:Gem::Version
|
166
208
|
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: webmock
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
167
223
|
description: mail_room will proxy email (gmail) from IMAP to a delivery method
|
168
224
|
email:
|
169
225
|
- tpitale@gmail.com
|
@@ -200,9 +256,16 @@ files:
|
|
200
256
|
- lib/mail_room/delivery/postback.rb
|
201
257
|
- lib/mail_room/delivery/que.rb
|
202
258
|
- lib/mail_room/delivery/sidekiq.rb
|
259
|
+
- lib/mail_room/health_check.rb
|
260
|
+
- lib/mail_room/imap.rb
|
261
|
+
- lib/mail_room/imap/connection.rb
|
262
|
+
- lib/mail_room/imap/message.rb
|
203
263
|
- lib/mail_room/logger/structured.rb
|
204
264
|
- lib/mail_room/mailbox.rb
|
205
265
|
- lib/mail_room/mailbox_watcher.rb
|
266
|
+
- lib/mail_room/message.rb
|
267
|
+
- lib/mail_room/microsoft_graph.rb
|
268
|
+
- lib/mail_room/microsoft_graph/connection.rb
|
206
269
|
- lib/mail_room/version.rb
|
207
270
|
- logfile.log
|
208
271
|
- mail_room.gemspec
|
@@ -210,7 +273,6 @@ files:
|
|
210
273
|
- spec/lib/arbitration/redis_spec.rb
|
211
274
|
- spec/lib/cli_spec.rb
|
212
275
|
- spec/lib/configuration_spec.rb
|
213
|
-
- spec/lib/connection_spec.rb
|
214
276
|
- spec/lib/coordinator_spec.rb
|
215
277
|
- spec/lib/crash_handler_spec.rb
|
216
278
|
- spec/lib/delivery/letter_opener_spec.rb
|
@@ -218,9 +280,14 @@ files:
|
|
218
280
|
- spec/lib/delivery/postback_spec.rb
|
219
281
|
- spec/lib/delivery/que_spec.rb
|
220
282
|
- spec/lib/delivery/sidekiq_spec.rb
|
283
|
+
- spec/lib/health_check_spec.rb
|
284
|
+
- spec/lib/imap/connection_spec.rb
|
285
|
+
- spec/lib/imap/message_spec.rb
|
221
286
|
- spec/lib/logger/structured_spec.rb
|
222
287
|
- spec/lib/mailbox_spec.rb
|
223
288
|
- spec/lib/mailbox_watcher_spec.rb
|
289
|
+
- spec/lib/message_spec.rb
|
290
|
+
- spec/lib/microsoft_graph/connection_spec.rb
|
224
291
|
- spec/spec_helper.rb
|
225
292
|
homepage: http://github.com/tpitale/mail_room
|
226
293
|
licenses: []
|
@@ -240,7 +307,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
240
307
|
- !ruby/object:Gem::Version
|
241
308
|
version: '0'
|
242
309
|
requirements: []
|
243
|
-
rubygems_version: 3.1.
|
310
|
+
rubygems_version: 3.1.4
|
244
311
|
signing_key:
|
245
312
|
specification_version: 4
|
246
313
|
summary: mail_room will proxy email (gmail) from IMAP to a callback URL, logger, or
|
@@ -250,7 +317,6 @@ test_files:
|
|
250
317
|
- spec/lib/arbitration/redis_spec.rb
|
251
318
|
- spec/lib/cli_spec.rb
|
252
319
|
- spec/lib/configuration_spec.rb
|
253
|
-
- spec/lib/connection_spec.rb
|
254
320
|
- spec/lib/coordinator_spec.rb
|
255
321
|
- spec/lib/crash_handler_spec.rb
|
256
322
|
- spec/lib/delivery/letter_opener_spec.rb
|
@@ -258,7 +324,12 @@ test_files:
|
|
258
324
|
- spec/lib/delivery/postback_spec.rb
|
259
325
|
- spec/lib/delivery/que_spec.rb
|
260
326
|
- spec/lib/delivery/sidekiq_spec.rb
|
327
|
+
- spec/lib/health_check_spec.rb
|
328
|
+
- spec/lib/imap/connection_spec.rb
|
329
|
+
- spec/lib/imap/message_spec.rb
|
261
330
|
- spec/lib/logger/structured_spec.rb
|
262
331
|
- spec/lib/mailbox_spec.rb
|
263
332
|
- spec/lib/mailbox_watcher_spec.rb
|
333
|
+
- spec/lib/message_spec.rb
|
334
|
+
- spec/lib/microsoft_graph/connection_spec.rb
|
264
335
|
- spec/spec_helper.rb
|