Mapping Gems to Git Repositories

David Cole's Avatar

David Cole

17 Jun, 2010 02:36 PM

It would be nice to be able to map a gem hosted here with its Github repository, if there is one.

What I'm trying to do is, when I install a new gem, to have a script I can run that iterates over my installed gems and clones their repos for me to inspect (for the sake of curiosity, education, and to see what I might be interested in contributing to).

Here's what I have so far:

#!/bin/bash
WATCHING_DIRECTORY=~/Awesome/Projects/Watching;
cd $WATCHING_DIRECTORY;
for GEM in `gem list --no-version --no-details`
do
  # Here's where I'd get the Github repository link from rubygems.org
  GITHUB_REPOSITORY="http://rubygems.org/gems/$GEM/repository"; # for example
  if [ ! -n "$xyz" ]
  then
    git clone $GITHUB_REPOSITORY
  fi
done

What do you think?

  1. Support Staff 1 Posted by John Barnette on 17 Jun, 2010 02:38 PM

    John Barnette's Avatar

    We're working on additions to the gemspec that allow arbitrary metadata like this. It's hard, and everyone's really busy, so it's taking way too long. Once we do that, though, it'll be very easy to expose information like this.

  2. John Barnette closed this discussion on 17 Jun, 2010 02:38 PM.

  3. David Cole re-opened this discussion on 17 Jun, 2010 02:52 PM

  4. 2 Posted by David Cole on 17 Jun, 2010 02:52 PM

    David Cole's Avatar

    Awesome. You guys rock. Thanks so much for such a great service!

  5. Support Staff 3 Posted by John Barnette on 17 Jun, 2010 02:56 PM

    John Barnette's Avatar

    :-)

  6. John Barnette closed this discussion on 17 Jun, 2010 02:56 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

23 Oct, 2014 05:37 PM
21 Oct, 2014 10:47 AM
18 Oct, 2014 08:39 PM
16 Oct, 2014 12:41 PM
06 Oct, 2014 02:30 PM