deep-cover 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f0f483efa4fbc22b80dad48ab7bee0a82e0c48c2f79508723e5d0a89fa19d39
4
- data.tar.gz: 37f8cace88d169de91b2ca286f7f4cb7b52daea3054f3f600ef7b166fa221cdf
3
+ metadata.gz: aa11b5cdaa74cf36656825a8d9162a7e24ae029319afd4e2ccde793c812599f0
4
+ data.tar.gz: 1f16d8335f27207b2dc73bae46512965215d43e87447daf767503835de509b36
5
5
  SHA512:
6
- metadata.gz: 8d6734d45c4fd9a4f13a2bd4ad8b156efa857696f76da3675d8513001192929219c3c3b7ded6404792fc6a45fafd7a9c395510be27e1cf07e8e030621c5c78d9
7
- data.tar.gz: 7df04c6ac58b29b7e47d43b0a97587d74113981a06a987565a251830885bd8265539b913078e98fa24f7d932a36bae3ac5bf0660782991e57e973261a0c4bc50
6
+ metadata.gz: 22106125426a89f0c00d8fd715e484e350ae9e631508b607f4eacdd6678b2bf5a92cd58c0f6df3ffa15f70114196fc7851fac253e1594cb09db638bbed682bb3
7
+ data.tar.gz: 1bd1e4163c2c5c3faf31c4e8355288cbd16d30b4b0a4d06f125f4d68efa9627c854e28713dd5feef186f2d28a2ff8c5ac8214ec908e7f00d461f30f5a9b91a5c
@@ -2,6 +2,10 @@
2
2
 
3
3
  * We now officially support JRuby. Our test-suite passes with it.
4
4
 
5
+ ## 1.1.0
6
+
7
+ * Add `--minimum-coverage` option [#73]
8
+
5
9
  ## 1.0.0
6
10
 
7
11
  * `deep-cover run-expression` accepts STDIN
@@ -8,6 +8,7 @@ module DeepCover
8
8
  option '--output', desc: 'output folder', type: :string, default: DeepCover.config.output, aliases: '-o'
9
9
  option '--reporter', desc: 'reporter to use', type: :string, default: DeepCover.config.reporter
10
10
  option '--open', desc: 'open the output coverage', type: :boolean, default: CLI_DEFAULTS[:open]
11
+ option '--minimum-coverage', desc: 'minimum coverage percent', type: :numeric, default: 0
11
12
 
12
13
  def clone(*command_parts)
13
14
  if command_parts.empty?
@@ -12,6 +12,7 @@ module DeepCover
12
12
  option '--output', desc: 'output folder', type: :string, default: DeepCover.config.output, aliases: '-o'
13
13
  option '--reporter', desc: 'reporter to use', type: :string, default: DeepCover.config.reporter
14
14
  option '--open', desc: 'open the output coverage', type: :boolean, default: CLI_DEFAULTS[:open]
15
+ option '--minimum-coverage', desc: 'minimum coverage percent', type: :numeric, default: 0
15
16
 
16
17
  def exec(*command_parts)
17
18
  if command_parts.empty?
@@ -6,9 +6,17 @@ module DeepCover
6
6
  option '--output', desc: 'output folder', type: :string, default: DeepCover.config.output, aliases: '-o'
7
7
  option '--reporter', desc: 'reporter to use', type: :string, default: DeepCover.config.reporter
8
8
  option '--open', desc: 'open the output coverage', type: :boolean, default: CLI_DEFAULTS[:open]
9
+ option '--minimum-coverage', desc: 'minimum coverage percent', type: :numeric, default: 0
9
10
  def report
10
11
  coverage = Coverage.load
11
12
  puts coverage.report(**processed_options)
13
+
14
+ overall_coverage = coverage.analysis.overall
15
+ minimum_coverage = processed_options[:'minimum-coverage'].to_f
16
+ if overall_coverage < minimum_coverage
17
+ puts "Overall coverage #{format('%.2f', overall_coverage)} is less than minimum #{format('%.2f', minimum_coverage)}"
18
+ exit 1
19
+ end
12
20
  end
13
21
  end
14
22
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deep-cover
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc-André Lafortune
8
8
  - Maxime Lapointe
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-06-01 00:00:00.000000000 Z
12
+ date: 2021-01-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: deep-cover-core
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 1.0.0
20
+ version: 1.1.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 1.0.0
27
+ version: 1.1.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: highline
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -199,7 +199,7 @@ homepage: https://github.com/deep-cover/deep-cover
199
199
  licenses:
200
200
  - MIT
201
201
  metadata: {}
202
- post_install_message:
202
+ post_install_message:
203
203
  rdoc_options: []
204
204
  require_paths:
205
205
  - lib
@@ -214,8 +214,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
214
  - !ruby/object:Gem::Version
215
215
  version: '0'
216
216
  requirements: []
217
- rubygems_version: 3.1.2
218
- signing_key:
217
+ rubygems_version: 3.1.4
218
+ signing_key:
219
219
  specification_version: 4
220
220
  summary: In depth coverage of your Ruby code.
221
221
  test_files: []