circleci
0 of 4 new or added lines in 3 files covered. (0.0%)
2099 existing lines in 140 files now uncovered.3881 of 6191 relevant lines covered (62.69%)
74.9 hits per line
1 |
# frozen_string_literal: true
|
|
2 |
|
|
3 |
class EventProcessor |
1✔ |
4 |
attr_reader :event
|
1✔ |
5 |
def initialize(event) |
1✔ |
UNCOV
6
|
@event = event
|
× |
7 |
end
|
|
8 |
|
|
9 |
delegate :process, to: :processor |
1✔ |
10 |
|
|
11 |
private |
1✔ |
12 |
|
|
13 |
def event_type |
1✔ |
UNCOV
14
|
event['event']
|
× |
15 |
end
|
|
16 |
|
|
17 |
def processor |
1✔ |
UNCOV
18
|
case event_type
|
× |
19 |
when 'CREATED' |
|
UNCOV
20
|
UpdateProcessor.new(event)
|
× |
21 |
when 'UPDATED' |
|
UNCOV
22
|
UpdateProcessor.new(event)
|
× |
23 |
when 'DELETED' |
|
UNCOV
24
|
DeleteProcessor.new(event)
|
× |
25 |
else
|
|
UNCOV
26
|
UnknownEvent.new(event)
|
× |
27 |
end
|
|
28 |
end
|
|
29 |
end
|