simplecov-teamcity-summary 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +28 -0
- data/README.md +30 -13
- data/img/CHANGELOG.md +12 -0
- data/img/coverage_chart.png +0 -0
- data/img/trigger_build_failure.png +0 -0
- data/lib/simplecov-teamcity-summary/formatter.rb +5 -2
- data/lib/simplecov-teamcity-summary/version.rb +2 -2
- data/simplecov-teamcity-summary.gemspec +1 -1
- data/spec/lib/formatter_spec.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9066303545c68f6a7a00a64dc0dac9b34e5c33a2
|
4
|
+
data.tar.gz: 38de68c2f178c64c56c0d3144600fba81f8a750f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80f9fdac78d1efb10a273c6dda97598107271cd65546323ecbec5b6a32689b868811356121f651e99933ad987f8500156c6eb2402eee31e8d78e16f27b6fc442
|
7
|
+
data.tar.gz: a58998adcbed63db175a6fb76bd8c18ff6a520705a80f605087d230cb9c19380ce4de0482147b9b89e1824fc1b98ed167cfe2bc48af9a530dffa0405c8f848eb
|
data/.gitignore
CHANGED
@@ -1 +1,29 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
1
4
|
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
|
12
|
+
## Documentation cache and generated files:
|
13
|
+
/.yardoc/
|
14
|
+
/_yardoc/
|
15
|
+
/doc/
|
16
|
+
/rdoc/
|
17
|
+
|
18
|
+
## Environment normalisation:
|
19
|
+
/.bundle/
|
20
|
+
/lib/bundler/man/
|
21
|
+
|
22
|
+
# for a library or gem, you might want to ignore these files since the code is
|
23
|
+
# intended to run in multiple environments; otherwise, check them in:
|
24
|
+
# Gemfile.lock
|
25
|
+
# .ruby-version
|
26
|
+
# .ruby-gemset
|
27
|
+
|
28
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
29
|
+
.rvmrc
|
data/README.md
CHANGED
@@ -1,22 +1,33 @@
|
|
1
|
-
#
|
1
|
+
# SimpleCov::TeamcitySummary
|
2
2
|
|
3
|
-
|
3
|
+
By default, Teamcity [does not pick up coverage information for Simplecov reports](http://confluence.jetbrains.com/display/TCD8/Code+Coverage). This gem provides you with a quick and easy way to add these statistics to your Teamcity instance.
|
4
|
+
|
5
|
+
Per build:
|
4
6
|
|
5
7
|
![See your coverage results in TeamCity](https://raw.github.com/benc/simplecov-teamcity-summary/master/img/coverage_results.png)
|
6
8
|
|
7
|
-
|
9
|
+
Overall coverage statistics:
|
10
|
+
|
11
|
+
![Get overall coverage statistics](https://raw.github.com/benc/simplecov-teamcity-summary/master/img/coverage_chart.png)
|
8
12
|
|
9
|
-
|
13
|
+
With these statistics, you can trigger a build fail if coverage drops below a certain value:
|
10
14
|
|
11
|
-
|
15
|
+
![Trigger build failure](https://raw.github.com/benc/simplecov-teamcity-summary/master/img/trigger_build_failure.png)
|
16
|
+
|
17
|
+
## Installation
|
12
18
|
|
13
|
-
|
19
|
+
* Make sure you're depending on SimpleCov v0.8 or greater.
|
20
|
+
* Add this line to your application's Gemfile:
|
14
21
|
|
15
|
-
|
22
|
+
gem 'simplecov-teamcity-summary'
|
23
|
+
|
24
|
+
And then execute:
|
16
25
|
|
17
|
-
|
26
|
+
$ bundle
|
18
27
|
|
19
|
-
|
28
|
+
* Or install it yourself as:
|
29
|
+
|
30
|
+
$ gem install simplecov-teamcity-summary
|
20
31
|
|
21
32
|
## Configuration
|
22
33
|
|
@@ -26,7 +37,7 @@ Or install it yourself as:
|
|
26
37
|
require 'simplecov'
|
27
38
|
SimpleCov.start do
|
28
39
|
at_exit do
|
29
|
-
|
40
|
+
SimpleCov::Formatter::TeamcitySummaryFormatter.new.format(SimpleCov.result) if ENV['TEAMCITY_VERSION']
|
30
41
|
end
|
31
42
|
end
|
32
43
|
```
|
@@ -38,12 +49,12 @@ Create or edit a .simplecov file and include:
|
|
38
49
|
```ruby
|
39
50
|
SimpleCov.profiles.define 'teamcity' do
|
40
51
|
at_exit do
|
41
|
-
|
52
|
+
SimpleCov::Formatter::TeamcitySummaryFormatter.new.format(SimpleCov.result) if ENV['TEAMCITY_VERSION']
|
42
53
|
end
|
43
54
|
end
|
44
55
|
```
|
45
56
|
|
46
|
-
Then, start your
|
57
|
+
Then, start your SimpleCov instance like this:
|
47
58
|
|
48
59
|
```ruby
|
49
60
|
require 'simplecov'
|
@@ -52,4 +63,10 @@ Then, start your Simplecov instance like this:
|
|
52
63
|
|
53
64
|
## License
|
54
65
|
|
55
|
-
|
66
|
+
Copyright (C) 2014 Ben Cochez
|
67
|
+
|
68
|
+
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
|
+
|
70
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
71
|
+
|
72
|
+
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.
|
data/img/CHANGELOG.md
ADDED
Binary file
|
Binary file
|
@@ -1,6 +1,9 @@
|
|
1
|
-
|
1
|
+
# Ensure we are using a compatible version of SimpleCov
|
2
|
+
if Gem::Version.new(SimpleCov::VERSION) < Gem::Version.new("0.8.0")
|
3
|
+
raise RuntimeError, 'The version of SimpleCov you are using is too old. Please update with `gem install simplecov` or `bundle update simplecov`'
|
4
|
+
end
|
2
5
|
|
3
|
-
module
|
6
|
+
module SimpleCov::Formatter
|
4
7
|
class TeamcitySummaryFormatter
|
5
8
|
def format(simplecov_results)
|
6
9
|
puts format_teamcity(simplecov_results)
|
@@ -5,7 +5,7 @@ require 'simplecov-teamcity-summary/version'
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |gem|
|
7
7
|
gem.name = "simplecov-teamcity-summary"
|
8
|
-
gem.version =
|
8
|
+
gem.version = SimpleCov::TeamcitySummary::VERSION
|
9
9
|
gem.authors = ["Ben Cochez"]
|
10
10
|
gem.email = ["ben@cochezconsult.be"]
|
11
11
|
gem.description = "Simplecov formatter that prints coverage summary information to display in TeamCity."
|
data/spec/lib/formatter_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe SimpleCov::Formatter::TeamcitySummaryFormatter do
|
4
4
|
describe "#format" do
|
5
5
|
before do
|
6
6
|
expect_any_instance_of(described_class).to receive(:format_teamcity).with(:arg).and_return(:return_value)
|
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.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Cochez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -95,7 +95,10 @@ files:
|
|
95
95
|
- LICENSE
|
96
96
|
- README.md
|
97
97
|
- Rakefile
|
98
|
+
- img/CHANGELOG.md
|
99
|
+
- img/coverage_chart.png
|
98
100
|
- img/coverage_results.png
|
101
|
+
- img/trigger_build_failure.png
|
99
102
|
- lib/simplecov-teamcity-summary.rb
|
100
103
|
- lib/simplecov-teamcity-summary/formatter.rb
|
101
104
|
- lib/simplecov-teamcity-summary/version.rb
|