-
-
Save woodie/280494 to your computer and use it in GitHub Desktop.
Gem Versions and Dates
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
require "date" | |
puts "appengine gem versions: #{Time.now}" | |
cmd = "gem list | grep appengine" | |
#puts cmd | |
gems = `#{cmd}`.split("\n").collect{|v| v.strip }.sort | |
gems.each do |gem| | |
if gem =~ /^(\S+) \((.+)\)$/ | |
name = $1 | |
versions = $2.split(",").collect{|v| v.strip }.sort | |
puts "#{name}" | |
versions.each do |version| | |
cmd = "gem specification #{name} -v #{version} | grep date:" | |
#puts cmd | |
date = Date.parse(`#{cmd}`[/(\d\d\d\d-\d\d-\d\d)/, 1]) | |
puts " %-12s %s" % [version, date.strftime("%Y-%m-%d")] | |
end | |
end | |
end | |
% sudo ruby gae_jruby_versions.rb | |
appengine gem versions: Mon Jan 18 14:51:51 +0900 2010 | |
appengine-jruby-jars | |
0.0.6 2009-12-21 | |
0.0.7.pre 2009-12-15 | |
appengine-rack | |
0.0.6 2009-12-21 | |
appengine-sdk | |
1.3.0 2009-12-15 | |
appengine-tools | |
0.0.8 2010-01-16 | |
google-appengine | |
0.0.7 2009-12-21 | |
0.0.8 2010-01-15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment