Created
July 31, 2014 03:43
-
-
Save indirect/c4c9f7fd34b08a8804e5 to your computer and use it in GitHub Desktop.
Get list of all gem names from Rubygems
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
$ gem list --verbose -r | |
*** REMOTE GEMS *** | |
GET https://api.rubygems.org/latest_specs.4.8.gz | |
302 Moved Temporarily | |
GET https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz | |
200 OK | |
^CERROR: Interrupted | |
$ curl -O https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 632k 100 632k 0 0 261k 0 0:00:02 0:00:02 --:--:-- 262k | |
$ ungzip latest_specs.4.8.gz | |
$ irb | |
irb(main):001:0> gems=Marshal.load File.read("latest_specs.4.8");gems.first | |
=> ["_", #<Gem::Version "1.2">, "ruby"] | |
irb(main):002:0> gems[0..10].map{|g| g.first } | |
=> ["_", "-", "0mq", "0xffffff", "1234567890_", "12_hour_time", "189seg", "1_as_identity_function", "1pass", "24games", "24point"] | |
irb(main):003:0> gems.count | |
=> 79071 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment