danger-xccov_summary 0.0.8 → 0.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/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/danger-xccov_summary.gemspec +1 -1
- data/lib/xccov_summary/gem_version.rb +1 -1
- data/lib/xccov_summary/plugin.rb +3 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d5ecd20cc875c175bdba0159a2320650f6a4c75d0e1514ec993ea77a35e9d5e1
|
|
4
|
+
data.tar.gz: b6dc2052a367fea2effee784404d5ec69b25d4351f2605fc4e89aaad946299b8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '07590c012d7fab91f085ed1e2d472fdedb61a0f17c4d8150fa63ee6a39a925324bbd28600ef0849babf652a613f7b893e7074bbeeefc0711aea839028fad9e50'
|
|
7
|
+
data.tar.gz: 73f4f055983fd5872b24688bb8be275e1b4171942358575f417ef7090807d3ad998f320ab39e8f394b3ed48590ea165962871af499fbec6ad52384ba907bf457
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -11,7 +11,7 @@ A description of danger-xccov_summary.
|
|
|
11
11
|
Simply add `xccov_summary` to your `Dangerfile`.
|
|
12
12
|
|
|
13
13
|
```ruby
|
|
14
|
-
xccov_summary.configure(
|
|
14
|
+
xccov_summary.configure("/path/to/directory/with/action.xccovreport")
|
|
15
15
|
xccov_summary.show_coverage
|
|
16
16
|
```
|
|
17
17
|
And it will look like:
|
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
spec.email = ['taylor.ledingham@hootsuite.com']
|
|
11
11
|
spec.description = ''
|
|
12
12
|
spec.summary = ''
|
|
13
|
-
spec.homepage = 'https://github.hootops.com/
|
|
13
|
+
spec.homepage = 'https://github.hootops.com/ios/danger-xccov_summary'
|
|
14
14
|
spec.license = 'MIT'
|
|
15
15
|
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
data/lib/xccov_summary/plugin.rb
CHANGED
|
@@ -27,7 +27,7 @@ class DangerXccovSummary < Plugin
|
|
|
27
27
|
# @return [Array<String>]
|
|
28
28
|
def notify_if_coverage_is_less_than(options)
|
|
29
29
|
minimum_coverage = options[:minimum_coverage]
|
|
30
|
-
notify_level = options[:notify_level] || :
|
|
30
|
+
notify_level = options[:notify_level] || :fail
|
|
31
31
|
current_coverage = @current_coverage
|
|
32
32
|
if current_coverage < minimum_coverage
|
|
33
33
|
notify_message = "Total coverage is #{current_coverage} and is less than minimum: #{minimum_coverage}%"
|
|
@@ -58,7 +58,8 @@ class DangerXccovSummary < Plugin
|
|
|
58
58
|
# Total coverage of the project
|
|
59
59
|
|
|
60
60
|
def calculate_total_coverage
|
|
61
|
-
|
|
61
|
+
file = `find "#{@build_directory}" -name "action.xccovreport"`
|
|
62
|
+
result = `xcrun xccov view #{file} --json`
|
|
62
63
|
coverage_report = JSON.parse(result)
|
|
63
64
|
@current_coverage = (coverage_report['lineCoverage'] * 100).round(2)
|
|
64
65
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: danger-xccov_summary
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Taylor Ledingham
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-10-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: danger-plugin-api
|
|
@@ -177,7 +177,7 @@ files:
|
|
|
177
177
|
- pkg/danger-xccov_summary-0.0.1.gem
|
|
178
178
|
- spec/spec_helper.rb
|
|
179
179
|
- spec/xccov_summary_spec.rb
|
|
180
|
-
homepage: https://github.hootops.com/
|
|
180
|
+
homepage: https://github.hootops.com/ios/danger-xccov_summary
|
|
181
181
|
licenses:
|
|
182
182
|
- MIT
|
|
183
183
|
metadata: {}
|