simplecov-cobertura 2.0.0 → 2.1.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/lib/simplecov-cobertura/version.rb +1 -1
- data/lib/simplecov-cobertura.rb +5 -1
- data/test/simplecov-cobertura_test.rb +7 -0
- metadata +3 -4
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c2d0c9eebf10fae25ce491aa5b33fd744cb72c8bd3b9645706e8b6f35495e88
|
4
|
+
data.tar.gz: 8890ee7ca2a87b49a4f37ee049bbb6d9375f5ead377bc2e3e32ee793883f56a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce64fbbd3eb2986a45d90800573739d5f558162a8a66223007926a799e0ba082c4393a7eae1974fe8f40c7b1a22b1f3bebe3adb696805a29a2206c7c5a0b6a21
|
7
|
+
data.tar.gz: ed1e556b151833e2db0eeb4a2e8a0539946f80af3a3a85429e708a119065def438032eb660437367f1bd34c91eb1d75d7636ca3958844ca83249ef433080eb6d
|
data/lib/simplecov-cobertura.rb
CHANGED
@@ -12,9 +12,13 @@ module SimpleCov
|
|
12
12
|
RESULT_FILE_NAME = 'coverage.xml'
|
13
13
|
DTD_URL = 'http://cobertura.sourceforge.net/xml/coverage-04.dtd'
|
14
14
|
|
15
|
+
def initialize(result_file_name: RESULT_FILE_NAME)
|
16
|
+
@result_file_name = result_file_name
|
17
|
+
end
|
18
|
+
|
15
19
|
def format(result)
|
16
20
|
xml_doc = result_to_xml result
|
17
|
-
result_path = File.join(SimpleCov.coverage_path,
|
21
|
+
result_path = File.join(SimpleCov.coverage_path, @result_file_name)
|
18
22
|
|
19
23
|
formatter = REXML::Formatters::Pretty.new
|
20
24
|
formatter.compact = true
|
@@ -35,6 +35,13 @@ class CoberturaFormatterTest < Test::Unit::TestCase
|
|
35
35
|
assert_equal(xml, IO.read(result_path))
|
36
36
|
end
|
37
37
|
|
38
|
+
def test_format_save_custom_filename
|
39
|
+
xml = SimpleCov::Formatter::CoberturaFormatter.new(result_file_name: 'cobertura.xml').format(@result)
|
40
|
+
result_path = File.join(SimpleCov.coverage_path, 'cobertura.xml')
|
41
|
+
assert_not_empty(xml)
|
42
|
+
assert_equal(xml, IO.read(result_path))
|
43
|
+
end
|
44
|
+
|
38
45
|
def test_terminal_output
|
39
46
|
output, _ = capture_output { @formatter.format(@result) }
|
40
47
|
result_path = File.join(SimpleCov.coverage_path, SimpleCov::Formatter::CoberturaFormatter::RESULT_FILE_NAME)
|
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: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesse Bowes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|
@@ -89,7 +89,6 @@ extra_rdoc_files: []
|
|
89
89
|
files:
|
90
90
|
- ".github/workflows/build.yml"
|
91
91
|
- ".gitignore"
|
92
|
-
- ".ruby-version"
|
93
92
|
- Gemfile
|
94
93
|
- LICENSE
|
95
94
|
- README.md
|
@@ -118,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
117
|
- !ruby/object:Gem::Version
|
119
118
|
version: '0'
|
120
119
|
requirements: []
|
121
|
-
rubygems_version: 3.
|
120
|
+
rubygems_version: 3.2.22
|
122
121
|
signing_key:
|
123
122
|
specification_version: 4
|
124
123
|
summary: SimpleCov Cobertura Formatter
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
3.0.2
|