Last active
September 27, 2015 19:08
-
-
Save MadBomber/1317690 to your computer and use it in GitHub Desktop.
A Tool to List GEM Summaries
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
#!/bin/env ruby | |
############################################################################ | |
## summarize_all_gems.rb | |
class NilClass | |
def split(*args) | |
[" "] | |
end | |
def strip | |
"" | |
end | |
end | |
desc_start_col = 30 | |
Gem::Specification.all.each do |gs| | |
print "#{gs.name} " | |
spacer_cnt = desc_start_col - gs.name.length | |
spacer_cnt = 1 if spacer_cnt <= 0 | |
print " "*spacer_cnt | |
puts gs.summary.split("\n").first.strip | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment