Sha256: 8aac2f75228e7ae31a9d86da233f84ed7644087c68a7889c95c852e12dfded56
Contents?: true
Size: 637 Bytes
Versions: 8
Compression:
Stored size: 637 Bytes
Contents
# Copyright 2019 Grabtaxi Holdings PTE LTE (GRAB), All rights reserved. # Use of this source code is governed by an MIT-style license that can be found in the LICENSE file require "digest/md5" class FolderChecksum def self.git_checksum(dir) checksum_of_files(`git ls-files #{dir}`.split("\n")) rescue => e Pod::UI.warn "Cannot get checksum of tracked files under #{dir}: #{e}" checksum_of_files(Dir["#{dir}/**/*"].reject { |f| File.directory?(f) }) end def self.checksum_of_files(files) checksums = files.sort.map { |f| Digest::MD5.hexdigest(File.read(f)) } Digest::MD5.hexdigest(checksums.join) end end
Version data entries
8 entries across 8 versions & 1 rubygems