Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Commit ea9a15f

Browse files
committed
Merge pull request #4 from codacy/file-path
File path relative to Git directory
2 parents 65e3fd8 + 8c37717 commit ea9a15f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

codacy-coverage.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
1414
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
1515
gem.name = "codacy-coverage"
1616
gem.require_paths = ["lib"]
17-
gem.version = '0.2.1'
17+
gem.version = '0.2.2'
1818

1919
gem.required_ruby_version = '>= 1.9.2'
2020

lib/codacy/git.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def self.git_commit
1818
end
1919

2020
def self.git_dir
21-
return `git rev-parse --show-toplevel`
21+
return `git rev-parse --show-toplevel`.strip!
2222
end
2323

2424
def self.git(command)

lib/codacy/parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module Codacy
22
module Parser
33

44
def self.parse_file(simplecov_result)
5-
project_dir = Dir.pwd
5+
project_dir = Codacy::Git.git_dir
66

77
logger.info("Parsing simplecov result to Codacy format...")
88
logger.debug(simplecov_result.original_result)

0 commit comments

Comments
 (0)