codecov 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/codecov.rb +5 -5
- data/test/test_codecov.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0935d5766e38b05f8e3c567c1b16dfd7763902ac06073eabb8a3dc49768fec31'
|
4
|
+
data.tar.gz: 3a97f5b053e2e5a934fbe5fb5f13401d0c6befed9e20d7d9ca53990469946c48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fd075c6ec939eb9cd895c24d7e96199bb2fc4a501219c7af6f8ada9e0242f8cccb841b06d7c179c10bf5716ad08b41a101a50ed8db56c90cfe0112fb4f50dc5
|
7
|
+
data.tar.gz: 7db5f6d020b1a71cff306b11ef7a4304e5606b691264cb66015b1c11a9254c0f7cac7f8222d4f4ff1c03c55484a1548b1c09d366909ba7ceb8e50951d083fa5c
|
data/lib/codecov.rb
CHANGED
@@ -7,9 +7,9 @@ require 'simplecov'
|
|
7
7
|
require 'colorize'
|
8
8
|
require 'zlib'
|
9
9
|
|
10
|
-
require 'version'
|
11
|
-
|
12
10
|
class SimpleCov::Formatter::Codecov
|
11
|
+
VERSION = '0.2.5'
|
12
|
+
|
13
13
|
### CIs
|
14
14
|
RECOGNIZED_CIS = [
|
15
15
|
APPVEYOR = 'Appveyor CI',
|
@@ -41,7 +41,7 @@ class SimpleCov::Formatter::Codecov
|
|
41
41
|
'| | / _ \ / _\`|/ _ \/ __/ _ \ \ / /',
|
42
42
|
'| |___| (_) | (_| | __/ (_| (_) \ V /',
|
43
43
|
' \_____\___/ \__,_|\___|\___\___/ \_/',
|
44
|
-
" Ruby-#{
|
44
|
+
" Ruby-#{VERSION}",
|
45
45
|
''
|
46
46
|
].join("\n")
|
47
47
|
end
|
@@ -98,7 +98,7 @@ class SimpleCov::Formatter::Codecov
|
|
98
98
|
params = {
|
99
99
|
'token' => ENV['CODECOV_TOKEN'],
|
100
100
|
'flags' => ENV['CODECOV_FLAG'] || ENV['CODECOV_FLAGS'],
|
101
|
-
'package' => "ruby-#{
|
101
|
+
'package' => "ruby-#{VERSION}"
|
102
102
|
}
|
103
103
|
|
104
104
|
case ci
|
@@ -317,7 +317,7 @@ class SimpleCov::Formatter::Codecov
|
|
317
317
|
def create_report(report)
|
318
318
|
result = {
|
319
319
|
'meta' => {
|
320
|
-
'version' => 'codecov-ruby/v' +
|
320
|
+
'version' => 'codecov-ruby/v' + VERSION
|
321
321
|
}
|
322
322
|
}
|
323
323
|
result.update(result_to_codecov(report))
|
data/test/test_codecov.rb
CHANGED
@@ -35,7 +35,7 @@ class TestCodecov < Minitest::Test
|
|
35
35
|
|
36
36
|
def test_defined
|
37
37
|
assert defined?(SimpleCov::Formatter::Codecov)
|
38
|
-
assert defined?(
|
38
|
+
assert defined?(SimpleCov::Formatter::Codecov::VERSION)
|
39
39
|
end
|
40
40
|
|
41
41
|
def stub_file(filename, coverage)
|
@@ -83,7 +83,7 @@ class TestCodecov < Minitest::Test
|
|
83
83
|
def assert_successful_upload(data)
|
84
84
|
assert_equal(data['result']['uploaded'], true)
|
85
85
|
assert_equal(data['result']['message'], 'Coverage reports upload successfully')
|
86
|
-
assert_equal(data['meta']['version'], 'codecov-ruby/v' +
|
86
|
+
assert_equal(data['meta']['version'], 'codecov-ruby/v' + SimpleCov::Formatter::Codecov::VERSION)
|
87
87
|
assert_equal(data['coverage'].to_json, {
|
88
88
|
'lib/something.rb' => [nil, 1, 0, 0, nil, 1, nil],
|
89
89
|
'lib/somefile.rb' => [nil, 1, nil, 1, 1, 1, 0, 0, nil, 1, nil]
|