Skip to content

Commit

Permalink
Merge pull request #565 from alfredofernandes/debug-logging
Browse files Browse the repository at this point in the history
Fix coverage_file.source_file_pathname
  • Loading branch information
ksuther authored Jul 29, 2024
2 parents 9f2de83 + dd25ac3 commit 5467afc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/slather/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def create_coverage_files(binary_path, path_objects)
if paths_to_segments.key?(coverage_file.source_file_pathname)
coverage_file.segments = paths_to_segments[coverage_file.source_file_pathname]
end
!coverage_file.ignored? && coverage_file.include_file? ? coverage_file : nil
coverage_file.source_file_pathname && !coverage_file.ignored? && coverage_file.include_file? ? coverage_file : nil
end.compact
end
private :create_coverage_files
Expand Down Expand Up @@ -651,7 +651,7 @@ def matches_arch(binary_path)

def find_source_files
source_files = load_option_array("source_files")
return if source_files.nil?
return [] if source_files.nil?

current_dir = Pathname("./").realpath
paths = source_files.flat_map { |pattern| Dir.glob(pattern) }.uniq
Expand Down
4 changes: 2 additions & 2 deletions slather.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# coding: utf-8
# encoding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'slather/version'
Expand All @@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
spec.homepage = 'https://github.com/SlatherOrg/slather'
spec.license = 'MIT'

spec.files = `git ls-files -z`.split("\x0")
spec.files = `git ls-files -z`.force_encoding('utf-8').split("\x0")
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']
Expand Down

0 comments on commit 5467afc

Please sign in to comment.