Skip to content

Commit

Permalink
Merge branch 'md5-compatability'
Browse files Browse the repository at this point in the history
  • Loading branch information
yob committed Jun 23, 2013
2 parents 4622127 + deb2ac3 commit 33957b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Rakefile
Expand Up @@ -6,6 +6,7 @@ require 'yaml'
require 'rake'
require 'rdoc/task'
require 'rspec/core/rake_task'
require 'digest/md5'

# Cane requires ripper, which appears to only work on MRI 1.9
if RUBY_VERSION >= "1.9" && RUBY_ENGINE == "ruby"
Expand Down Expand Up @@ -56,7 +57,7 @@ task :integrity_yaml do
path_without_spec = path.gsub("spec/","")
data[path_without_spec] = {
:bytes => File.size(path),
:md5 => `md5sum "#{path}"`.split.first
:md5 => Digest::MD5.hexdigest(File.read(path))
} if File.file?(path)
end
File.open("spec/integrity.yml","wb") { |f| f.write YAML.dump(data)}
Expand Down

0 comments on commit 33957b5

Please sign in to comment.