circleci
1 of 2 new or added lines in 1 file covered. (50.0%)
2136 existing lines in 138 files now uncovered.3967 of 6302 relevant lines covered (62.95%)
75.79 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
|