Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EXPERIMENTAL] Bring back gem tracking #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/coverband/collectors/delta.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def results
def self.reset
@@previous_coverage = {}
@@project_directory = File.expand_path(Coverband.configuration.root)
@@project_directories = Coverband.configuration.all_root_paths.map { |path| File.expand_path(path) }
@@ignore_patterns = Coverband.configuration.ignore
end

Expand All @@ -55,7 +56,7 @@ def generate
# would slow down the performance.
###
next unless @@ignore_patterns.none? { |pattern| file.match(pattern) } &&
file.start_with?(@@project_directory)
@@project_directories.any? { |path| file.start_with?(path) }

# This handles Coverage branch support, setup by default in
# simplecov 0.18.x
Expand Down
4 changes: 2 additions & 2 deletions lib/coverband/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ def current_root
def all_root_paths
return @all_root_paths if @all_root_paths

@all_root_paths = Coverband.configuration.root_paths.dup
@all_root_paths << "#{Coverband.configuration.current_root}/"
@all_root_paths = ["#{Coverband.configuration.current_root}/"]
@all_root_paths += Coverband.configuration.root_paths
@all_root_paths
end

Expand Down
Loading