travis-ci
556 of 556 new or added lines in 70 files covered. (100.0%)
6538 of 6795 relevant lines covered (96.22%)
12.65 hits per line
1 |
require "pry"
|
5✔ |
2 |
|
|
|
module Guard |
5✔ |
4 |
module Commands |
5✔ |
5 |
class Scope |
5✔ |
6 |
def self.import |
5✔ |
7 |
Pry::Commands.create_command "scope" do |
24 only 2.1.2 and rbx ✔ |
8 |
group "Guard"
|
24 only 2.1.2 and rbx ✔ |
9 |
description "Scope Guard actions to groups and plugins."
|
24 only 2.1.2 and rbx ✔ |
10 |
|
|
11 |
banner <<-BANNER |
24 only 2.1.2 and rbx ✔ |
12 |
Usage: scope <scope> |
|
13 |
|
|
14 |
Set the global Guard scope.
|
|
15 |
BANNER |
× |
16 |
|
|
17 |
def process(*entries) |
24 only 2.1.2 and rbx ✔ |
18 |
scope, unknown = ::Guard::Interactor.convert_scope(entries) |
8 only 2.1.2 and rbx ✔ |
19 |
|
|
20 |
unless unknown.empty?
|
8 only 2.1.2 and rbx ✔ |
21 |
output.puts "Unknown scopes: #{unknown.join(",") }"
|
2 only 2.1.2 and rbx ✔ |
22 |
return
|
2 only 2.1.2 and rbx ✔ |
23 |
end
|
|
24 |
|
|
25 |
if scope[:plugins].empty? && scope[:groups].empty? |
6 only 2.1.2 and rbx ✔ |
26 |
output.puts "Usage: scope <scope>"
|
2 only 2.1.2 and rbx ✔ |
27 |
return
|
2 only 2.1.2 and rbx ✔ |
28 |
end
|
|
29 |
|
|
30 |
::Guard.setup_scope(scope)
|
4 only 2.1.2 and rbx ✔ |
31 |
end
|
|
32 |
end
|
|
33 |
end
|
|
34 |
end
|
|
35 |
end
|
|
36 |
end
|