push
0 of 2 new or added lines in 1 file covered. (0.0%)
3735 existing lines in 129 files now uncovered.1940 of 15644 relevant lines covered (12.4%)
0.25 hits per line
UNCOV
1
|
class GithubPullRequestFetcher |
× |
UNCOV
2
|
require 'http_request'
|
× |
3 |
|
|
UNCOV
4
|
class << self |
× |
UNCOV
5
|
def supports_url?(url) |
× |
UNCOV
6
|
lower_case_url = url.downcase |
× |
UNCOV
7
|
(HttpRequest.valid_url?(url) &&
|
× |
UNCOV
8
|
(lower_case_url.include? 'github') &&
|
× |
UNCOV
9
|
!%r{/pull/[0-9]+$}.match(lower_case_url).nil?)
|
× |
UNCOV
10
|
end
|
× |
UNCOV
11
|
end
|
× |
12 |
|
|
UNCOV
13
|
def initialize(params) |
× |
UNCOV
14
|
@url = params['url'] |
× |
UNCOV
15
|
end
|
× |
16 |
|
|
UNCOV
17
|
def fetch_content |
× |
UNCOV
18
|
url = @url + '.diff' |
× |
UNCOV
19
|
res = HttpRequest.get(url)
|
× |
20 |
|
|
UNCOV
21
|
if res.is_a? Net::HTTPSuccess |
× |
UNCOV
22
|
res.body |
× |
UNCOV
23
|
else
|
× |
UNCOV
24
|
''
|
× |
UNCOV
25
|
end
|
× |
UNCOV
26
|
end
|
× |
UNCOV
27
|
end
|
× |