push
travis-ci
8 of 8 new or added lines in 2 files covered. (100.0%)
6835 of 7131 relevant lines covered (95.85%)
11.5 hits per line
1 |
require "guard/jobs/base"
|
5✔ |
2 |
require "guard/ui"
|
5✔ |
3 |
|
|
4 |
module Guard |
5✔ |
5 |
module Jobs |
5✔ |
6 |
class Sleep < Base |
5✔ |
7 |
def foreground |
5✔ |
8 |
UI.debug "Guards jobs done. Sleeping..." |
6 only 2.0.0 and 1.9.3 ✔ |
9 |
sleep |
6 only 2.0.0 and 1.9.3 ✔ |
10 |
UI.debug "Sleep interrupted by events." |
6 only 2.0.0 and 1.9.3 ✔ |
11 |
:stopped
|
6 only 2.0.0 and 1.9.3 ✔ |
12 |
rescue Interrupt |
|
13 |
UI.debug "Sleep interrupted by user." |
× |
14 |
:exit
|
× |
15 |
end
|
|
16 |
|
|
17 |
def background |
5✔ |
18 |
Thread.main.wakeup
|
6 only 2.0.0 and 1.9.3 ✔ |
19 |
end
|
|
20 |
|
|
21 |
def handle_interrupt |
5✔ |
22 |
Thread.main.raise Interrupt |
× |
23 |
end
|
|
24 |
end
|
|
25 |
end
|
|
26 |
end
|