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 +4 -4
- data/lib/coverband/configuration.rb +4 -6
- data/lib/coverband/version.rb +1 -1
- data/test/coverband/utils/file_groups_test.rb +10 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b36c74e7000d8cd20c424fff66e2de35be821c440fbaf54be18b81e2e8de48d1
|
|
4
|
+
data.tar.gz: b459fd5abde8bdb4cb5283e9512ccc8a25e61d98fd6bb678d16854273f8df1a0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
#
|
|
118
|
-
#
|
|
119
|
-
#
|
|
120
|
-
|
|
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
|
#
|
data/lib/coverband/version.rb
CHANGED
|
@@ -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 = '
|
|
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 "
|
|
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
|
|