coveralls-lcov 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/coveralls-lcov.gemspec +2 -2
- data/lib/coveralls/lcov/converter.rb +23 -20
- data/lib/coveralls/lcov/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 577f72f4f80ea030924bb88db39c60f886880b7c
|
4
|
+
data.tar.gz: 018b5ca9ef421b54cd102e94faf423cb25dee77b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f00c095a4be4a6c9718fcbadfee7e928375c3ae7957104959be860b695b7ca52298e3678541708dd2e565a6324d8e4c5a6bf1519c45ea5f49d88654a90eeac4
|
7
|
+
data.tar.gz: 17125d010445572669bb79341e1b905786053d1d5ef68c5754f78b203e9f5f39eadf97573416e98977849e024571511a9249487901204f9f537c566a3a4798ca
|
data/Gemfile
CHANGED
data/coveralls-lcov.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# coding: utf-8
|
2
|
-
lib = File.expand_path(
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
4
|
+
require "coveralls/lcov/version"
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "coveralls-lcov"
|
@@ -14,16 +14,16 @@ module Coveralls
|
|
14
14
|
source_files << generate_source_file(filename, info)
|
15
15
|
end
|
16
16
|
payload = {
|
17
|
-
:
|
18
|
-
:
|
19
|
-
:
|
20
|
-
:
|
17
|
+
service_name: "travis-ci",
|
18
|
+
service_job_id: ENV["TRAVIS_JOB_ID"],
|
19
|
+
git: git_info,
|
20
|
+
source_files: source_files,
|
21
21
|
}
|
22
22
|
payload
|
23
23
|
end
|
24
24
|
|
25
25
|
def parse_tracefile
|
26
|
-
lcov_info = Hash.new{|h,k| h[k] = {} }
|
26
|
+
lcov_info = Hash.new {|h, k| h[k] = {} }
|
27
27
|
source_file = nil
|
28
28
|
File.readlines(@tracefile).each do |line|
|
29
29
|
case line.chomp
|
@@ -38,38 +38,41 @@ module Coveralls
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
lcov_info
|
41
|
+
rescue => ex
|
42
|
+
warn "Could not read tracefile: #{@tracefile}"
|
43
|
+
warn "#{ex.class}: #{ex.message}"
|
44
|
+
exit(false)
|
41
45
|
end
|
42
46
|
|
43
47
|
def generate_source_file(filename, info)
|
44
|
-
source = File.open(filename, "r:#{@source_encoding}"
|
48
|
+
source = File.open(filename, "r:#{@source_encoding}", &:read).encode("UTF-8")
|
45
49
|
lines = source.lines
|
46
50
|
coverage = Array.new(lines.to_a.size)
|
47
|
-
source.lines.each_with_index do |
|
51
|
+
source.lines.each_with_index do |_line, index|
|
48
52
|
coverage[index] = info[index + 1]
|
49
53
|
end
|
50
54
|
top_src_dir = Dir.pwd
|
51
55
|
{
|
52
|
-
:
|
53
|
-
:
|
54
|
-
:
|
56
|
+
name: filename.sub(%r!#{top_src_dir}/!, ""),
|
57
|
+
source: source,
|
58
|
+
coverage: coverage,
|
55
59
|
}
|
56
60
|
end
|
57
61
|
|
58
62
|
def git_info
|
59
63
|
{
|
60
|
-
:
|
61
|
-
:
|
62
|
-
:
|
63
|
-
:
|
64
|
-
:
|
65
|
-
:
|
66
|
-
:
|
64
|
+
head: {
|
65
|
+
id: `git log -1 --format=%H`,
|
66
|
+
committer_email: `git log -1 --format=%ce`,
|
67
|
+
committer_name: `git log -1 --format=%cN`,
|
68
|
+
author_email: `git log -1 --format=%ae`,
|
69
|
+
author_name: `git log -1 --format=%aN`,
|
70
|
+
message: `git log -1 --format=%s`,
|
67
71
|
},
|
68
|
-
:
|
69
|
-
:
|
72
|
+
remotes: [], # FIXME need this?
|
73
|
+
branch: `git rev-parse --abbrev-ref HEAD`,
|
70
74
|
}
|
71
75
|
end
|
72
|
-
|
73
76
|
end
|
74
77
|
end
|
75
78
|
end
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coveralls-lcov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenji Okimoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.5'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: Post coverage information to coveralls.io
|
@@ -46,7 +46,7 @@ executables:
|
|
46
46
|
extensions: []
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
|
-
- .gitignore
|
49
|
+
- ".gitignore"
|
50
50
|
- Gemfile
|
51
51
|
- LICENSE.txt
|
52
52
|
- README.md
|
@@ -67,17 +67,17 @@ require_paths:
|
|
67
67
|
- lib
|
68
68
|
required_ruby_version: !ruby/object:Gem::Requirement
|
69
69
|
requirements:
|
70
|
-
- -
|
70
|
+
- - ">="
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: 1.9.3
|
73
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
|
-
- -
|
75
|
+
- - ">="
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
78
|
requirements: []
|
79
79
|
rubyforge_project:
|
80
|
-
rubygems_version: 2.
|
80
|
+
rubygems_version: 2.5.1
|
81
81
|
signing_key:
|
82
82
|
specification_version: 4
|
83
83
|
summary: Post coverage information to coveralls.io
|