<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -12,6 +12,7 @@ begin
     gem.description = &quot;A library for determining if GitHub has built a gem yet&quot;
     gem.authors = [&quot;Josh Nichols&quot;]
     gem.files =  FileList[&quot;[A-Z]*&quot;, &quot;{bin,lib,test}/**/*&quot;] 
+    gem.add_dependency &quot;git&quot;
   end
 rescue LoadError
   puts &quot;Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com&quot;</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -13,7 +13,7 @@ def usage
   puts &quot;  #{File.basename $0} techinicalpickles jeweler&quot;
 end
 
-if ARGV.length == 0 || ARGV.include?(&quot;-h&quot;) || ARGV.include?(&quot;--help&quot;)
+if ARGV.include?(&quot;-h&quot;) || ARGV.include?(&quot;--help&quot;)
   usage
   exit
 end</diff>
      <filename>bin/gemstalk</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 require 'net/http'
 require 'rubygems/spec_fetcher'
+require 'git'
 
 # Small class for determining if a gem has been built on GitHub and if it's installable.
 class GemStalker
@@ -14,8 +15,13 @@ class GemStalker
   def initialize(options = {})
     @username   = options[:username]
     @repository = options[:repository]
+    unless @username &amp;&amp; @repository
+      @username, @repository = determine_username_and_repository
+    end
+
     @version    = options[:version] || determine_version
 
+
   end
 
   # Is it built yet?
@@ -89,5 +95,13 @@ class GemStalker
       gemspec.version.to_s
     end
   end
-  
+
+  def determine_username_and_repository
+    git = Git.open(Dir.pwd)
+
+    origin_url = git.remote('origin').url
+    origin_url =~ /git@github\.com:(.*)\/(.*)\.git/
+
+    username, repository = $1, $2
+  end
 end</diff>
      <filename>lib/gem_stalker.rb</filename>
    </modified>
    <modified>
      <diff>@@ -51,6 +51,21 @@ class GemstalkerTest &lt; Test::Unit::TestCase
       assert @stalker.gem?
     end    
   end
+
+  context &quot;a stalker, without username and repository&quot; do
+    setup do
+      @stalker = GemStalker.new(:version =&gt; '0.8.1')
+    end
+
+    should &quot;determine username from git remote&quot; do
+      assert_equal 'technicalpickles', @stalker.username
+    end
+
+    should &quot;determine repository from git remote&quot; do
+      assert_equal 'gemstalker', @stalker.repository
+    end
+
+  end
   
   context &quot;a stalker for something not marked as a gem&quot; do
     setup do</diff>
      <filename>test/gemstalker_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1aefd65aa364b3cf0e9cbe85937a123aed79024f</id>
    </parent>
  </parents>
  <author>
    <name>Josh Nichols</name>
    <email>josh@technicalpickles.com</email>
  </author>
  <url>http://github.com/technicalpickles/gemstalker/commit/7bedd95b3143f87b816cbff44d602dda57041aff</url>
  <id>7bedd95b3143f87b816cbff44d602dda57041aff</id>
  <committed-date>2009-07-21T21:11:59-07:00</committed-date>
  <authored-date>2009-07-21T21:11:59-07:00</authored-date>
  <message>Added support for figuring out username and password from git remote.</message>
  <tree>2439caad6648660410a6e4e3dd98354e2c5710bd</tree>
  <committer>
    <name>Josh Nichols</name>
    <email>josh@technicalpickles.com</email>
  </committer>
</commit>
