Sha256: cd3dcfb879f49d20f78a6f418542758d08e8cb80bf16092fcc081232c9099c55

Contents?: true

Size: 406 Bytes

Versions: 4

Compression:

Stored size: 406 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.checksum(dir)
    files = Dir["#{dir}/**/*"].reject { |f| File.directory?(f) }
    content = files.map { |f| File.read(f) }.join
    Digest::MD5.hexdigest(content).to_s
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cocoapods-binary-cache-0.1.5 lib/cocoapods-binary-cache/helper/checksum.rb
cocoapods-binary-cache-0.1.3 lib/cocoapods-binary-cache/helper/checksum.rb
cocoapods-binary-cache-0.1.2 lib/cocoapods-binary-cache/helper/checksum.rb
cocoapods-binary-cache-0.1.1 lib/cocoapods-binary-cache/helper/checksum.rb