codecov 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/codecov.rb +10 -5
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cdd8c92464da131becf5bae150b12f4ae3513d84c7f77ba059ee771ee662eca4
4
- data.tar.gz: 592ed8f011c9e618aa2b71cf2c0ba7a9fb7a7ff1aa9ad80db72743f7f658cf24
3
+ metadata.gz: 0d552ab878cd45e8246a35a2535e30db5db427032fef0f50a2d65404b2f39592
4
+ data.tar.gz: cf43553c8aad22ddff422a6e5ac33b2787234e3a2a6c8c6974dee9c4839dc9fb
5
5
  SHA512:
6
- metadata.gz: ec4048e6ecb6c5780bfa1e4320a1edc177a5b96b6b2a3a7ba3a41416e5e1b40ea69e64d9cbeb58b920a566e9d3379244a4a21496500210adc9b51116325e5f0e
7
- data.tar.gz: 4564c29b679ea650270560c719a1a178c8ab2d65fa9157e7892f06d02855b01ef5dcfe6be35e7cd47a836bec72abb74c1dc36002d9c030344549f987df9d930f
6
+ metadata.gz: de09d13c2647752336f5ef3a9cae4306d057e2244a39cb9adbd410072255463200a58efe223b23155164a19be08fb9f3a619a890098b06c355e76dcaefe766fa
7
+ data.tar.gz: abba86de852c8f76df3ec4966cbf001337c389e46e84aef6604990c8af710c1c17f71d9561da5709c0535c9b9fc0f90d5e02037264cfc502b03489b751289c68
@@ -7,7 +7,7 @@ require 'simplecov'
7
7
  require 'zlib'
8
8
 
9
9
  class SimpleCov::Formatter::Codecov
10
- VERSION = '0.2.9'
10
+ VERSION = '0.2.10'
11
11
 
12
12
  ### CIs
13
13
  RECOGNIZED_CIS = [
@@ -319,6 +319,7 @@ class SimpleCov::Formatter::Codecov
319
319
  puts 'Error uploading coverage reports to Codecov. Sorry'
320
320
  puts e.class.name
321
321
  puts e
322
+ puts "Backtrace:\n\t#{e.backtrace}"
322
323
  return response
323
324
  end
324
325
 
@@ -414,7 +415,7 @@ class SimpleCov::Formatter::Codecov
414
415
  )
415
416
  req.body = report
416
417
  res = retry_request(req, https)
417
- if res.body == ''
418
+ if res&.body == ''
418
419
  {
419
420
  'uploaded' => true,
420
421
  'url' => reports_url,
@@ -425,7 +426,7 @@ class SimpleCov::Formatter::Codecov
425
426
  }.to_json
426
427
  else
427
428
  puts [black('-> '), 'Could not upload reports via v4 API, defaulting to v2'].join(' ')
428
- puts red(res.body)
429
+ puts red(res&.body || 'nil')
429
430
  nil
430
431
  end
431
432
  end
@@ -508,16 +509,20 @@ class SimpleCov::Formatter::Codecov
508
509
  ].freeze
509
510
 
510
511
  invalid_directories = [
511
- 'node_modules/'
512
+ 'node_modules/',
513
+ 'public/',
514
+ 'storage/',
515
+ 'tmp/'
512
516
  ]
513
517
 
514
518
  puts [green('==>'), 'Appending file network'].join(' ')
515
519
  network = []
516
520
  Dir['**/*'].keep_if do |file|
517
- if File.file?(file) && !file.end_with?(*invalid_file_types) && !file.include?(*invalid_directories)
521
+ if File.file?(file) && !file.end_with?(*invalid_file_types) && invalid_directories.none? { |dir| file.include?(dir) }
518
522
  network.push(file)
519
523
  end
520
524
  end
525
+
521
526
  network.push('<<<<<< network')
522
527
  network
523
528
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codecov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - codecov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-31 00:00:00.000000000 Z
11
+ date: 2020-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json