class Pakyow::Support::PathVersion
Public Class Methods
build(*paths)
click to toggle source
Builds a version based on content at local paths.
# File lib/pakyow/support/path_version.rb, line 10 def self.build(*paths) paths.each_with_object(Digest::SHA1.new) { |path, digest| Dir.glob(File.join(path, "/**/*")).sort.each do |fullpath| if File.file?(fullpath) digest.update(Digest::SHA1.file(fullpath).to_s) end end }.to_s end