Project

gem_info

0.0
No commit activity in last 3 years
No release in over 3 years
A rubygems plugin which adds an 'info' command which prints information about gems. Unlike the built-in gem commands, it allows fuzzy matching on gem names and versions by default, and allows precise formatting of the output, making it easy on the command line and in scripts.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 0.3.0
~> 2.7.0
 Project Readme

Gem Fuzzy¶ ↑

A Rubygems plugin which adds a ‘fuzzy’ command which fuzzy-searches for gems and prints information about each match.

Options provide precise control over output format, making it friendly both on the command line and in scripts.

Examples¶ ↑

View dependencies at a glance:

$ gem fuzzy -f '%name-%version: %dependencies' act
activesupport-2.3.3:
activesupport-2.3.4:
activeresource-2.3.4: activesupport = 2.3.4
activerecord-2.3.4: activesupport = 2.3.4
actionpack-2.3.4: activesupport = 2.3.4, rack ~> 1.0.0
actionmailer-2.3.4: actionpack = 2.3.4

Handy alias to ‘cd’ to a gem directory:

function cdrg {
    if [ $# -eq 0 ]; then
        cd `gem env gemdir`/gems
    elif gem fuzzy --exactly-one $@ > /dev/null; then
      local dir=`gem fuzzy -f '%path' $@`
      if [ -d $dir/lib ]; then
          cd $dir/lib
      else
          cd $dir
      fi
    fi
}

$ cdrg rails    # oops!
2 matching gems:
  rails 2.3.3
  rails 2.3.4
$ cdrg rails 4  # only 2.3.4 contains '4'
$ pwd
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib

Contributing¶ ↑

Copyright © George Ogata. See LICENSE for details.