Top Level Namespace

Defined Under Namespace

Modules: Kybus

Instance Method Summary collapse

Instance Method Details

#calculate_md5(file_path) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/kybus/aws/lambda.rb', line 5

def calculate_md5(file_path)
  md5 = Digest::MD5.new
  File.open(file_path, 'rb') do |file|
    buffer = String.new
    md5.update(buffer) while file.read(4096, buffer)
  end
  md5.hexdigest
end