Skip to content

Instantly share code, notes, and snippets.

@copiousfreetime
Created September 1, 2010 21:34
Show Gist options
  • Save copiousfreetime/561408 to your computer and use it in GitHub Desktop.
Save copiousfreetime/561408 to your computer and use it in GitHub Desktop.
#!/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