travis-ci
1 of 1 new or added line in 1 file covered. (100.0%)
11639 of 12200 relevant lines covered (95.4%)
1901.88 hits per line
1 |
# encoding: utf-8
|
|
2 |
|
|
3 |
require 'faraday'
|
6 all except jruby-head and jruby-9000 ✔ |
4 |
require 'json'
|
6 all except jruby-head and jruby-9000 ✔ |
5 |
|
|
6 |
module Github |
6 all except jruby-head and jruby-9000 ✔ |
7 |
class Response::Jsonize < Response |
6 all except jruby-head and jruby-9000 ✔ |
8 |
|
|
9 |
dependency 'json'
|
6 all except jruby-head and jruby-9000 ✔ |
10 |
|
|
11 |
define_parser do |body|
|
6 all except jruby-head and jruby-9000 ✔ |
12 |
JSON.parse(body)
|
4,908 all except jruby-head and jruby-9000 ✔ |
13 |
end
|
|
14 |
|
|
15 |
def parse(body) |
6 all except jruby-head and jruby-9000 ✔ |
16 |
case body
|
4,974 all except jruby-head and jruby-9000 ✔ |
17 |
when '' |
|
18 |
nil
|
× |
19 |
when 'true' |
× |
20 |
true
|
× |
21 |
when 'false' |
× |
22 |
false
|
× |
23 |
else
|
× |
24 |
self.class.parser.call(body)
|
4,908 all except jruby-head and jruby-9000 ✔ |
25 |
end
|
|
26 |
end
|
|
27 |
end # Response::Jsonize |
|
28 |
end # Github |