class CodeClimate::TestReporter::CalculateBlob

def calculate_with_file

def calculate_with_file
  File.open(@file_path, "rb") do |file|
    header = "blob #{file.size}\0"
    content = file.read
    store = header + content
    return Digest::SHA1.hexdigest(store)
  end
rescue EncodingError
  puts "WARNING: Unable to read #{@file_path}\nUsing git for blob calculation"
  nil
end