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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31f5c5f92b005b4e0415d891b3e27b6a6df5c6b403e7f2b4850a1ce21d8fc350
4
- data.tar.gz: 88bec7a2767c3f1cb388a48bf1b09f94118439f2f4f1fc8063ed5c4e56630474
3
+ metadata.gz: b29f6564857059dcac6619f01b7677ca3e47371dfced0f19bf559dd2ae1b92c5
4
+ data.tar.gz: 22f51901a3a8edf6348681ae479d3f2dffc5b1bc59847b5a96c3d2514a0a75cd
5
5
  SHA512:
6
- metadata.gz: f71b7d76cb1c76ef9ad0de2cdc318b2e34b67bd17afff09d524ebc013e024260099a9edf46c5c104e580edc0b04b15d16ec16d447f4d4f0fe395e2565ccb1665
7
- data.tar.gz: 0da268fb3cc9bf387adf527629309522a39d4495050e1d2b897994ddd3859a3775593e7c8b0a8609561bbea51a910f9b232e0dca67d9304c1fa5ab63479a3255
6
+ metadata.gz: 50ac805361f155508d1d11739815aaef6bf112674c13cf41d6e6c4e758ade1a3f09c7ac4bc8410012dcbf23edaf5f9e37a2aef60d8863bb3b007a459e5907a2c
7
+ data.tar.gz: b0eaa11f8f5f8a0758368019ce9de0bfb24eb2c2343d22cb5b5bff0cd5efee410ac0668ca22310babe976ff55517cb2c94885867e4e9db90ae87ca69519e84e4
@@ -0,0 +1,13 @@
1
+ language: ruby
2
+ cache: bundler
3
+
4
+ rvm:
5
+ - 2.7
6
+ - 2.6
7
+ - 2.5
8
+ - 2.4
9
+ - 2.3
10
+ - 2.2
11
+ - 2.1
12
+ - 2.0
13
+ - 1.9
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # simplecov-cobertura
2
- [![Run Status](https://api.shippable.com/projects/549b1fbbd46935d5fbc0f9f3/badge?branch=master)](https://app.shippable.com/github/dashingrocket/simplecov-cobertura/dashboard) [![Gem Version](https://badge.fury.io/rb/simplecov-cobertura.svg)](http://badge.fury.io/rb/simplecov-cobertura) [![Downloads](http://ruby-gem-downloads-badge.herokuapp.com/simplecov-cobertura?type=total)](https://rubygems.org/gems/simplecov-cobertura)
2
+ [![Build Status](https://travis-ci.org/dashingrocket/simplecov-cobertura.svg?branch=master)](https://travis-ci.org/dashingrocket/simplecov-cobertura) [![Gem Version](https://badge.fury.io/rb/simplecov-cobertura.svg)](http://badge.fury.io/rb/simplecov-cobertura) [![Downloads](http://ruby-gem-downloads-badge.herokuapp.com/simplecov-cobertura?type=total)](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 2019 Dashing Rocket, Ltd.
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.
@@ -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
@@ -1,7 +1,7 @@
1
1
  module SimpleCov
2
2
  module Formatter
3
3
  class CoberturaFormatter
4
- VERSION = '1.3.1'
4
+ VERSION = '1.4.0'
5
5
  end
6
6
  end
7
7
  end
@@ -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.3.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: 2019-04-02 00:00:00.000000000 Z
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: rake
28
+ name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '12.0'
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: '12.0'
40
+ version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: nokogiri
42
+ name: simplecov
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.0'
48
- type: :development
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: '1.0'
54
+ version: '0.8'
55
55
  - !ruby/object:Gem::Dependency
56
- name: simplecov
56
+ name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.8'
62
- type: :runtime
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.8'
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
- rubyforge_project:
106
- rubygems_version: 2.7.8
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:
@@ -1,16 +0,0 @@
1
- language: ruby
2
-
3
- rvm:
4
- - 2.6
5
- - 2.5
6
- - 2.4
7
- - 2.3
8
- - 2.2
9
- - 2.1
10
- - 2.0.0
11
- - 1.9.3
12
-
13
- build:
14
- ci:
15
- - bundle install --gemfile=$SHIPPABLE_GEMFILE $SHIPPABLE_BUNDLER_ARGS
16
- - rake