<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -13,6 +13,7 @@ Server and install gems over Bonjour.
 	bob$ gemjour list  			# finds alice
   bob$ gemjour list alice # shows alice's gems
 	bob$ gemjour diff alice # shows differences between bob and alice gems
+	bob$ gemjour install_diff alice  # installs any gem bob doesn't have installed from alice
 
   alice$ gem install blah.gem; gitjour serve
   bob$ gemjour install alice blah</diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -14,6 +14,8 @@ begin
     Gemjour.list(*ARGV)
   when &quot;diff&quot;
     Gemjour.diff(*ARGV)
+  when &quot;install_diff&quot;
+    Gemjour.install_diff(*ARGV)
   when &quot;install&quot;
     Gemjour.install(*ARGV)
   else</diff>
      <filename>bin/gemjour</filename>
    </modified>
    <modified>
      <diff>@@ -85,7 +85,7 @@ show &lt;server&gt;
     system &quot;gem list -r --source=http://#{host.host}:#{host.port}&quot;
   end
   
-  def self.diff(name)
+  def self._diff(name)
     host = find(name)
 
     unless host
@@ -95,11 +95,23 @@ show &lt;server&gt;
     
     require &quot;tempfile&quot;
     local_gems, remote_gems = Tempfile.new(&quot;local_gems&quot;), Tempfile.new(&quot;remote_gems&quot;)
-    local_gems.print(`gem list --no-versions`)
+    local_gems.print(`gem list --no-versions --no-verbose`)
     local_gems.close
-    remote_gems.print(`gem list --no-versions -r --source=http://#{host.host}:#{host.port}`)
+    remote_gems.print(`gem list --no-versions --no-verbose -r --source=http://#{host.host}:#{host.port}`)
     remote_gems.close
-    system &quot;diff -u #{local_gems.path} #{remote_gems.path}&quot;
+    `diff -u #{local_gems.path} #{remote_gems.path}`
+  end
+
+  def self.diff(name)
+    puts _diff(name)
+  end
+  
+  def self.install_diff(name)
+    gem_diff = _diff(name)
+    return unless gem_diff
+    gem_diff.scan(/^\+([\w_\-]+)/) do |match|
+      install(name, match)
+    end
   end
 
   def self.install(name, gem)</diff>
      <filename>lib/gemjour.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b16e9430d0ed1efc7332f67e4c614097932b2068</id>
    </parent>
  </parents>
  <author>
    <name>Dr Nic Williams</name>
    <email>drnicwilliams@gmail.com</email>
  </author>
  <url>http://github.com/evanphx/gemjour/commit/d6841c1fdb399a66a4c655f80a5b2fa0120d8397</url>
  <id>d6841c1fdb399a66a4c655f80a5b2fa0120d8397</id>
  <committed-date>2008-06-04T02:44:05-07:00</committed-date>
  <authored-date>2008-06-04T02:44:05-07:00</authored-date>
  <message>new cmd 'install_diff' - installs any gem that target has that local gem cache doesn't</message>
  <tree>b26f70dad12c6d7e3e2d4e44b001502e14c0d0e2</tree>
  <committer>
    <name>Dr Nic Williams</name>
    <email>drnicwilliams@gmail.com</email>
  </committer>
</commit>
