danger-xcov 0.1 → 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/lib/danger_plugin.rb +26 -20
- data/lib/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: 909e562c5f3c0b1b9a49c0e30c18dcd8061effcc
|
4
|
+
data.tar.gz: 0f3a1953399fd33461a4bba59ed1212e26a18361
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14d37744f7110882ee57084aa474f5e917b01b382189ede8c7bc59470253016691b383aead45e198dd146a93d6f92b9bccb4a416cf61917792728056b7f5fc11
|
7
|
+
data.tar.gz: aabcec98ba42f1e2cfd03ec6a76e5d3c3eddb19803170cc7981674afe163ba0a39af6ca47d80954ad92c6881bed98b97d40578e671ee7c30ad90b496b82032ed
|
data/lib/danger_plugin.rb
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
module Danger
|
2
|
+
# Validates the code coverage of the files changed within a Pull Request and
|
3
|
+
# generates a brief coverage report.
|
4
|
+
#
|
5
|
+
# @example Validating code coverage for EasyPeasy (easy-peasy.io)
|
6
|
+
#
|
7
|
+
# xcov.report(
|
8
|
+
# scheme: 'EasyPeasy',
|
9
|
+
# workspace: 'Example/EasyPeasy.xcworkspace',
|
10
|
+
# exclude_targets: 'Demo.app',
|
11
|
+
# minimum_coverage_percentage: 90
|
12
|
+
# )
|
13
|
+
#
|
14
|
+
# # Checks the coverage for the EasyPeasy scheme within the specified
|
15
|
+
# workspace, ignoring the target 'Demo.app' and setting a minimum
|
16
|
+
# coverage percentage of 90%.
|
17
|
+
# The result is sent to the pull request with a markdown format and
|
18
|
+
# notifies failure if the minimum coverage threshold is not reached.
|
19
|
+
#
|
20
|
+
# @tags xcode, coverage, xccoverage, tests, ios, xcov
|
2
21
|
class DangerXcov < Plugin
|
3
|
-
|
4
22
|
# Validates the code coverage of the files changed within a Pull Request.
|
5
|
-
# This method accepts the same arguments
|
6
|
-
#
|
7
|
-
# @example Validating code coverage for EasyPeasy (easy-peasy.io)
|
8
|
-
#
|
9
|
-
# xcov.report(
|
10
|
-
# scheme: 'EasyPeasy',
|
11
|
-
# workspace: 'Example/EasyPeasy.xcworkspace',
|
12
|
-
# exclude_targets: 'Demo.app',
|
13
|
-
# minimum_coverage_percentage: 90
|
14
|
-
# )
|
15
|
-
#
|
16
|
-
# # Checks the coverage for the EasyPeasy scheme within the specified
|
17
|
-
# workspace, ignoring the target 'Demo.app' and setting a minimum
|
18
|
-
# coverage percentage of 90%.
|
19
|
-
# The result is sent to the pull request with a markdown format and
|
20
|
-
# notifies failure if the minimum coverage threshold is not reached.
|
23
|
+
# This method accepts the same arguments allowed by the xcov gem.
|
21
24
|
#
|
22
|
-
# @
|
23
|
-
#
|
25
|
+
# @param Hash{Symbol => String} parameters
|
26
|
+
# This method accepts the same arguments accepted by the xcov gem.
|
27
|
+
# A complete list of parameters allowed is available here:
|
28
|
+
# https://github.com/nakiostudio/xcov
|
29
|
+
# @return [void]
|
24
30
|
def report(*args)
|
25
31
|
# Check xcov availability, install it if needed
|
26
|
-
|
32
|
+
`gem install xcov` unless xcov_available
|
27
33
|
unless xcov_available
|
28
34
|
puts "xcov is not available on this machine"
|
29
35
|
return
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-xcov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.1.1
|
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-06-
|
11
|
+
date: 2016-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger
|