coveralls-lcov 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/coveralls/lcov/converter.rb +16 -4
- data/lib/coveralls/lcov/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55af10a66b7405fe018749cb47973aa42df67d86
|
4
|
+
data.tar.gz: 575ff56f720f96fba946c4307d614c26f6504916
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66337291792604ee5cf2fdf9bfb704dfafeb58d09967410869666395687144a2c63673198fde3734d41c51bdb354c0aaa903e46747dd1dbfc1daf05b804ec8dc
|
7
|
+
data.tar.gz: f65d4706e225440aaedc79eaa338fb27b4cf8430e812d69e997de7db4ecf03b63f9b76c51d832650f94a55fc0fab033caf672e0e3249073da47f716935a28842
|
@@ -25,7 +25,7 @@ module Coveralls
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def parse_tracefile
|
28
|
-
lcov_info = Hash.new {|h, k| h[k] = { "coverage" => {}, "branches" =>
|
28
|
+
lcov_info = Hash.new {|h, k| h[k] = { "coverage" => {}, "branches" => {} } }
|
29
29
|
source_file = nil
|
30
30
|
File.readlines(@tracefile).each do |line|
|
31
31
|
case line.chomp
|
@@ -34,7 +34,8 @@ module Coveralls
|
|
34
34
|
when /\ADA:(\d+),(\d+)/
|
35
35
|
line_no = $1.to_i
|
36
36
|
count = $2.to_i
|
37
|
-
lcov_info[source_file]["coverage"]
|
37
|
+
coverage = lcov_info[source_file]["coverage"]
|
38
|
+
coverage[line_no] = (coverage[line_no] || 0) + count
|
38
39
|
when /\ABRDA:(\d+),(\d+),(\d+),(\d+|-)/
|
39
40
|
line_no = $1.to_i
|
40
41
|
block_no = $2.to_i
|
@@ -43,7 +44,10 @@ module Coveralls
|
|
43
44
|
unless $4 == "-"
|
44
45
|
hits = $4.to_i
|
45
46
|
end
|
46
|
-
lcov_info[source_file]['branches']
|
47
|
+
branches = lcov_info[source_file]['branches']
|
48
|
+
branches_line = branches[line_no] = branches[line_no] || {}
|
49
|
+
branches_block = branches_line[block_no] = branches_line[block_no] || {}
|
50
|
+
branches_block[branch_no] = (branches_block[branch_no] || 0) + hits
|
47
51
|
when /\Aend_of_record/
|
48
52
|
source_file = nil
|
49
53
|
end
|
@@ -69,7 +73,15 @@ module Coveralls
|
|
69
73
|
coverage: coverage,
|
70
74
|
}
|
71
75
|
unless info["branches"].empty?
|
72
|
-
|
76
|
+
branches = []
|
77
|
+
info["branches"].each do |line_no, blocks_no|
|
78
|
+
blocks_no.each do |block_no, branches_no|
|
79
|
+
branches_no.each do |branch_no, hits|
|
80
|
+
branches.push(line_no, block_no, branch_no, hits)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
source_file["branches"] = branches
|
73
85
|
end
|
74
86
|
source_file
|
75
87
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coveralls-lcov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenji Okimoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
version: '0'
|
78
78
|
requirements: []
|
79
79
|
rubyforge_project:
|
80
|
-
rubygems_version: 2.6.
|
80
|
+
rubygems_version: 2.6.13
|
81
81
|
signing_key:
|
82
82
|
specification_version: 4
|
83
83
|
summary: Post coverage information to coveralls.io
|