xcov 0.8 → 0.9
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/README.md +3 -21
- data/lib/xcov/model/base.rb +12 -0
- data/lib/xcov/model/report.rb +4 -0
- data/lib/xcov/model/source.rb +4 -0
- data/lib/xcov/model/target.rb +9 -0
- data/lib/xcov/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aaf83175a00aac97b4b4e15458f0d9dc8f61c860
|
4
|
+
data.tar.gz: f007348b0e89b0b7547bbcfeb5ae345cbeda6d13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfd0c43e38171bdc07d86e9537d0f2dbdd5a97576af994835943890b03bfe2ed9b8fb6953a0ef1b54f0d759b1111158fa0802bc477b4a90d01a1f0fb78578ba7
|
7
|
+
data.tar.gz: e5e33f9c0fc634e0bcbf4475453611f4fa8460f09ffed9959ed62df6944b1a74b794ff017392592debb369499f493875332222373f9aabd3fb32f7fdb981fdb6
|
data/README.md
CHANGED
@@ -85,28 +85,10 @@ xcov(
|
|
85
85
|
)
|
86
86
|
```
|
87
87
|
|
88
|
-
|
88
|
+
### [Danger](https://github.com/danger/danger)
|
89
|
+
With the *Danger* plugin you can receive your coverage reports directly on your pull requests. You can find more information on the plugin repository available [here](https://github.com/nakiostudio/danger-xcov/tree/create-gem).
|
89
90
|
|
90
|
-
|
91
|
-
* Ignore file allows wildcards for matching a group of files (by **stevenreinisch**)
|
92
|
-
* New `exclude_targets` option to exclude reporting for the targets given (by **stevenreinisch**)
|
93
|
-
|
94
|
-
### v.0.6
|
95
|
-
* Ignored coverage for a specified list of files
|
96
|
-
|
97
|
-
### v.0.5
|
98
|
-
* Fixed bug using the `derived_data_path` option
|
99
|
-
* Fixed bug sorting multiple `.xccoverage` files by datetime
|
100
|
-
|
101
|
-
### v.0.4
|
102
|
-
* Additional flag to enable coverage reports for `.xctest` targets
|
103
|
-
|
104
|
-
### v.0.3
|
105
|
-
* Raised exception when the minimum coverage threshold is not reached (by **opfeffer**)
|
106
|
-
|
107
|
-
### v.0.2
|
108
|
-
* Fixed bug expanding/collapsing rows with same filename
|
109
|
-
* Added Fastlane integration to README
|
91
|
+

|
110
92
|
|
111
93
|
## Contributors
|
112
94
|
|
data/lib/xcov/model/base.rb
CHANGED
@@ -42,6 +42,18 @@ module Xcov
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
+
def coverage_emoji
|
46
|
+
if @coverage >= 0.80
|
47
|
+
return "✅"
|
48
|
+
elsif @coverage >= 0.50
|
49
|
+
return "⚠️"
|
50
|
+
elsif @coverage >= 0.25
|
51
|
+
return "🚫"
|
52
|
+
else
|
53
|
+
return "💀"
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
45
57
|
# Class methods
|
46
58
|
def self.template(name)
|
47
59
|
ERB.new(File.read(File.join(File.dirname(__FILE__), "../../../views/", "#{name}.erb")))
|
data/lib/xcov/model/report.rb
CHANGED
@@ -41,6 +41,10 @@ module Xcov
|
|
41
41
|
Function.template("report").result(binding)
|
42
42
|
end
|
43
43
|
|
44
|
+
def markdown_value
|
45
|
+
"#{@targets.map { |target| target.markdown_value }.join("")}\n> Powered by [xcov](https://github.com/nakiostudio/xcov)"
|
46
|
+
end
|
47
|
+
|
44
48
|
# Class methods
|
45
49
|
|
46
50
|
def self.map dictionary
|
data/lib/xcov/model/source.rb
CHANGED
data/lib/xcov/model/target.rb
CHANGED
@@ -33,6 +33,15 @@ module Xcov
|
|
33
33
|
Function.template("target").result(binding)
|
34
34
|
end
|
35
35
|
|
36
|
+
def markdown_value
|
37
|
+
markdown = "## Current coverage for #{@name} is `#{@displayable_coverage}`\n"
|
38
|
+
return markdown << "✅ *No files affecting coverage found*\n\n---\n" if @files.empty?
|
39
|
+
markdown << "Files changed | - | - \n--- | --- | ---\n"
|
40
|
+
markdown << "#{@files.map { |file| file.markdown_value }.join("")}\n---\n"
|
41
|
+
|
42
|
+
markdown
|
43
|
+
end
|
44
|
+
|
36
45
|
# Class methods
|
37
46
|
|
38
47
|
def self.map (dictionary)
|
data/lib/xcov/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.9'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Vidal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05
|
11
|
+
date: 2016-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|