cider_ci-support 1.0.0.pre.beta.4 → 1.0.0.pre.beta.5

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
  SHA1:
3
- metadata.gz: 7cd56b168f3ede1ddada598b7abf7f1c22c5cf5f
4
- data.tar.gz: d2e62c1576f33c9691c195ed10398b9cbeafccaa
3
+ metadata.gz: 570bde0d1c9d86c081547af66bc02354095aef20
4
+ data.tar.gz: 6ac0f69b06273934b3404bb4907048e16838b896
5
5
  SHA512:
6
- metadata.gz: de45cea9237c07ca6b77f930114cf4b7c985b98760f697d9f51851b2d044da58e97321a7ba54c9a04d36d8ec89091ca0c3b5a911236079a22750d91c83ac457a
7
- data.tar.gz: a59857988e4f5c9e09ed96e8721f7debf07f75678893de7bcf7d73c181d500167345284319cf61ef5bd5c46dda334b563d725ccdbbf473669ffa7ef9503db136
6
+ metadata.gz: 2773f0bd645c1b29af27905e2cfeb3a3a97a2b427ad3c54c9b874540ac37bf38258946674dc91d8118b1b532c4183d6facedd6f5d11d538f056b9aa70f261067
7
+ data.tar.gz: b1cad79036a6c86b38fea9324c70191d9d3dc0df458c7f56f8a1ca5d722b72dfa6aab3bb39532bb3763d6ef75c9db2cfb3977d7d4afdb69cfcad0aa39bf015b9
@@ -23,7 +23,7 @@ require 'thread/pool'
23
23
  require 'mime/types'
24
24
  require 'open-uri'
25
25
 
26
- # require 'pry'
26
+ #require 'pry'
27
27
 
28
28
  ###############################################################################
29
29
  # Download from Cider-CI
@@ -189,8 +189,8 @@ def parse_options options
189
189
  options.upload= true
190
190
  end
191
191
 
192
- opts.on('-t', '--threshold',Integer) do |t|
193
- options.threshold= t
192
+ opts.on('-l', '--limit N', Integer) do |l|
193
+ options.limit= l
194
194
  end
195
195
 
196
196
  end.parse!
@@ -226,7 +226,7 @@ def main
226
226
  options.password= ENV['CIDER_CI_PASSWORD']
227
227
  options.api_url= ENV['CIDER_CI_API_URL']
228
228
  options.upload= false
229
- options.threshold= 90
229
+ options.limit= 90
230
230
  parse_options options
231
231
  options.api_url || raise(OptionParser::MissingArgument \
232
232
  , "api_url is required, set CIDER_CI_API_URL or provide -a option")
@@ -243,12 +243,12 @@ def main
243
243
  upload_as_tree_attachments root, tree_id
244
244
  end
245
245
 
246
- coverage= result.covered_lines / result.total_lines.to_f
246
+ coverage= (result.covered_lines / result.total_lines.to_f)
247
247
 
248
- if coverage < options.threshold/100.0
249
- Kernel.abort("coverage at #{(coverage * 100).round(2)}% is below threshold of #{options.threshold}% ")
248
+ if coverage < options.limit / 100.0
249
+ abort("FAILED coverage at #{(coverage * 100).round(2)}% is below limit of #{options.limit}% ")
250
250
  else
251
- Kernel.exit(0)
251
+ exit
252
252
  end
253
253
 
254
254
  end
@@ -1,5 +1,5 @@
1
1
  module Cider_CI
2
2
  module Support
3
- VERSION = "1.0.0-beta.4"
3
+ VERSION = "1.0.0-beta.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cider_ci-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.beta.4
4
+ version: 1.0.0.pre.beta.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Schank