Created
November 23, 2012 07:03
-
-
Save rsutphin/4134308 to your computer and use it in GitHub Desktop.
A trivial client for the rubygems.org dependencies API. Prints all versions and their deps for a particular gem.
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
require 'pp' | |
require 'rubygems' | |
GEM_NAME = ARGV.pop or fail "Please give a gem name" | |
api_result = `curl http://rubygems.org/api/v1/dependencies?gems=#{GEM_NAME}` | |
pp Marshal.load(api_result).sort_by { |dep| Gem::Version.new(dep[:number]) }.reverse | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment