tag:help.rubygems.org,2010-01-19:/discussions/suggestions/13-mapping-gems-to-git-repositoriesRubyGems.org: Discussion 2011-04-07T20:59:28Ztag:help.rubygems.org,2010-01-19:Comment/19861802010-06-17T14:36:00Z2010-06-17T14:36:02ZMapping Gems to Git Repositories<div><p>It would be nice to be able to map a gem hosted here with its
Github repository, if there is one.</p>
<p>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).</p>
<p>Here's what I have so far:</p>
<pre>
<code>#!/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</code>
</pre>
<p>What do you think?</p></div>David Coletag:help.rubygems.org,2010-01-19:Comment/19861802010-06-17T14:38:54Z2010-06-17T14:38:54ZMapping Gems to Git Repositories<div><p>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.</p></div>John Barnettetag:help.rubygems.org,2010-01-19:Comment/19861802010-06-17T14:52:35Z2010-06-17T14:52:37ZMapping Gems to Git Repositories<div><p>Awesome. You guys rock. Thanks so much for such a great
service!</p></div>David Coletag:help.rubygems.org,2010-01-19:Comment/19861802010-06-17T14:56:37Z2010-06-17T14:56:37ZMapping Gems to Git Repositories<div><p>:-)</p></div>John Barnette