simplecov-cobertura 1.3.1 → 1.4.0
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/.travis.yml +13 -0
- data/README.md +4 -2
- data/lib/simplecov-cobertura.rb +5 -1
- data/lib/simplecov-cobertura/version.rb +1 -1
- data/simplecov-cobertura.gemspec +9 -1
- data/test/simplecov-cobertura_test.rb +8 -1
- metadata +18 -19
- data/shippable.yml +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b29f6564857059dcac6619f01b7677ca3e47371dfced0f19bf559dd2ae1b92c5
|
4
|
+
data.tar.gz: 22f51901a3a8edf6348681ae479d3f2dffc5b1bc59847b5a96c3d2514a0a75cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50ac805361f155508d1d11739815aaef6bf112674c13cf41d6e6c4e758ade1a3f09c7ac4bc8410012dcbf23edaf5f9e37a2aef60d8863bb3b007a459e5907a2c
|
7
|
+
data.tar.gz: b0eaa11f8f5f8a0758368019ce9de0bfb24eb2c2343d22cb5b5bff0cd5efee410ac0668ca22310babe976ff55517cb2c94885867e4e9db90ae87ca69519e84e4
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# simplecov-cobertura
|
2
|
-
[](https://travis-ci.org/dashingrocket/simplecov-cobertura) [](http://badge.fury.io/rb/simplecov-cobertura) [](https://rubygems.org/gems/simplecov-cobertura)
|
3
3
|
|
4
4
|
Produces [Cobertura](http://cobertura.sourceforge.net/) formatted XML from [SimpleCov](https://github.com/colszowka/simplecov).
|
5
5
|
|
@@ -32,6 +32,7 @@ SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
|
|
32
32
|
|
33
33
|
## Continuous Integration
|
34
34
|
Tested in a CI environment against the following Ruby versions:
|
35
|
+
* 2.7
|
35
36
|
* 2.6
|
36
37
|
* 2.5
|
37
38
|
* 2.4
|
@@ -51,6 +52,7 @@ Tested in a CI environment against the following Ruby versions:
|
|
51
52
|
* Rob Lester
|
52
53
|
* Denis <Zaratan> Pasin
|
53
54
|
* Jesper Rønn-Jensen
|
55
|
+
* Pramod Shinde
|
54
56
|
|
55
57
|
## Contributing
|
56
58
|
|
@@ -61,7 +63,7 @@ Tested in a CI environment against the following Ruby versions:
|
|
61
63
|
5. Create a new Pull Request
|
62
64
|
|
63
65
|
## License
|
64
|
-
Copyright
|
66
|
+
Copyright 2020 Dashing Rocket, Ltd.
|
65
67
|
|
66
68
|
Licensed under the Apache License, Version 2.0 (the "License");
|
67
69
|
you may not use this file except in compliance with the License.
|
data/lib/simplecov-cobertura.rb
CHANGED
@@ -22,7 +22,7 @@ module SimpleCov
|
|
22
22
|
|
23
23
|
xml_str = string_io.string
|
24
24
|
File.write(result_path, xml_str)
|
25
|
-
puts "Coverage report generated for #{result.command_name} to #{result_path}"
|
25
|
+
puts "Coverage report generated for #{result.command_name} to #{result_path}. #{coverage_output(result)}"
|
26
26
|
xml_str
|
27
27
|
end
|
28
28
|
|
@@ -114,6 +114,10 @@ module SimpleCov
|
|
114
114
|
lines << "<!-- Generated by simplecov-cobertura version #{VERSION} (https://github.com/dashingrocket/simplecov-cobertura) -->"
|
115
115
|
lines.join("\n")
|
116
116
|
end
|
117
|
+
|
118
|
+
def coverage_output(result)
|
119
|
+
"#{result.covered_lines} / #{result.covered_lines + result.missed_lines} LOC (#{result.covered_percent.round(2)}%) covered."
|
120
|
+
end
|
117
121
|
end
|
118
122
|
end
|
119
123
|
end
|
data/simplecov-cobertura.gemspec
CHANGED
@@ -21,8 +21,16 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.require_paths = ['lib']
|
22
22
|
|
23
23
|
spec.add_development_dependency 'test-unit', '~> 3.2'
|
24
|
-
spec.add_development_dependency 'rake', '~> 12.0'
|
25
24
|
spec.add_development_dependency 'nokogiri', '~> 1.0'
|
26
25
|
|
27
26
|
spec.add_dependency 'simplecov', '~> 0.8'
|
27
|
+
|
28
|
+
if RUBY_VERSION < '2.0'
|
29
|
+
spec.add_dependency 'json', '< 2.3.0'
|
30
|
+
spec.add_development_dependency 'rake', '~> 12.0', '< 12.3'
|
31
|
+
elsif RUBY_VERSION < '2.2'
|
32
|
+
spec.add_development_dependency 'rake', '~> 12.0'
|
33
|
+
else
|
34
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
35
|
+
end
|
28
36
|
end
|
@@ -24,6 +24,13 @@ class CoberturaFormatterTest < Test::Unit::TestCase
|
|
24
24
|
assert_equal(xml, IO.read(result_path))
|
25
25
|
end
|
26
26
|
|
27
|
+
def test_terminal_output
|
28
|
+
output, _ = capture_output { @formatter.format(@result) }
|
29
|
+
result_path = File.join(SimpleCov.coverage_path, SimpleCov::Formatter::CoberturaFormatter::RESULT_FILE_NAME)
|
30
|
+
output_regex = /Coverage report generated for #{@result.command_name} to #{result_path}. (.*) covered./
|
31
|
+
assert_match(output_regex, output)
|
32
|
+
end
|
33
|
+
|
27
34
|
def test_format_dtd_validates
|
28
35
|
xml = @formatter.format(@result)
|
29
36
|
options = Nokogiri::XML::ParseOptions::DTDLOAD
|
@@ -128,4 +135,4 @@ class CoberturaFormatterTest < Test::Unit::TestCase
|
|
128
135
|
assert_equal 'false', last_line.attribute('branch').value
|
129
136
|
assert_equal '2', last_line.attribute('hits').value
|
130
137
|
end
|
131
|
-
end
|
138
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplecov-cobertura
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesse Bowes
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|
@@ -25,47 +25,47 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: nokogiri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '1.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
|
-
version: '
|
40
|
+
version: '1.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: simplecov
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
48
|
-
type: :
|
47
|
+
version: '0.8'
|
48
|
+
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0.8'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0
|
62
|
-
type: :
|
61
|
+
version: '13.0'
|
62
|
+
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0
|
68
|
+
version: '13.0'
|
69
69
|
description: Produces Cobertura XML formatted output from SimpleCov
|
70
70
|
email:
|
71
71
|
- jbowes@dashingrocket.com
|
@@ -74,20 +74,20 @@ extensions: []
|
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
76
|
- ".gitignore"
|
77
|
+
- ".travis.yml"
|
77
78
|
- Gemfile
|
78
79
|
- LICENSE
|
79
80
|
- README.md
|
80
81
|
- Rakefile
|
81
82
|
- lib/simplecov-cobertura.rb
|
82
83
|
- lib/simplecov-cobertura/version.rb
|
83
|
-
- shippable.yml
|
84
84
|
- simplecov-cobertura.gemspec
|
85
85
|
- test/simplecov-cobertura_test.rb
|
86
86
|
homepage: https://github.com/dashingrocket/simplecov-cobertura
|
87
87
|
licenses:
|
88
88
|
- Apache-2.0
|
89
89
|
metadata: {}
|
90
|
-
post_install_message:
|
90
|
+
post_install_message:
|
91
91
|
rdoc_options: []
|
92
92
|
require_paths:
|
93
93
|
- lib
|
@@ -102,9 +102,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
|
-
|
106
|
-
|
107
|
-
signing_key:
|
105
|
+
rubygems_version: 3.1.2
|
106
|
+
signing_key:
|
108
107
|
specification_version: 4
|
109
108
|
summary: SimpleCov Cobertura Formatter
|
110
109
|
test_files:
|