coverband 4.2.6 → 4.2.7.rc.1

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: 7095ca0ee73eff7b4290c508df1c6c6961ed1283ce2edcca085cf3f05e12bb9d
4
- data.tar.gz: e0fc00dc886a0153b3c6887680a86ffee9e13666e5dce3bbe7bc551b249d5734
3
+ metadata.gz: 68ea5d4222b92fe692d530b929c52d6da5b1c01d710f06bf92d53ea5515e6cba
4
+ data.tar.gz: 29eb1a2764bd507c7da2376e8566270f581f16ff22d79cb645a5075f59ccdda0
5
5
  SHA512:
6
- metadata.gz: 4df21534042791528184de6f65548e48ac4a8d06905c815977376b6d3f815eaf121d5117d2e4af4c53b3a46a8122fc32ea3a9c2a1072219d76231f3acf8c530a
7
- data.tar.gz: 64f75a91aafb5fd7fa945bde6bbe8b9262f79f90faaa17108743ab480bc3a369a3471225d616144024ca7db0010db219806894ace62dea3cb25941396532a535
6
+ metadata.gz: '07931a21e9b83879d81936059173ea3c5c64671d2fafddefa7d0cee8aca02b319352a6ea3cf8786322977581a37a52be95775091bab9367265d4d82502ad5fcf'
7
+ data.tar.gz: 9d77db00ad0f025b620969840747b7c3774d636ea23c0caf47789a06c1e2c72762a5a2aee53c73c4602840504eacd1d47f6261938b652ef7ed055882cf463869
data/README.md CHANGED
@@ -381,6 +381,22 @@ Note: To debug issues getting Coverband working. I recommend running in developm
381
381
 
382
382
  If you are trying to debug locally wondering what code is being run during a request. The verbose modes `config.verbose = true` && `Rails.logger.level = :debug`. With true set it will output the number of lines executed per file, to the passed in log.
383
383
 
384
+ ### Solving: stack level too deep errors
385
+
386
+ If you start seeing SystemStackError: stack level too deep errors from background jobs after installing Coverband, this means there is another patch for ResqueWorker that conflicts with Coverband's patch in your application. To fix this, change coverband gem line in your Gemfile to the following:
387
+
388
+ ```
389
+ gem 'coverband', require: ['alternative_coverband_patch', 'coverband']
390
+ ```
391
+
392
+ If you currently have require: false, remove the 'coverband' string from the require array above so the gem line becomes like this:
393
+
394
+ ```
395
+ gem 'coverband', require: ['alternative_coverband_patch']
396
+ ```
397
+
398
+ This conflict happens when a ruby method is patched twice, once using module prepend, and once using method aliasing. See this ruby issue for details. The fix is to apply all patches the same way. Coverband by default will apply its patch using prepend, but you can change that to method aliasing by adding require: ['alternative_coverband_patch'] to the gem line as shown above.
399
+
384
400
  # Prerequisites
385
401
 
386
402
  - Coverband 3.0.X+ requires Ruby 2.3+
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Coverband
4
+ COVERBAND_ALTERNATE_PATCH = true
5
+ end
@@ -40,7 +40,7 @@ module Coverband
40
40
  # Heroku when building assets runs code from a dynamic directory
41
41
  # /tmp was added to avoid coverage from /tmp/build directories during
42
42
  # heroku asset compilation
43
- IGNORE_DEFAULTS = %w[vendor/ .erb$ .slim$ /tmp internal:prelude schema.rb]
43
+ IGNORE_DEFAULTS = %w[vendor/ .erb$ .slim$ /tmp internal:prelude db/schema.rb]
44
44
 
45
45
  # Add in missing files which were never loaded
46
46
  # we need to know what all paths to check for unloaded files
@@ -22,4 +22,16 @@ module Coverband
22
22
  end
23
23
  end
24
24
 
25
- Resque::Job.prepend(Coverband::ResqueWorker)
25
+ if defined?(Coverband::COVERBAND_ALTERNATE_PATCH)
26
+ Resque::Job.class_eval do
27
+ def perform_with_coverband
28
+ perform_without_coverband
29
+ ensure
30
+ Coverband.report_coverage
31
+ end
32
+ alias_method perform_without_coverband perform
33
+ alias_method perform perform_with_coverband
34
+ end
35
+ else
36
+ Resque::Job.prepend(Coverband::ResqueWorker)
37
+ end
@@ -5,5 +5,5 @@
5
5
  # use format '4.2.1.rc.1' ~> 4.2.1.rc to prerelease versions like v4.2.1.rc.2 and v4.2.1.rc.3
6
6
  ###
7
7
  module Coverband
8
- VERSION = '4.2.6'
8
+ VERSION = '4.2.7.rc.1'
9
9
  end
@@ -16,9 +16,9 @@ class BaseTest < Minitest::Test
16
16
  end
17
17
  end
18
18
 
19
- test 'ignore works with equal' do
20
- coverband = Coverband::Collectors::Coverage.instance.reset_instance
21
- expected = ['vendor/', '.erb$', '.slim$', '/tmp', 'internal:prelude', 'schema.rb', 'config/envionments']
19
+ test "ignore works with equal" do
20
+ Coverband::Collectors::Coverage.instance.reset_instance
21
+ expected = ["vendor/", ".erb$", ".slim$", "/tmp", "internal:prelude", "db/schema.rb", "config/envionments"]
22
22
  assert_equal expected, Coverband.configuration.ignore
23
23
  end
24
24
 
@@ -26,15 +26,15 @@ class BaseTest < Minitest::Test
26
26
  Coverband.configure do |config|
27
27
  config.ignore += ['config/initializers']
28
28
  end
29
- coverband = Coverband::Collectors::Coverage.instance.reset_instance
30
- expected = ['vendor/',
31
- '.erb$',
32
- '.slim$',
33
- '/tmp',
34
- 'internal:prelude',
35
- 'schema.rb',
36
- 'config/envionments',
37
- 'config/initializers']
29
+ Coverband::Collectors::Coverage.instance.reset_instance
30
+ expected = ["vendor/",
31
+ ".erb$",
32
+ ".slim$",
33
+ "/tmp",
34
+ "internal:prelude",
35
+ "db/schema.rb",
36
+ "config/envionments",
37
+ "config/initializers"]
38
38
  assert_equal expected, Coverband.configuration.ignore
39
39
  end
40
40
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coverband
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.6
4
+ version: 4.2.7.rc.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Mayer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-06-29 00:00:00.000000000 Z
12
+ date: 2020-07-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk-s3
@@ -271,6 +271,7 @@ files:
271
271
  - changes.md
272
272
  - config.ru
273
273
  - coverband.gemspec
274
+ - lib/alternative_coverband_patch.rb
274
275
  - lib/coverband.rb
275
276
  - lib/coverband/adapters/base.rb
276
277
  - lib/coverband/adapters/file_store.rb
@@ -451,9 +452,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
451
452
  version: '0'
452
453
  required_rubygems_version: !ruby/object:Gem::Requirement
453
454
  requirements:
454
- - - ">="
455
+ - - ">"
455
456
  - !ruby/object:Gem::Version
456
- version: '0'
457
+ version: 1.3.1
457
458
  requirements: []
458
459
  rubygems_version: 3.0.3
459
460
  signing_key: