push
travis-ci
704 of 1013 relevant lines covered (69.5%)
2.7 hits per line
1 |
require 'pre-commit/checks/grep'
|
1✔ |
2 |
|
|
3 |
module PreCommit |
1✔ |
4 |
module Checks |
1✔ |
5 |
class GemfilePath < Grep |
1✔ |
6 |
|
|
7 |
def files_filter(staged_files) |
1✔ |
8 |
staged_files.grep(/^Gemfile$/)
|
7✔ |
9 |
end
|
|
10 |
|
|
11 |
def message |
1✔ |
12 |
"local path found in Gemfile:"
|
2✔ |
13 |
end
|
|
14 |
|
|
15 |
def pattern |
1✔ |
16 |
"path:|:path\\s*=>"
|
5✔ |
17 |
end
|
|
18 |
|
|
19 |
def extra_grep |
1✔ |
20 |
%w{-v #}
|
15✔ |
21 |
end
|
|
22 |
|
|
23 |
def self.description |
1✔ |
24 |
"Checks 'Gemfile' for local paths."
|
× |
25 |
end
|
|
26 |
|
|
27 |
end
|
|
28 |
end
|
|
29 |
end
|