Skip to content

Instantly share code, notes, and snippets.

@raggi raggi/sha_compare.rb Secret
Created Jan 31, 2013

What would you like to do?
cf = open('rubygems-shas')
cf_list = { |l| l.split(/\s+/) }
cf_sums = Hash[! { |sum, n| [File.basename(n), sum] }]
db = open('drbrain-shas')
db_list = { |l| l.split(/\s+/) }
db_sums = Hash[! { |sum, n| [File.basename(n), sum] }]
cf_sums.each do |name, sum|
db_sum = db_sums[name]
puts "Missing : #{name}" unless db_sum
puts "Mismatch: #{name}" unless db_sum == sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.