Created
September 1, 2010 21:34
-
-
Save copiousfreetime/561408 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env ruby | |
# Usage: | |
# | |
# gt-or-eq.rb hitimes-1.0.4 | |
# | |
require 'open-uri' | |
require 'rubygems' | |
base_url = "http://rubygems.org/quick/Marshal.4.8" | |
gem = ARGV.shift | |
begin | |
marshal_z = open("#{base_url}/#{gem}.gemspec.rz").read | |
marshal = Gem.inflate( marshal_z ) | |
spec = Marshal.load( marshal ) | |
spec.dependencies.each do |dep| | |
dep.requirement.requirements.each do |req| | |
if req.first == ">=" then | |
puts "Bad #{spec.email} you are using #{req.inspect}" | |
end | |
end | |
end | |
rescue => e | |
$stderr.puts "Error: #{e.message}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment