Created
April 23, 2010 15:25
-
-
Save wildfalcon/376673 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Compares to Bundler lock files and prints a report | |
#of which gems have changed version | |
require "yaml" | |
old = YAML.load_file("Gemfile.lock.old") | |
current = YAML.load_file("Gemfile.lock") | |
old['specs'].each do |elem| | |
elem.each do |name, details| | |
old_name = name | |
old_version = details['version'] | |
current_gem = current['specs'].detect{|e| e.keys.first==old_name} | |
current_version = current_gem[old_name]['version'] | |
puts "#{old_name} changed from #{old_version} to #{current_version}" unless old_version==current_version | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment