<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.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>Segment7: RDoc's TemplatePage removed from Ruby</title>
    <link>http://blog.segment7.net/articles/2008/01/07/rdocs-templatepage-removed-from-ruby</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>The Blog</description>
    <item>
      <title>RDoc's TemplatePage removed from Ruby</title>
      <description>&lt;p&gt;If you&amp;#8217;ve got a custom RDoc template, it won&amp;#8217;t work with the next release of 1.9.  I&amp;#8217;ve removed the custom TemplatePage and replaced it with an &lt;span class="caps"&gt;ERB&lt;/span&gt;-based version that works similarly.&lt;/p&gt;


	&lt;p&gt;This should make it much, much easier to write a custom RDoc template as you can now use arbitrary ruby code inside your templates.&lt;/p&gt;


	&lt;p&gt;It&amp;#8217;s really easy to convert an old RDoc template to the upcoming version:&lt;/p&gt;


&lt;table&gt;
&lt;tr&gt;&lt;th&gt;Replace this&lt;th&gt;With this
&lt;tr&gt;&lt;td&gt;&lt;code&gt;%blah%&lt;/code&gt;&lt;td&gt;&lt;code&gt;&amp;lt;%= values["blah"] %&amp;gt;&lt;/code&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;!INCLUDE!&lt;/code&gt;&lt;td&gt;&lt;code&gt;&amp;lt;%= template_include %&amp;gt;&lt;/code&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;HREF:aref:name&lt;/code&gt;&lt;td&gt;&lt;code&gt;&amp;lt;%= href values["aref"], values["name"] %&amp;gt;&lt;/code&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;IF:blah&lt;/code&gt;&lt;td&gt;&lt;code&gt;&amp;lt;% if values["blah"] then %&amp;gt;&lt;/code&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;IFNOT:blah&lt;/code&gt;&lt;td&gt;&lt;code&gt;&amp;lt;% unless values["blah"] then %&amp;gt;&lt;/code&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;ENDIF:blah&lt;/code&gt;&lt;td&gt;&lt;code&gt;&amp;lt;% end %&amp;gt;&lt;/code&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;START:blah&lt;/code&gt;&lt;td&gt;&lt;code&gt;&amp;lt;% values["blah"].each do |blah| %&amp;gt;&lt;/code&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;END:blah&lt;/code&gt;&lt;td&gt;&lt;code&gt;&amp;lt;% end %&amp;gt;&lt;/code&gt;
&lt;/table&gt;

	&lt;p&gt;To make nested loops easier to convert, convert &lt;span class="caps"&gt;START&lt;/span&gt; statements to:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;&amp;lt;% values["blah"].each do |blah| $stderr.puts blah.keys %&amp;gt;&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;So you can see what is being used inside which loop.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve also removed the old_html template, as I don&amp;#8217;t think anybody uses it anymore, and updated all the existing templates in RDoc to use &lt;span class="caps"&gt;ERB&lt;/span&gt;.  (If somebody could double-check my work on the &lt;span class="caps"&gt;CHM&lt;/span&gt; and &lt;span class="caps"&gt;XML&lt;/span&gt; outputters, that would be great.)&lt;/p&gt;
