Class: DiffTest::ProjectVersionHashComputer

Inherits:
Object
  • Object
show all
Defined in:
lib/diff_test/project_version_hash_computer.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.computeObject



5
6
7
# File 'lib/diff_test/project_version_hash_computer.rb', line 5

def self.compute
  new.compute
end

Instance Method Details

#computeObject



9
10
11
12
13
14
15
# File 'lib/diff_test/project_version_hash_computer.rb', line 9

def compute
  string = file_paths_to_use.map do |file_path|
    [file_path, XXhash.xxh64_file(Helper.expand_path(file_path))]
  end.sort_by(&:first).to_json

  Digest::SHA256.hexdigest(string)
end