simplecov-teamcity-summary 0.1.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +31 -25
- data/README.md +16 -11
- data/lib/simplecov-teamcity-summary/formatter.rb +0 -1
- data/lib/simplecov-teamcity-summary/version.rb +1 -1
- data/simplecov-teamcity-summary.gemspec +1 -1
- data/spec/lib/formatter_spec.rb +0 -2
- data/spec/spec_helper.rb +0 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 11ff7a3c1f60b5563e88c921eff38d2d82812f9cc56722f351039cbddbc2696b
|
4
|
+
data.tar.gz: 880d6d0e7ef4fc10a49a26de49365c9eeba78ebec16217bc060876ab2d8edc59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fb88efedd3f5edc123ff0a1ed9f4544d89f5a0662d83f6c1506c9924b69f690cef6ab2a64f8ad3500840694a75e294040e63a3fdf198d114839593809b0c3f5
|
7
|
+
data.tar.gz: b8ceb6d23d765ede95adf78e75f39907ce26ff4be9dfa44aaf14d49c92864456625f7e9f0bf751def876878a5e67ccfba229c6e25c3a67261a38b41700aee47b
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,36 +1,39 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
simplecov-teamcity-summary (0.1.
|
4
|
+
simplecov-teamcity-summary (0.1.3)
|
5
5
|
simplecov
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
coderay (1.1.
|
11
|
-
diff-lcs (1.
|
12
|
-
docile (1.
|
13
|
-
|
14
|
-
|
15
|
-
pry (0.
|
16
|
-
coderay (~> 1.0)
|
17
|
-
method_source (~> 0.
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
rspec-
|
22
|
-
rspec-
|
23
|
-
|
24
|
-
|
25
|
-
rspec-expectations (
|
26
|
-
diff-lcs (>= 1.
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
simplecov
|
33
|
-
|
10
|
+
coderay (1.1.2)
|
11
|
+
diff-lcs (1.3)
|
12
|
+
docile (1.3.0)
|
13
|
+
json (2.1.0)
|
14
|
+
method_source (0.9.0)
|
15
|
+
pry (0.11.3)
|
16
|
+
coderay (~> 1.1.0)
|
17
|
+
method_source (~> 0.9.0)
|
18
|
+
rake (12.3.1)
|
19
|
+
rspec (3.7.0)
|
20
|
+
rspec-core (~> 3.7.0)
|
21
|
+
rspec-expectations (~> 3.7.0)
|
22
|
+
rspec-mocks (~> 3.7.0)
|
23
|
+
rspec-core (3.7.1)
|
24
|
+
rspec-support (~> 3.7.0)
|
25
|
+
rspec-expectations (3.7.0)
|
26
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
27
|
+
rspec-support (~> 3.7.0)
|
28
|
+
rspec-mocks (3.7.0)
|
29
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
+
rspec-support (~> 3.7.0)
|
31
|
+
rspec-support (3.7.1)
|
32
|
+
simplecov (0.16.1)
|
33
|
+
docile (~> 1.1)
|
34
|
+
json (>= 1.8, < 3)
|
35
|
+
simplecov-html (~> 0.10.0)
|
36
|
+
simplecov-html (0.10.2)
|
34
37
|
|
35
38
|
PLATFORMS
|
36
39
|
ruby
|
@@ -41,3 +44,6 @@ DEPENDENCIES
|
|
41
44
|
rake
|
42
45
|
rspec
|
43
46
|
simplecov-teamcity-summary!
|
47
|
+
|
48
|
+
BUNDLED WITH
|
49
|
+
1.16.1
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# SimpleCov::TeamcitySummary
|
2
2
|
|
3
|
-
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/simplecov-teamcity-summary.svg)](http://badge.fury.io/rb/simplecov-teamcity-summary)
|
4
|
+
|
5
|
+
By default, Teamcity [does not pick up coverage information for SimpleCov reports](https://confluence.jetbrains.com/display/TCD9/Code+Coveragee). This gem provides you with a quick and easy way to add these statistics to your Teamcity instance.
|
4
6
|
|
5
7
|
Per build:
|
6
8
|
|
@@ -31,25 +33,31 @@ With these statistics, you can trigger a build fail if coverage drops below a ce
|
|
31
33
|
|
32
34
|
## Configuration
|
33
35
|
|
34
|
-
### When starting
|
36
|
+
### When starting SimpleCov
|
35
37
|
|
36
38
|
```ruby
|
37
39
|
require 'simplecov'
|
38
40
|
SimpleCov.start do
|
39
|
-
|
40
|
-
|
41
|
+
if ENV['TEAMCITY_VERSION']
|
42
|
+
at_exit do
|
43
|
+
SimpleCov::Formatter::TeamcitySummaryFormatter.new.format(SimpleCov.result)
|
44
|
+
# SimpleCov.result.format! # uncomment for additional detailed HTML report for TeamCity artifacts
|
45
|
+
end
|
41
46
|
end
|
42
47
|
end
|
43
48
|
```
|
44
49
|
|
45
|
-
### Using a
|
50
|
+
### Using a SimpleCov profile
|
46
51
|
|
47
52
|
Create or edit a .simplecov file and include:
|
48
53
|
|
49
54
|
```ruby
|
50
55
|
SimpleCov.profiles.define 'teamcity' do
|
51
|
-
|
52
|
-
|
56
|
+
if ENV['TEAMCITY_VERSION']
|
57
|
+
at_exit do
|
58
|
+
SimpleCov::Formatter::TeamcitySummaryFormatter.new.format(SimpleCov.result)
|
59
|
+
# SimpleCov.result.format! # uncomment for additional detailed HTML report for TeamCity artifacts
|
60
|
+
end
|
53
61
|
end
|
54
62
|
end
|
55
63
|
```
|
@@ -63,13 +71,10 @@ Then, start your SimpleCov instance like this:
|
|
63
71
|
|
64
72
|
## License
|
65
73
|
|
66
|
-
Copyright (C) 2015 Ben Cochez
|
74
|
+
Copyright (C) 2014-2015 Ben Cochez
|
67
75
|
|
68
76
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
69
77
|
|
70
78
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
71
79
|
|
72
80
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
73
|
-
|
74
|
-
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/benc/simplecov-teamcity-summary/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
|
75
|
-
|
@@ -15,7 +15,6 @@ module SimpleCov::Formatter
|
|
15
15
|
<<-eos
|
16
16
|
|
17
17
|
##teamcity[blockOpened name='Code Coverage Summary']
|
18
|
-
##teamcity[buildStatisticValue key='CodeCoverageL' value='#{simplecov_results.covered_percent}']
|
19
18
|
##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='#{simplecov_results.covered_lines}']
|
20
19
|
##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='#{simplecov_results.total_lines}']
|
21
20
|
##teamcity[blockClosed name='Code Coverage Summary']
|
@@ -7,7 +7,7 @@ Gem::Specification.new do |gem|
|
|
7
7
|
gem.name = "simplecov-teamcity-summary"
|
8
8
|
gem.version = SimpleCov::TeamcitySummary::VERSION
|
9
9
|
gem.authors = ["Ben Cochez"]
|
10
|
-
gem.email = ["ben@
|
10
|
+
gem.email = ["ben@cochez.consulting"]
|
11
11
|
gem.description = "Simplecov formatter that prints coverage summary information to display in TeamCity."
|
12
12
|
gem.summary = gem.description
|
13
13
|
gem.homepage = "https://github.com/benc/simplecov-teamcity-summary"
|
data/spec/lib/formatter_spec.rb
CHANGED
@@ -13,7 +13,6 @@ describe SimpleCov::Formatter::TeamcitySummaryFormatter do
|
|
13
13
|
describe "#format_teamcity" do
|
14
14
|
let(:simplecov_result) { OpenStruct.new({covered_percent: '12.34567', covered_lines: '1234', total_lines: '5678' })}
|
15
15
|
let(:open_block) { "##teamcity[blockOpened name='Code Coverage Summary']" }
|
16
|
-
let(:coverage_percent) { "##teamcity[buildStatisticValue key='CodeCoverageL' value='12.34567']" }
|
17
16
|
let(:covered_lines) { "##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='1234']" }
|
18
17
|
let(:total_lines) { "##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='5678']" }
|
19
18
|
let(:close_block) { "##teamcity[blockClosed name='Code Coverage Summary']" }
|
@@ -21,7 +20,6 @@ describe SimpleCov::Formatter::TeamcitySummaryFormatter do
|
|
21
20
|
subject { described_class.new.format_teamcity(simplecov_result) }
|
22
21
|
|
23
22
|
it { expect(subject).to include(open_block) }
|
24
|
-
it { expect(subject).to include(coverage_percent) }
|
25
23
|
it { expect(subject).to include(covered_lines) }
|
26
24
|
it { expect(subject).to include(total_lines) }
|
27
25
|
it { expect(subject).to include(close_block) }
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplecov-teamcity-summary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Cochez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -83,7 +83,7 @@ dependencies:
|
|
83
83
|
description: Simplecov formatter that prints coverage summary information to display
|
84
84
|
in TeamCity.
|
85
85
|
email:
|
86
|
-
- ben@
|
86
|
+
- ben@cochez.consulting
|
87
87
|
executables: []
|
88
88
|
extensions: []
|
89
89
|
extra_rdoc_files: []
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.7.3
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Simplecov formatter that prints coverage summary information to display in
|