push
travis-ci
1933 of 1933 new or added lines in 59 files covered. (100.0%)
6864 of 7131 relevant lines covered (96.26%)
21.86 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✔ |
|
UI.debug "Guards jobs done. Sleeping..." |
9 all except rbx and jruby ✔ |
9 |
sleep |
9 all except rbx and jruby ✔ |
|
UI.debug "Sleep interrupted by events." |
9 all except rbx and jruby ✔ |
11 |
:stopped
|
9 all except rbx and jruby ✔ |
12 |
rescue Interrupt |
|
|
UI.debug "Sleep interrupted by user." |
× |
14 |
:exit
|
× |
15 |
end
|
|
16 |
|
|
17 |
def background |
5✔ |
18 |
Thread.main.wakeup
|
9 all except rbx and jruby ✔ |
19 |
end
|
|
20 |
|
|
21 |
def handle_interrupt |
5✔ |
22 |
Thread.main.raise Interrupt |
× |
23 |
end
|
|
24 |
end
|
|
25 |
end
|
|
26 |
end
|