danger-xcov 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/danger_plugin.rb +20 -24
  3. data/lib/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 909e562c5f3c0b1b9a49c0e30c18dcd8061effcc
4
- data.tar.gz: 0f3a1953399fd33461a4bba59ed1212e26a18361
3
+ metadata.gz: 20f5529b60f8603998fd838557eb9560772ea150
4
+ data.tar.gz: aa89001c547cb4c8579fa98eff8210c3fc61ba8d
5
5
  SHA512:
6
- metadata.gz: 14d37744f7110882ee57084aa474f5e917b01b382189ede8c7bc59470253016691b383aead45e198dd146a93d6f92b9bccb4a416cf61917792728056b7f5fc11
7
- data.tar.gz: aabcec98ba42f1e2cfd03ec6a76e5d3c3eddb19803170cc7981674afe163ba0a39af6ca47d80954ad92c6881bed98b97d40578e671ee7c30ad90b496b82032ed
6
+ metadata.gz: 838e8b5c83672cbe53a84951fc700729a1006d21edede8bc63a5a59dbdeb80c7c4c1fbb9844ab243b845bb29ecb7aaac69e9803bac4ba93930b59e7015ff680d
7
+ data.tar.gz: 445c2c1b0c77514e5de9d8986b6594352b9ec4ac8c520d9ea1400fc04602c5cba444a217a925215963302a081fd33554c8f6a754695d765d0546d0d5e610e238
data/lib/danger_plugin.rb CHANGED
@@ -4,33 +4,37 @@ module Danger
4
4
  #
5
5
  # @example Validating code coverage for EasyPeasy (easy-peasy.io)
6
6
  #
7
- # xcov.report(
8
- # scheme: 'EasyPeasy',
9
- # workspace: 'Example/EasyPeasy.xcworkspace',
10
- # exclude_targets: 'Demo.app',
11
- # minimum_coverage_percentage: 90
12
- # )
7
+ # # Checks the coverage for the EasyPeasy scheme within the specified
8
+ # # workspace, ignoring the target 'Demo.app' and setting a minimum
9
+ # # coverage percentage of 90%.
10
+ #
11
+ # # The result is sent to the pull request with a markdown format and
12
+ # # notifies failure if the minimum coverage threshold is not reached.
13
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.
14
+ # xcov.report(
15
+ # scheme: 'EasyPeasy',
16
+ # workspace: 'Example/EasyPeasy.xcworkspace',
17
+ # exclude_targets: 'Demo.app',
18
+ # minimum_coverage_percentage: 90
19
+ # )
19
20
  #
20
21
  # @tags xcode, coverage, xccoverage, tests, ios, xcov
22
+ # @see nakiostudio/EasyPeasy
23
+ #
21
24
  class DangerXcov < Plugin
22
25
  # Validates the code coverage of the files changed within a Pull Request.
23
26
  # This method accepts the same arguments allowed by the xcov gem.
24
27
  #
25
- # @param Hash{Symbol => String} parameters
28
+ # @param args Hash{Symbol => String}
26
29
  # This method accepts the same arguments accepted by the xcov gem.
27
30
  # A complete list of parameters allowed is available here:
28
31
  # https://github.com/nakiostudio/xcov
29
32
  # @return [void]
33
+ #
30
34
  def report(*args)
31
35
  # Check xcov availability, install it if needed
32
- `gem install xcov` unless xcov_available
33
- unless xcov_available
36
+ `gem install xcov` unless xcov_available?
37
+ unless xcov_available?
34
38
  puts "xcov is not available on this machine"
35
39
  return
36
40
  end
@@ -65,18 +69,10 @@ module Danger
65
69
  end
66
70
  end
67
71
 
68
- # Class methods
69
-
70
- # Brief description of the plugin
71
- # @return [String]
72
- def self.description
73
- "Danger plugin to validate the code coverage of the files changed"
74
- end
75
-
76
72
  # Aux methods
77
73
 
78
74
  # Checks whether xcov is available
79
- def xcov_available
75
+ def xcov_available?
80
76
  `which xcov`.split("/").count > 1
81
77
  end
82
78
 
@@ -90,7 +86,7 @@ module Danger
90
86
  report
91
87
  end
92
88
 
93
- private :xcov_available, :process_report
89
+ private :xcov_available?, :process_report
94
90
 
95
91
  end
96
92
  end
data/lib/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module DangerXcov
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  DESCRIPTION = "Danger plugin to validate the code coverage of the files changed"
4
4
  end
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: 0.1.1
4
+ version: 0.1.2
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-26 00:00:00.000000000 Z
11
+ date: 2016-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: danger