coverband 4.2.1.rc1 → 4.2.1.rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e20f401f319399c3eb6aab9f562105addeedd4dcea5e3de3db3e5a763e92fe5d
4
- data.tar.gz: bc20a849db5868dd73a448269bc9d74e6b58674793807bcdcf36a33cecd8825b
3
+ metadata.gz: b36c74e7000d8cd20c424fff66e2de35be821c440fbaf54be18b81e2e8de48d1
4
+ data.tar.gz: b459fd5abde8bdb4cb5283e9512ccc8a25e61d98fd6bb678d16854273f8df1a0
5
5
  SHA512:
6
- metadata.gz: 5f2303765376cd244a692d1254ef8f7fe57180ee12712d3763921811c7d278fb3ffb2dfa4a1400b86b01809c0acfa8173c7569aeb65be3f860e53dad01dfbc83
7
- data.tar.gz: c3456663cc5b9f9ecfce60603234f4aed32ef9f3875cb0ca60ae11e66211f70bb64c6f0b8772b5295c8065d4d8245f107d596cd21140ba7ab146c97ef8353324
6
+ metadata.gz: 0e906b9c7e280e18b10e5c852199fb379600642c50bb566d678ea17ca2633ced35fc5d184ac93665c5c7eecc80ca0ee49cac161ff0dda06f66cc81b626031722
7
+ data.tar.gz: f59cb2a359a719837577ba143c60f6ad1e16fe12272c34843d8a0b9c030ab4030afc32343e3d3bbad6804f1f326e47f81cddc7c84e913a14f173c2bb9652c507
@@ -114,12 +114,10 @@ module Coverband
114
114
  @ignore << 'vendor/ruby-*' unless @ignore.include?('vendor/ruby-*')
115
115
  add_group('App', root)
116
116
  # TODO: rework support for multiple gem paths
117
- # currently this supports GEM_HOME (which should be first path)
118
- # but various gem managers setup multiple gem paths
119
- # gem_paths.each_with_index do |path, index|
120
- # add_group("gems_#{index}", path)
121
- # end
122
- add_group('Gems', gem_paths.first)
117
+ # this works but seems hacky and error prone
118
+ # basically since it is converted to a regex we join all the paths
119
+ # with a regex 'OR' using '|'
120
+ add_group('Gems', gem_paths.join('|'))
123
121
  end
124
122
 
125
123
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Coverband
4
- VERSION = '4.2.1.rc1'
4
+ VERSION = '4.2.1.rc2'
5
5
  end
@@ -3,16 +3,18 @@
3
3
  require File.expand_path('../../test_helper', File.dirname(__FILE__))
4
4
 
5
5
  describe Coverband::Utils::FileGroups do
6
- FAKE_GEM_PATH = 'fake/gem/path'
6
+ FAKE_GEM_PATH = '/Users/danmayer/.rvm/gems/ruby-2.6.2/gems'
7
+ SECONDAY_GEM_PATH = '/Users/danmayer/.rvm/rubies/ruby-2.6.2/lib/ruby/gems/2.6.0/gems'
7
8
  subject do
8
9
  controller_lines = [nil, 2, 2, 0, nil, nil, 0, nil, nil, nil]
9
10
  files = [
10
11
  Coverband::Utils::SourceFile.new(source_fixture('sample.rb'), [nil, 1, 1, 1, nil, nil, 1, 1, nil, nil]),
11
12
  Coverband::Utils::SourceFile.new(source_fixture('app/models/user.rb'), [nil, 1, 1, 1, nil, nil, 1, 0, nil, nil]),
12
13
  Coverband::Utils::SourceFile.new(source_fixture('app/controllers/sample_controller.rb'), controller_lines),
13
- Coverband::Utils::SourceFile.new("#{FAKE_GEM_PATH}/gem_name.rb", controller_lines)
14
+ Coverband::Utils::SourceFile.new("#{FAKE_GEM_PATH}/gem_name-1.0.0/gem_name.rb", controller_lines),
15
+ Coverband::Utils::SourceFile.new("#{SECONDAY_GEM_PATH}/gem_two_name-1.1.1/gem_two.rb", controller_lines)
14
16
  ]
15
- Coverband.configuration.expects(:gem_paths).at_least_once.returns([FAKE_GEM_PATH])
17
+ Coverband.configuration.expects(:gem_paths).at_least_once.returns([FAKE_GEM_PATH, SECONDAY_GEM_PATH])
16
18
  Coverband.configuration.track_gems = true
17
19
  Coverband::Utils::FileGroups.new(files)
18
20
  end
@@ -22,7 +24,11 @@ describe Coverband::Utils::FileGroups do
22
24
  end
23
25
 
24
26
  it 'has gem files' do
25
- assert_equal "#{FAKE_GEM_PATH}/gem_name.rb", subject.grouped_results['Gems'].first.first.short_name
27
+ assert_equal "gem_name-1.0.0", subject.grouped_results['Gems'].first.first.gem_name
28
+ end
29
+
30
+ it 'has gem files from secondary gem paths' do
31
+ assert_equal "gem_two_name-1.1.1", subject.grouped_results['Gems'][1].first.gem_name
26
32
  end
27
33
  end
28
34
 
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.1.rc1
4
+ version: 4.2.1.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Mayer