<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Robby on Rails: the bizarre love triangle of rbot, subversion, and drb</title>
    <link>http://www.robbyonrails.com/articles/2005/09/15/the-bizarre-love-triangle-of-rbot-subversion-and-drb</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>thoughts.sort_by{|t| t[:topic]}.collect </description>
    <item>
      <title>the bizarre love triangle of rbot, subversion, and drb</title>
      <description>&lt;p&gt;In our pursuit to get stuff ready for the &lt;a href="http://www.pdxruby.org/"&gt;&lt;span class="caps"&gt;PDX&lt;/span&gt;.rb&lt;/a&gt; hackfest this weekend, &lt;a href="http://www.bleything.net/blog/"&gt;Ben Bleything&lt;/a&gt; and I decided that it would be a cool idea to get &lt;a href="http://linuxbrit.co.uk/rbot/"&gt;rbot&lt;/a&gt; to monitor the groups subversion repositories.&lt;/p&gt;


	&lt;p&gt;We asked around a few &lt;span class="caps"&gt;IRC&lt;/span&gt; channels and people had different ways of handling this. The easy route looked to be to parse a &lt;span class="caps"&gt;RSS&lt;/span&gt; feed from Trac. (boring!)&lt;/p&gt;


	&lt;p&gt;So, in an effort to make it interesting and allow for a little creativity with rbot-&lt;del&gt;and potentially open the doors to other ideas&lt;/del&gt;-we opted to build 2 pieces. One would be a &lt;code&gt;post-commit&lt;/code&gt; script that would run after a &lt;code&gt;svn commit&lt;/code&gt; and the other would be a new plugin in rbot, which started an instance of &lt;a href="http://raa.ruby-lang.org/project/druby"&gt;DRb&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;The basic idea&amp;#8230;&lt;/p&gt;


	&lt;p&gt;rbot starts drb on start&lt;/p&gt;


	&lt;p&gt;svn commit  calls drb client, sends notifcation&lt;/p&gt;


	&lt;p&gt;Yes! I managed to sneak DRb somewhere else that it probably didn&amp;#8217;t &lt;strong&gt;need&lt;/strong&gt; to be. It was actually a good way to figure out how to properly tame the crazy lion that is DRb. It&amp;#8217;s so sexy, but I am so afraid that it will scratch me if I get too close. It scratched a little tonight, but then the kind folks in #ruby-lang gave me a band-aid and I was on my way. Guess what? I tamed the lion!&lt;/p&gt;


	&lt;p&gt;The sad part is that I got the thing to properly work about 25 seconds after Ben logged off of &lt;span class="caps"&gt;IRC&lt;/span&gt; and here I am a few horus later amusing myself with test svn commits and telling the whole world. That&amp;#8217;s right&amp;#8230; he&amp;#8217;s sleeping&amp;#8230; and dreaming about how the lion is still out to attack him and you all know that the lion is nicely tucked away.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="constant"&gt;Thread&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;new&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt; 
  &lt;span class="comment"&gt;# the lion is here &lt;/span&gt;
&lt;span class="punct"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;We couldn&amp;#8217;t have the lion holding the rbot in a headlock the whole time.&lt;/p&gt;


	&lt;p&gt;So, the lion is nice and it is our new friend. We now have instant notifications of when our repositories get commits in &lt;strong&gt;#pdx.rb&lt;/strong&gt;.&lt;/p&gt;


	&lt;p&gt;Once we get it to format everything nice and pretty (color-wise), we&amp;#8217;ll make it available for all of you rbot and subversion folks.&lt;/p&gt;
</description>
      <pubDate>Thu, 15 Sep 2005 01:27:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:79306f0a597c85ff785b06fbe687bf80</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2005/09/15/the-bizarre-love-triangle-of-rbot-subversion-and-drb</link>
      <category>Ruby</category>
      <category>Programming</category>
      <category>rbot</category>
      <category>subversion</category>
      <category>ruby</category>
    </item>
  </channel>
</rss>
