fixed encoding problem with some repositories

This commit is contained in:
Tomasz Gieniusz 2012-10-24 15:59:49 +02:00
parent a801a2f02b
commit 116cc5a8f4

View file

@ -3,6 +3,11 @@ module GitStats
module GitData
class CommandRunner
def run(path, command)
execute(command, path).encode!('UTF-8', 'UTF-8', :invalid => :replace)
end
private
def execute(command, path)
Dir.chdir(path) { %x[#{command}] }
end
end