</description>
      <pubDate>Mon, 07 Jan 2008 02:59:54 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:7a3cacf7-285e-4305-8f8f-6dda03c2234b</guid>
      <author>drbrain@segment7.net (Eric Hodel)</author>
      <link>http://blog.segment7.net/articles/2008/01/07/rdocs-templatepage-removed-from-ruby</link>
      <category>RDoc</category>
      <category>Ruby</category>
    </item>
    <item>
      <title>"RDoc's TemplatePage removed from Ruby" by Rob O</title>
      <description>&lt;p&gt;Awesome. Nice to see rDoc is still improving. Thanks.&lt;/p&gt;</description>
      <pubDate>Sun, 27 Jan 2008 10:42:17 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:2fbb8224-c257-4dac-8b3e-d500bd412924</guid>
      <link>http://blog.segment7.net/articles/2008/01/07/rdocs-templatepage-removed-from-ruby#comment-880</link>
    </item>
    <item>
      <title>"RDoc's TemplatePage removed from Ruby" by Eric Hodel</title>
      <description>&lt;p&gt;sb: You can see RDoc in action in ruby&amp;#8217;s trunk.  It should be 1.8 compatible, but the work won&amp;#8217;t be backported for distribution with 1.8.&lt;/p&gt;</description>
      <pubDate>Tue, 15 Jan 2008 15:07:10 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:7d890c71-e5c8-43c0-a357-fc9cbafeff4b</guid>
      <link>http://blog.segment7.net/articles/2008/01/07/rdocs-templatepage-removed-from-ruby#comment-875</link>
    </item>
    <item>
      <title>"RDoc's TemplatePage removed from Ruby" by sb</title>
      <description>&lt;p&gt;Please do release the new rdoc as a gem.&lt;/p&gt;


	&lt;p&gt;Until then, how can I get the code and use your changes?  Does the new rdoc run under 1.8 too?&lt;/p&gt;</description>
      <pubDate>Mon, 14 Jan 2008 13:39:27 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:339b274d-a208-4d7f-954f-aacdfc429fe4</guid>
      <link>http://blog.segment7.net/articles/2008/01/07/rdocs-templatepage-removed-from-ruby#comment-862</link>
    </item>
    <item>
      <title>"RDoc's TemplatePage removed from Ruby" by Bruce Williams</title>
      <description>&lt;p&gt;Thanks, Eric!&lt;/p&gt;</description>
      <pubDate>Sun, 13 Jan 2008 21:52:40 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:f38c186f-48d7-476f-8833-6b4edc2a345c</guid>
      <link>http://blog.segment7.net/articles/2008/01/07/rdocs-templatepage-removed-from-ruby#comment-861</link>
    </item>
    <item>
      <title>"RDoc's TemplatePage removed from Ruby" by Eric Hodel</title>
      <description>&lt;p&gt;I&amp;#8217;ll probably be making a release of RDoc as a gem to help flush out bugs in RDoc and to explore further RubyGems/Ruby integration.&lt;/p&gt;</description>
      <pubDate>Sat, 12 Jan 2008 12:14:46 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:747905af-ef39-42f5-8d3a-82781edec482</guid>
      <link>http://blog.segment7.net/articles/2008/01/07/rdocs-templatepage-removed-from-ruby#comment-856</link>
    </item>
    <item>
      <title>"RDoc's TemplatePage removed from Ruby" by Tom</title>
      <description>&lt;p&gt;s/Runy/Ruby/&lt;/p&gt;</description>
      <pubDate>Sat, 12 Jan 2008 02:34:23 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:732e8e1b-6c6a-4006-ac28-d48cd26fce81</guid>
      <link>http://blog.segment7.net/articles/2008/01/07/rdocs-templatepage-removed-from-ruby#comment-855</link>
    </item>
    <item>
      <title>"RDoc's TemplatePage removed from Ruby" by Tom</title>
      <description>&lt;p&gt;When you say &amp;#8220;next release of 1.9&amp;#8221; is that Ruby 1.9? Is it possible to use your erb-based RDoc in Runy 1.8? Thanks.&lt;/p&gt;</description>
      <pubDate>Sat, 12 Jan 2008 02:33:48 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:e4fbceb4-76b9-45f3-8293-43605e7fe2ea</guid>
      <link>http://blog.segment7.net/articles/2008/01/07/rdocs-templatepage-removed-from-ruby#comment-854</link>
    </item>
    <item>
      <title>"RDoc's TemplatePage removed from Ruby" by shaners</title>
      <description>&lt;p&gt;+1, bro.&lt;/p&gt;</description>
      <pubDate>Mon, 07 Jan 2008 22:58:01 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:f33d3ad9-5c65-4c96-bf4f-3856e980d6f9</guid>
      <link>http://blog.segment7.net/articles/2008/01/07/rdocs-templatepage-removed-from-ruby#comment-852</link>
    </item>
    <item>
      <title>"RDoc's TemplatePage removed from Ruby" by Joe Grossberg</title>
      <description>&lt;p&gt;So sensible. I appreciate you putting in the work to make things easier for other people.&lt;/p&gt;</description>
      <pubDate>Mon, 07 Jan 2008 17:20:58 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:693116a1-ab03-46bf-b5de-d854ebb6781c</guid>
      <link>http://blog.segment7.net/articles/2008/01/07/rdocs-templatepage-removed-from-ruby#comment-851</link>
    </item>
    <item>
      <title>"RDoc's TemplatePage removed from Ruby" by bryanl</title>
      <description>&lt;p&gt;This is a good change.&lt;/p&gt;</description>
      <pubDate>Mon, 07 Jan 2008 08:50:20 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:d3425114-329f-4236-bb41-10da3d6ab98b</guid>
      <link>http://blog.segment7.net/articles/2008/01/07/rdocs-templatepage-removed-from-ruby#comment-850</link>
    </item>
    <item>
      <title>"RDoc's TemplatePage removed from Ruby" by Bil Kleb</title>
      <description>&lt;p&gt;Bravo!&lt;/p&gt;</description>
      <pubDate>Mon, 07 Jan 2008 03:09:04 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:9c8930a9-40e6-42c9-be31-c30625fdc7b6</guid>
      <link>http://blog.segment7.net/articles/2008/01/07/rdocs-templatepage-removed-from-ruby#comment-849</link>
    </item>
  </channel>
</rss>
