<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>Dr Nic</title>
	
	<link>http://drnicwilliams.com</link>
	<description>Ruby makes Rails, Javascript makes Ajax, Dr Nic makes Magic</description>
	<lastBuildDate>Tue, 17 Nov 2009 06:13:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/DrNic" type="application/rss+xml" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">DrNic</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Making a pretty Firefox Beta application icon</title>
		<link>http://drnicwilliams.com/2009/11/16/making-a-pretty-firefox-beta-application-icon/</link>
		<comments>http://drnicwilliams.com/2009/11/16/making-a-pretty-firefox-beta-application-icon/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 22:41:25 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Mocra]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=661</guid>
		<description><![CDATA[
Here&#8217;s the problem: I install OS X Firefox 3.6b2 along side Firefox 3.5. They are both in my dock. Their icons are the same. Um, which is which?
How about a sexy Firefox Beta icon to separate what&#8217;s-what in the dock, Quicksilver, Spotlight etc?
This post shows how to create a &#8220;beta Firefox&#8221; icon, install it into [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2009/04/06/easy-scheduling-by-location-tasks-and-people-a-case-study-of-a-client-application-from-mocra/' rel='bookmark' title='Permanent Link: Easy scheduling by location, tasks and people &#8211; a case study of a client application from Mocra'>Easy scheduling by location, tasks and people &#8211; a case study of a client application from Mocra</a> <small> UPDATE: Orchestrate was reported in TechCrunch Several years ago...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://img.skitch.com/20091113-xhgyhxk8eiuanrs1au27k1pnmd.png" style="float: right"></p>
<p>Here&#8217;s the problem: I install OS X Firefox 3.6b2 along side Firefox 3.5. They are both in my dock. Their icons are the same. Um, which is which?</p>
<p>How about a sexy Firefox Beta icon to separate what&#8217;s-what in the dock, Quicksilver, Spotlight etc?</p>
<p>This post shows how to create a &#8220;beta Firefox&#8221; icon, install it into the Firefox 3.6b2 OS X application, and live long and prosperously.</p>
<h2 id="installing_firefox_36b2_along_side_firefox_35">Installing Firefox 3.6b2 along side Firefox 3.5</h2>
<p>I think these are the instructions for having two Firefoxes:</p>
<p>Download the Beta DMG. Open it. <strong>Don&#8217;t just drag</strong> the Firefox icon into the provided Application symlink folder.</p>
<p><a href="http://www.mozilla.com/en-US/firefox/all-beta.html" target="_blank"><img src="http://img.skitch.com/20091113-ka45x4rutq43ifnwbdfnkyiksj.jpg" alt="firefox beta" /></a></p>
<p>Create in your Applications folder, create &#8220;beta&#8221; folder for all things beta (your you could rename the Firefox beta application or whatever). From the DMG window, drag the Firefox application icon into your &#8220;beta&#8221; folder.</p>
<p>To run it, close down Firefox if it&#8217;s running, and launch the new one. Done.</p>
<h2 id="creating_new_application_icons">Creating new Application icons</h2>
<p><a href="http://mocra.com/projects/iconmerge/" target="_blank">iConMerge</a> is a nice OS X tool to create composite application icons and install them. It is freeware from <a href="http://mocra.com/">Mocra</a>.</p>
<p><a href="http://mocra.com/project_downloads/iconmerge/iConMerge.dmg"><img src="http://img.skitch.com/20091113-nqy7gqe6n7rwqj6wpua8cibsf8.png"></a></p>
<p>You drag images or existing Applications into the two left slots and it automatically creates a composite icon. Press the <code>&lt;--&gt;</code> arrow to switch them.</p>
<p>See the project home page for instructions.</p>
<p>The &#8220;beta&#8221; sub-icon I used is below. Download it OR try dragging it directly from the browser into iConMerge.</p>
<p><img src="http://img.skitch.com/20091113-87ucaiauf1jy764i4qrmmh5utd.png" style="width: 80px"></p>
<h2 id="applying_new_icon_to_firefox_beta">Applying new icon to Firefox Beta</h2>
<p><img src="http://img.skitch.com/20091113-xhgyhxk8eiuanrs1au27k1pnmd.png" style="float: right"></p>
<p>Click &#8220;Export&#8221; and select the Firefox beta Application. Done.</p>
<p>When you restart Firefox beta, you&#8217;ll see it&#8217;s Dock icon has changed. </p>
<p>Right click on the Dock icon, select &#8220;Keep in Dock&#8221; and them drag the icon next to your existing Firefox 3.5 application. Two Firefoxes, two different icons, happy times.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2009/04/06/easy-scheduling-by-location-tasks-and-people-a-case-study-of-a-client-application-from-mocra/' rel='bookmark' title='Permanent Link: Easy scheduling by location, tasks and people &#8211; a case study of a client application from Mocra'>Easy scheduling by location, tasks and people &#8211; a case study of a client application from Mocra</a> <small> UPDATE: Orchestrate was reported in TechCrunch Several years ago...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=Ha9nNxI24Pk:B0BiSLi5zSE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=Ha9nNxI24Pk:B0BiSLi5zSE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=Ha9nNxI24Pk:B0BiSLi5zSE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=Ha9nNxI24Pk:B0BiSLi5zSE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=Ha9nNxI24Pk:B0BiSLi5zSE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=Ha9nNxI24Pk:B0BiSLi5zSE:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2009/11/16/making-a-pretty-firefox-beta-application-icon/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dead simple JavaScript Unit Testing in Rails</title>
		<link>http://drnicwilliams.com/2009/11/12/dead-simple-javascript-unit-testing-in-rails/</link>
		<comments>http://drnicwilliams.com/2009/11/12/dead-simple-javascript-unit-testing-in-rails/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 03:30:23 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Mocra]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=650</guid>
		<description><![CDATA[


Formats: Video/Screencast (410 Mb, torrent) &#124; Video only (vimeo)

Start downloading the torrent now, read this article 37 times and the video might be ready to watch.

Writing tests are great for helping you design and think out your code, and the bonus is you end up with a test suite to aide in fighting against regressions. [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre/' rel='bookmark' title='Permanent Link: First look at rails 3.0.pre'>First look at rails 3.0.pre</a> <small> This article is out of date in some aspects....</small></li><li><a href='http://drnicwilliams.com/2009/10/07/rails-themes-can-remember-things/' rel='bookmark' title='Permanent Link: Rails themes can remember things'>Rails themes can remember things</a> <small>I was getting annoyed at having to remember all the...</small></li><li><a href='http://drnicwilliams.com/2009/10/06/install-any-html-themetemplate-into-your-rails-app/' rel='bookmark' title='Permanent Link: Install any HTML theme/template into your Rails app'>Install any HTML theme/template into your Rails app</a> <small> Have you ever even bothered to Google for &#8220;rails...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<div style="padding: 10px; background-color: black">
<a href="http://drnicwilliams.com/wp-content/uploads/torrents/Dead Simple Unit Testing - Dr Nic Williams - Rails Underground 2009.torrent"><img style="width: 100%" src="http://img.skitch.com/20091112-chanatee6aucyjqnxi54iaae3x.png" alt="Skills Matter : Rails Underground 2009: on Dead simple JavaScript Testing" /></a>
</div>
<p>Formats: <a href="http://drnicwilliams.com/wp-content/uploads/torrents/Dead Simple Unit Testing - Dr Nic Williams - Rails Underground 2009.torrent">Video/Screencast</a> (410 Mb, torrent) | <a href="http://skillsmatter.com/podcast/ajax-ria/dead-simple-javascript-unit-tests-in-rails-with-blue-ridge-and-screw-unit">Video only</a> (vimeo)</p>
<div class="notice">
<p>Start downloading the <a href="http://drnicwilliams.com/wp-content/uploads/torrents/Dead Simple Unit Testing - Dr Nic Williams - Rails Underground 2009.torrent">torrent</a> now, read this article 37 times and the video might be ready to watch.</p>
</div>
<p>Writing tests are great for helping you design and think out your code, and the bonus is you end up with a test suite to aide in fighting against regressions. Why? It&#8217;s embarrassing when your JavaScript doesn&#8217;t work in production.</p>
<p>But how do you get started with testing JavaScript? How do you make it easy? I mean, so easy that you&#8217;d feel stupid to not write tests?</p>
<p>And how do you know if your designer/HTML-chopper has broken your JavaScript? How do you find out if JavaScript is broken in CI builds? And what is the appropriate punishment for designers who break JavaScript?</p>
<p>Finally, it is now uber easy to get started: the <a href="http://github.com/relevance/blue-ridge">blue-ridge</a> plugin for Rails. (I previously <a href="http://drnicwilliams.com/2009/06/07/tdd-for-greasemonkey-scripts-and-introducing-ninja-search-js/">discussed it</a> near the bottom)</p>
<p>To spread the word, I travelled to London, England for the <a href="http://www.rails-underground.com/">Rails Underground</a> conference a few months ago. The presentation is <a href="http://skillsmatter.com/podcast/ajax-ria/dead-simple-javascript-unit-tests-in-rails-with-blue-ridge-and-screw-unit">now online</a> (recorded and published by SkillsMatter).</p>
<p>I was also recording the screen during the presentation and we&#8217;ve composited the two together (a la <a href="http://www.confreaks.com/">confreaks</a>) and it&#8217;s available via <a href="http://drnicwilliams.com/wp-content/uploads/torrents/Dead Simple Unit Testing - Dr Nic Williams - Rails Underground 2009.torrent">BitTorrent</a>. If you can seed for the next few days, that would be greatly appreciated too.</p>
<p>The talk is 45 minutes and questions are 6 mins. (I sadly don&#8217;t repeat into the microphone some of the questions because the room acoustics were good and everyone could hear everyone else&#8217;s questions. Sorry.)</p>
<p><a href="http://drnicwilliams.com/wp-content/uploads/torrents/Dead Simple Unit Testing - Dr Nic Williams - Rails Underground 2009.torrent">Go get it now</a>.</p>
<h2 id="why_blue_ridge">Why Blue Ridge?</h2>
<p>This recording was done in July 2009, a few months ago. Is Blue Ridge still the bees-knees? I think so. It has issues, edge cases and bugs, but I don&#8217;t think there is a similar nor better Rails extension that includes (out of the box) a headless test runner, a bundle of test libraries (Screw.Unit, Smoke, etc), Rails generators, and automated discovery of &#8220;the designer broke our JavaScript!&#8221; lynch-mobbing (see my branch below).</p>
<p>These are the things I want. If there&#8217;s a better testing environment (say on HTMLUnit instead of env.js), then I think the killer packaging is to bundle it all up, with the features above, so it is drop-in, dead simple to use.</p>
<h2 id="my_history_with_javascript_testing">My history with JavaScript testing</h2>
<p>In the introduction I talk about my life with JavaScript and testing. Here is the extended summary if it&#8217;s interesting to you at all:</p>
<ul>
<li>2005:
<ul>
<li>ASP.NET + Ajax == &#8220;crapola&#8221;</li>
<li>Rails promo: &#8220;easier to do Ajax than not to&#8221;</li>
<li>Inline JavaScript helpers</li>
</ul>
</li>
<li>2006:
<ul>
<li>RJS to generate JavaScript</li>
</ul>
</li>
<li>2007:
<ul>
<li>JavaScript only in its own files</li>
<li>Unobtrusive JavaScript</li>
<li>Got myself into terrible mess with MyConfPlan</li>
<li>How to test JavaScript?</li>
</ul>
</li>
<li>2008:
<ul>
<li>Figured out how to test it</li>
<li>Write a PeepCode but never published it</li>
<li>Wrote <a href="http://newjs.rubyforge.org/">newjs</a> and <a href="http://jsunittest.com/">jsunittest</a></li>
</ul>
</li>
<li>2009:
<ul>
<li>Found <a href="http://github.com/relevance/blue-ridge">BlueRidge plugin for Rails</a></li>
<li>Headless test runner</li>
<li>BDD tests via Screw.Unit</li>
<li>Generators</li>
</ul>
</li>
</ul>
<h2 id="miscellaneous">Miscellaneous</h2>
<p>I mention a couple of miscellaneous things. Here&#8217;s a summary.</p>
<p><a href="http://github.com/drnic/blue-ridge">My fork of blue-ridge</a> has the feature to render sample HTML from your templates. It wasn&#8217;t accepted into the primary blue-ridge library because it was rspec only. Perhaps someone can make it work for test/unit etc.</p>
<p>I alias the <code>script/generate</code> command:</p>
<pre><code>alias gen="script/generate"
</code></pre>
<p>I&#8217;m extending TextMate with Ciarán Walsh&#8217;s <a href="http://ciaranwal.sh/projectplus">ProjectPlus</a> plug-in (<a href="http://github.com/ciaran/projectplus/">source</a>). It&#8217;s sweet.</p>
<h2>Thanks</h2>
<p>Thanks to Mark Coleman for organising <a href="http://www.rails-underground.com/">Rails Underground</a>, inviting me over, and having the sessions recorded. And to SkillsMatter for recording and publishing the raw footage.</p>
<p>Thanks to <a href="http://bjeanes.com/">Bo Jeanes</a> for helping to get Final Cut Pro to mash the screencast and the SkillsMatter video into one video.</p>
<p>Thanks to Jack Chen for hacking some code to push the video up to s3 (when Transmit and BaconDrop were failing me)</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre/' rel='bookmark' title='Permanent Link: First look at rails 3.0.pre'>First look at rails 3.0.pre</a> <small> This article is out of date in some aspects....</small></li><li><a href='http://drnicwilliams.com/2009/10/07/rails-themes-can-remember-things/' rel='bookmark' title='Permanent Link: Rails themes can remember things'>Rails themes can remember things</a> <small>I was getting annoyed at having to remember all the...</small></li><li><a href='http://drnicwilliams.com/2009/10/06/install-any-html-themetemplate-into-your-rails-app/' rel='bookmark' title='Permanent Link: Install any HTML theme/template into your Rails app'>Install any HTML theme/template into your Rails app</a> <small> Have you ever even bothered to Google for &#8220;rails...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=AcWfRFR3xmA:OCBM3CvB3Bk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=AcWfRFR3xmA:OCBM3CvB3Bk:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=AcWfRFR3xmA:OCBM3CvB3Bk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=AcWfRFR3xmA:OCBM3CvB3Bk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=AcWfRFR3xmA:OCBM3CvB3Bk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=AcWfRFR3xmA:OCBM3CvB3Bk:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2009/11/12/dead-simple-javascript-unit-testing-in-rails/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Hacking someone’s gem with github and gemcutter</title>
		<link>http://drnicwilliams.com/2009/11/04/hacking-someones-gem-with-github-and-gemcutter/</link>
		<comments>http://drnicwilliams.com/2009/11/04/hacking-someones-gem-with-github-and-gemcutter/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 06:44:17 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Gems]]></category>
		<category><![CDATA[Mocra]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=635</guid>
		<description><![CDATA[
Ever used a rubygem, found a bug, and just wanted to quickly bust out the big guns and fix it quickly?
The gem command doesn&#8217;t come packed with a way to find the original source repository for a gem. At best, most gems at least come bundled with the complete source, tests and documentation. Some gems [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li><li><a href='http://drnicwilliams.com/2008/10/31/newgem-100-all-thanks-to-cucumber/' rel='bookmark' title='Permanent Link: newgem 1.0.0 all thanks to Cucumber'>newgem 1.0.0 all thanks to Cucumber</a> <small>The New Gem Generator (newgem) was exciting, moderately revolutionary, and...</small></li><li><a href='http://drnicwilliams.com/2006/10/11/generating-new-gems/' rel='bookmark' title='Permanent Link: [ANN] Generating new gems for graceful goodliness'>[ANN] Generating new gems for graceful goodliness</a> <small> I don&#8217;t like you [1]. You don&#8217;t share code....</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://img.skitch.com/20091104-fthwimr335wsm3rfgad9a7jh5k.jpg" alt="gemcutter" style="float: right"/></p>
<p>Ever used a rubygem, found a bug, and just wanted to quickly bust out the big guns and fix it quickly?</p>
<p>The <code>gem</code> command doesn&#8217;t come packed with a way to find the original source repository for a gem. At best, most gems at least come bundled with the complete source, tests and documentation. Some gems <a href="http://github.com/notahat/machinist/issues#issue/14">don&#8217;t</a>. Fair enough, since having access to the complete source via the gem still doesn&#8217;t allow you to fix a bug and share it with the world.</p>
<p>For that you access to the repo, a quick way to fork it, and a post-github way to share a gem version from yours truly.</p>
<p>The <code>github</code> gem and gemcutter are the modern day tools of master hackermanship.</p>
<h1 id="instant_forking_fun">Instant forking fun</h1>
<p>Let&#8217;s say you find a bug in a gem, say <code>rails</code>, and you want to go to town on its source.</p>
<p>You know the gem is called <code>rails</code> but you&#8217;ve no idea what the github repo is called. Never fear. </p>
<pre><code>$ gem sources -a http://gemcutter.org
$ sudo gem install github
$ gh clone --search rails
Select a repository to clone:
1.  rails/rails                         # Ruby on Rails
2.  technoweenie/restful-authentication # Generates common user ...
3.  justinfrench/formtastic             # A Rails form builder plugin ...
?
</code></pre>
<p>Press <code>1</code> and you&#8217;ll get a clone of <code>rails/rails</code>.</p>
<p>Alternately, if you want a fork or you know the exact user/repo already:</p>
<pre><code>$ gh clone rails/rails
</code></pre>
<p>Now, fork your own version:</p>
<pre><code>$ cd rails
$ gh fork
</code></pre>
<p>You now have your own fork. The <code>origin</code> remote also now points to your fork rather than the <code>rails/rails</code> repository:</p>
<pre><code>$ git remote show origin
* remote origin
  Fetch URL: git@github.com:drnic/rails.git
  Push  URL: git@github.com:drnic/rails.git
</code></pre>
<p>So, make your changes, push them. Send a pull request or github issue or lighthouse ticket or what have you.</p>
<p>Want to get to the github project home page for your fork?</p>
<pre><code>$ gh home
</code></pre>
<h1 id="instant_gem_sharing">Instant gem sharing</h1>
<p>Let&#8217;s say you patched the <code>rails</code> gem <a href="http://github.com/drnic/rails/commit/3c26910cfd5aa4b484d63e912b3881c31f19782a">itself</a> but you want to share your changes via your own gem.</p>
<p>In the olden days, github did this for you. Now you use <a href="http://gemcutter.org/">gemcutter</a>, and a little manual effort to do your own renaming.</p>
<p>First, install the gems locally, use them, and make sure all is good.</p>
<p>For rails, you install the edge gems (3.0.pre) with:</p>
<pre><code>$ rake install
</code></pre>
<p>You can&#8217;t see &#8216;rake install&#8217; in the <code>rake -T</code> list (hence my patch), but I think the following expression displays all tasks regardless if they have a description or not:</p>
<pre><code>$ rake -P | grep "^r"
</code></pre>
<p>Rails is composed of several gems, unlike most projects that are distributed as a single gem. Here we want to share our commit within a new <code>drnic-rails</code> gem, but not touch the others.</p>
<p>Edit the <code>railties/rails.gemspec</code> file from:</p>
<pre><code>Gem::Specification.new do |s|
  s.platform = Gem::Platform::RUBY
  s.name = 'rails'
  s.version = '3.0.pre'
...
</code></pre>
<p>and give your personal gem a new name:</p>
<pre><code>Gem::Specification.new do |s|
  s.platform = Gem::Platform::RUBY
  s.name = 'drnic-rails'
  s.version = '3.0.pre'
</code></pre>
<p>To build and distribute the new gem:</p>
<pre><code>$ gem build railties/rails.gemspec
$ sudo gem install gemcutter
$ gem push drnic-rails-3.0.pre.gem
  Pushing gem to Gemcutter...
  Successfully registered gem: drnic-rails (3.0.pre)
</code></pre>
<p>Follow any first-time gemcutter instructions and SUCCESS! Now I have my own <a href="http://gemcutter.org/gems/drnic-rails">drnic-rails</a> gem.</p>
<h1 id="summary">Summary</h1>
<p>To find, clone, and fork any rubygem that is hosted on github:</p>
<pre><code>$ sudo gem install drnic-github
$ gh clone --search rails
$ gh fork
</code></pre>
<p>To personalise the gem and share it on gemcutter:</p>
<pre><code>&gt; edit the project.gemspec to have a unique name, e.g. yourname-project
$ gem build project.gemspec
$ sudo gem install gemcutter
$ gem push yourname-project-1.0.0.gem
</code></pre>
<p>I think this makes it much easier, faster and more fun to hack other people&#8217;s stuff.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li><li><a href='http://drnicwilliams.com/2008/10/31/newgem-100-all-thanks-to-cucumber/' rel='bookmark' title='Permanent Link: newgem 1.0.0 all thanks to Cucumber'>newgem 1.0.0 all thanks to Cucumber</a> <small>The New Gem Generator (newgem) was exciting, moderately revolutionary, and...</small></li><li><a href='http://drnicwilliams.com/2006/10/11/generating-new-gems/' rel='bookmark' title='Permanent Link: [ANN] Generating new gems for graceful goodliness'>[ANN] Generating new gems for graceful goodliness</a> <small> I don&#8217;t like you [1]. You don&#8217;t share code....</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=4I-bA7HLVnI:sxe5lERmsYk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=4I-bA7HLVnI:sxe5lERmsYk:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=4I-bA7HLVnI:sxe5lERmsYk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=4I-bA7HLVnI:sxe5lERmsYk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=4I-bA7HLVnI:sxe5lERmsYk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=4I-bA7HLVnI:sxe5lERmsYk:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2009/11/04/hacking-someones-gem-with-github-and-gemcutter/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>First look at rails 3.0.pre</title>
		<link>http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre/</link>
		<comments>http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 04:05:16 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Mocra]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=630</guid>
		<description><![CDATA[
This article is out of date in some aspects. See comments.


Today I had my first look at rails 3.0.pre and below are the sequence of steps I had to take to create a rails 3.0.pre application, and get it&#8217;s generators to work.
Why was I looking at the top-secret, yet open-source Rails 3.0? Their generators are [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2009/11/12/dead-simple-javascript-unit-testing-in-rails/' rel='bookmark' title='Permanent Link: Dead simple JavaScript Unit Testing in Rails'>Dead simple JavaScript Unit Testing in Rails</a> <small> Formats: Video/Screencast (410 Mb, torrent) | Video only (vimeo)...</small></li><li><a href='http://drnicwilliams.com/2009/10/07/rails-themes-can-remember-things/' rel='bookmark' title='Permanent Link: Rails themes can remember things'>Rails themes can remember things</a> <small>I was getting annoyed at having to remember all the...</small></li><li><a href='http://drnicwilliams.com/2009/10/06/install-any-html-themetemplate-into-your-rails-app/' rel='bookmark' title='Permanent Link: Install any HTML theme/template into your Rails app'>Install any HTML theme/template into your Rails app</a> <small> Have you ever even bothered to Google for &#8220;rails...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<div class="notice">
<p>This article is out of date in some aspects. See <a href="http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre/#comments">comments</a>.</p>
</div>
<p><img src="http://img.skitch.com/20091103-q3w8qjy8wmr3e9wasjqc95nf6g.jpg" alt="3.pre" style="float: right" /></p>
<p>Today I had my first look at rails 3.0.pre and below are the sequence of steps I had to take to create a rails 3.0.pre application, and get it&#8217;s generators to work.</p>
<p>Why was I looking at the top-secret, yet open-source Rails 3.0? Their generators are being migrated over to Thor and I wanted to see them in action. I was thinking I might migrate newgem to use Thor too.</p>
<p>Here&#8217;s a quick poke around of getting started and interesting things I found. Any hiccups and workarounds are meant as a guide to pre-pre-3.0 users/developers and not as a criticism of rails-core. Rails 3.0 is looking shiny and awesome.</p>
<p>NOTE: Since this is a &#8220;how to install and use&#8221; rails 3.0 edge, which is still in heavy development, this set of instructions might break. Let&#8217;s hope not.</p>
<h2 id="getting_started">Getting Started</h2>
<p>As of today, you cannot install 3.0.pre from rubygems [1]. So, let&#8217;s install them from source. Which is handy, you might like to patch something.</p>
<pre><code>$ cd ~/gems
$ git clone git://github.com/rails/rails.git
use_ruby_191 *
</code></pre>
<p>[*] If you are on OS X Snow Leopard I think you can ignore this. Otherwise, since you don&#8217;t have the 3.0.pre gems installed, you&#8217;re about to hit bump #1. Ruby 1.8.6 doesn&#8217;t have <code>Symbol#to_proc</code> but it&#8217;s required to create a rails app. This means you&#8217;ll need to be able to switch to another version of ruby temporarily if you&#8217;re on ruby 1.8.6 [2].</p>
<pre><code>cd ~/Sites
ruby ~/gems/rails/railties/bin/rails
</code></pre>
<p>Oooh, look at all the new options! Some new ones are:</p>
<pre><code>-F, [--freeze]             # Freeze Rails in vendor/rails from the gems
-O, [--skip-activerecord]  # Skip ActiveRecord files
-T, [--skip-testunit]      # Skip TestUnit files
-J, [--skip-prototype]     # Skip Prototype files
</code></pre>
<p>The <code>-D, --with-dispatchers</code> flags have been removed. <code>--freeze</code> isn&#8217;t new, but <code>-F</code> is.</p>
<p>So, to create an app, I dutifully used:</p>
<pre><code>ruby ~/gems/rails/railties/bin/rails edgerailsapp -F
</code></pre>
<p>BAM! Fail. The -F option to freeze/vendor rails fails without the gems installed. So don&#8217;t use it.</p>
<pre><code>ruby ~/gems/rails/railties/bin/rails edgerailsapp
ln -s ~/gems/rails vendor/rails
</code></pre>
<p>If you&#8217;re on Windows without the symlink command <code>ln</code>, then copy the downloaded rails source into <code>vendor/rails</code>.</p>
<h3 id="fetch_rails8217_dependencies">Fetch Rails&#8217; dependencies</h3>
<p>Rails 3.0 source uses the new bundler project to describe its own dependencies. From <a href="http://litanyagainstfear.com/blog/2009/10/14/gem-bundler-is-the-future/">Nick Quaranto&#8217;s article on bundler</a>, get the latest:</p>
<pre><code>cd ~/gems
git clone git://github.com/wycats/bundler
cd bundler
sudo rake install
</code></pre>
<p>Now, back in your app, you need to install some rails dependencies here too. It&#8217;s a good chance to see how you&#8217;ll bundle gem dependencies in the future.</p>
<pre><code>$ cd ~/Sites/edgerailsapp
</code></pre>
<p>Change the <code>Gemfile</code> in your project to the following:</p>
<pre><code>gem "rack",          "1.0.1"
gem "rack-mount",    :git =&gt; "git://github.com/rails/rack-mount.git"
gem "rack-test",     "~&gt; 0.5.0"
gem "erubis",        "~&gt; 2.6.0"
gem "arel",          :git =&gt; "git://github.com/rails/arel.git"
gem "sqlite3-ruby"
gem "rails", "3.0.pre", :git =&gt; "git://github.com/rails/rails.git"
</code></pre>
<p>Welcome to the future of gem dependencies for rails apps. Ultimately you won&#8217;t need to manually add these lines yourself. When rails is distributed as gems it will automatically install these for you, I assume/hope/guess. But for today, you seem to need them.</p>
<p>Now locally (within your app) install these gems:</p>
<pre><code>$ gem bundle
</code></pre>
<p>If you get &#8220;can&#8217;t convert Pathname into String&#8221; then revert to ruby 1.8.X and reinstall bundler into your 1.8 gem cache.</p>
<p>Phew. Ooh, my god. Phew. Only now will <code>script/generate</code> work.</p>
<pre><code>$ script/generate
</code></pre>
<p>For me, this outputs:</p>
<pre><code>Please select a generator.
Builtin: app, controller, generator, helper, integration_test, mailer, metal, migration, model, model_subclass, observer, performance_test, plugin, resource, scaffold, scaffold_controller, session_migration, stylesheets.
Others: app_layout:app_layout, check_migration_version:check_migration_version, home_route:home_route.
</code></pre>
<p>The &#8220;Builtin&#8221; generators are the latest and greatest in Thor technology. Rails 3.0 no longer uses its own generator but is built upon Thor.</p>
<p>For example, our old favourite <code>model</code> generator works thusly:</p>
<pre><code>$ script/generate model Post title:string --no-fixture
    invoke  active_record
    create    db/migrate/20091103030824_create_posts.rb
    create    app/models/post.rb
    invoke    test_unit
    create      test/unit/post_test.rb
</code></pre>
<p>Interestingly, <code>--no-fixture</code> isn&#8217;t mentioned in the usage information for <code>script/generate model</code>. It mentions the <code>--fixture</code> flag, but I had to guess that <code>--no-fixture</code> was also supported.</p>
<p>Hmm, I want to use rspec. So, let&#8217;s destroy these files:</p>
<pre><code>$ script/destroy model Post title:string
      invoke  active_record
.../vendor/gems/dirs/rails/railties/lib/rails/generators/active_record.rb:14:in
  `next_migration_number': uninitialized constant ActiveRecord::Base (NameError)
</code></pre>
<p>Oh well.</p>
<p>What if I wanted to run rspec and cucumber generators, for example, against an edge rails app?</p>
<h2 id="rails_2_generators">Rails 2 generators</h2>
<p>The &#8220;Others&#8221; generators are my own local generators from <code>~/.rails/generators</code>. Amusingly, instead of <code>app_layout</code> it is called <code>app_layout:app_layout</code>. Not surprisingly at all, if I try to run the rails 2 generator it fails:</p>
<pre><code>$ script/generate app_layout:app_layout
[WARNING] Could not load generator at "/Users/drnic/.rails/generators/app_layout/app_layout_generator.rb". Error: uninitialized constant Rails::Generator
Could not find generator app_layout:app_layout.
</code></pre>
<p>Poop. </p>
<p>Note, I have rspec, rspec-rails and cucumber gems installed locally but I cannot see their rails generators above. Rails 3 doesn&#8217;t look for generators in the same way and old Rails 2 generators don&#8217;t work anymore.</p>
<p>That&#8217;s the news: every rails 2 generator is broken. </p>
<p>When I start to migrate some of mine I&#8217;ll post about it. In the meantime, <a href="http://twitter.com/josevalim">José Valim</a> has written some introduction thoughts on <a href="http://blog.plataformatec.com.br/2009/07/creating-your-own-generators-with-thor/">using Thor as a generator</a>.</p>
<p>You can also probably learn about how to write rails 3.0 generators by looking at the source code for the new generators like <a href="http://github.com/rails/rails/blob/master/railties/lib/rails/generators/rails/app/app_generator.rb">rails</a>, model (see <a href="http://github.com/rails/rails/blob/master/railties/lib/rails/generators/rails/model/model_generator.rb">main</a> and  <a href="http://github.com/rails/rails/blob/master/railties/lib/rails/generators/test_unit/model/model_generator.rb">test_unit</a>), and <a href="http://github.com/rails/rails/blob/master/railties/lib/rails/generators/rails/resource/resource_generator.rb">scaffold/resource</a>.</p>
<p>Finally, José Valim has a <a href="http://github.com/josevalim/third_rails">sample Rails 3 app</a> with some vendored generators in it.</p>
<p>These are the things I&#8217;m researching now.</p>
<h2 id="summary">Summary</h2>
<p>This article is long, mostly because rails 3.0.pre hasn&#8217;t been released as a set of RubyGems. If it had, then all the dependencies would be installed automatically.</p>
<p>It also introduces gem/plugin writers to the first upgrade issue: your current generators are neither discovered nor work by a rails 3.0 app. We&#8217;re all clever cookies, so here&#8217;s hoping we can figure out the upgrade path and that it&#8217;s simple enough to not be the topic of Dan Brown&#8217;s next book.</p>
<h2 id="footnotes">Footnotes</h2>
<p>[1] Two portions of rails 3.0.pre are available as pre-release gems: activesupport (which is now very modularised and only loads up the parts that you require) and activemodel (which is shiny and new and hence completely safe for rails-core to release).</p>
<p>[2] There are two popular ways to have easy, non-intrusive access to alternate versions of ruby: <a href="http://www.rubyinside.com/rvm-ruby-version-manager-2347.html">rvm</a> and <a href="http://blog.thinkrelevance.com/2009/7/29/ruby-switcher-working-with-multiple-ruby-versions-has-never-been-this-easy">ruby_switcher.sh</a>.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2009/11/12/dead-simple-javascript-unit-testing-in-rails/' rel='bookmark' title='Permanent Link: Dead simple JavaScript Unit Testing in Rails'>Dead simple JavaScript Unit Testing in Rails</a> <small> Formats: Video/Screencast (410 Mb, torrent) | Video only (vimeo)...</small></li><li><a href='http://drnicwilliams.com/2009/10/07/rails-themes-can-remember-things/' rel='bookmark' title='Permanent Link: Rails themes can remember things'>Rails themes can remember things</a> <small>I was getting annoyed at having to remember all the...</small></li><li><a href='http://drnicwilliams.com/2009/10/06/install-any-html-themetemplate-into-your-rails-app/' rel='bookmark' title='Permanent Link: Install any HTML theme/template into your Rails app'>Install any HTML theme/template into your Rails app</a> <small> Have you ever even bothered to Google for &#8220;rails...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=uTRxWpITAIE:PU_gloH6Vh4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=uTRxWpITAIE:PU_gloH6Vh4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=uTRxWpITAIE:PU_gloH6Vh4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=uTRxWpITAIE:PU_gloH6Vh4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=uTRxWpITAIE:PU_gloH6Vh4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=uTRxWpITAIE:PU_gloH6Vh4:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>During integration tests you might want to load public/ files</title>
		<link>http://drnicwilliams.com/2009/10/10/during-integration-tests-you-might-want-to-load-public-files/</link>
		<comments>http://drnicwilliams.com/2009/10/10/during-integration-tests-you-might-want-to-load-public-files/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 21:46:17 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Mocra]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=624</guid>
		<description><![CDATA[I&#8217;ve been wondering recently &#8220;If I cache a file in public/ how do my integration tests access the file?&#8221;
By default, Rails&#8217; integration stack only calls into the routes/controllers. So the following fails, ironically with a 404 error:
$ script/console
&#62;&#62; app.get '404.html'
=&#62; 404

It should return 200. If I cache a file into public/ I want to be [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been wondering recently &#8220;If I cache a file in public/ how do my integration tests access the file?&#8221;</p>
<p>By default, Rails&#8217; integration stack only calls into the routes/controllers. So the following fails, ironically with a 404 error:</p>
<pre>$ script/console
&gt;&gt; app.get '404.html'
=&gt; 404
</pre>
<p>It should return <code>200</code>. If I cache a file into public/ I want to be able to pull it back out during the normal course of integration testing.</p>
<p>In integration testing, this problem manifested when I clicked a link to a cached asset, or an action redirected to a cached asset.</p>
<p><a href="http://tomayko.com/">Ryan Tomayko</a> seems to also have wondered about this, and had this conversation with <a href="http://m.onkey.org/">Pratik Naik</a> on twitter the other day that solved the problem for me:</p>
<p><img src="http://img.skitch.com/20091009-jpmxu4ucisw6ai73bndb4xxm3f.jpg" alt="Ryan Tomayko learns about Rails::Rack::Static" style="border: 10px solid #999;" /></p>
<p>What worked for me was to put the following at the bottom of my config/environments/cucumber.rb file (or your &#8230;/test.rb file if you do integration testing in that environment):</p>
<pre>config.middleware.use "Rails::Rack::Static"
</pre>
<p>Now, I can successfully load assets via the <code>get</code> helper, or indirectly via webrat clicking links, etc:</p>
<pre>$ script/console cucumber
&gt;&gt; app.get '404.html'
=&gt; 200
</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=jnMAoVeOucA:q30kZUbmr6s:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=jnMAoVeOucA:q30kZUbmr6s:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=jnMAoVeOucA:q30kZUbmr6s:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=jnMAoVeOucA:q30kZUbmr6s:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=jnMAoVeOucA:q30kZUbmr6s:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=jnMAoVeOucA:q30kZUbmr6s:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2009/10/10/during-integration-tests-you-might-want-to-load-public-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails themes can remember things</title>
		<link>http://drnicwilliams.com/2009/10/07/rails-themes-can-remember-things/</link>
		<comments>http://drnicwilliams.com/2009/10/07/rails-themes-can-remember-things/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 11:23:26 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Mocra]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[install_theme]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=604</guid>
		<description><![CDATA[I was getting annoyed at having to remember all the csspath/xpath expressions for a theme I reused in a new project.
So, install_theme now helps each theme folder remember the previously used settings.

gem install install_theme  # version 0.7.0+
install_theme path/to/rails_app path/to/template #content_box \
      --partial "header:#header h2" \
     [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre/' rel='bookmark' title='Permanent Link: First look at rails 3.0.pre'>First look at rails 3.0.pre</a> <small> This article is out of date in some aspects....</small></li><li><a href='http://drnicwilliams.com/2009/10/06/install-any-html-themetemplate-into-your-rails-app/' rel='bookmark' title='Permanent Link: Install any HTML theme/template into your Rails app'>Install any HTML theme/template into your Rails app</a> <small> Have you ever even bothered to Google for &#8220;rails...</small></li><li><a href='http://drnicwilliams.com/2009/03/30/closing-in-on-the-dream-one-click-to-deploy-rails-apps/' rel='bookmark' title='Permanent Link: Closing in on The Dream: &#8220;one-click-to-deploy Rails apps&#8221;'>Closing in on The Dream: &#8220;one-click-to-deploy Rails apps&#8221;</a> <small> Got a simple app you want to build? Allocate...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I was getting annoyed at having to remember all the csspath/xpath expressions for a theme I reused in a new project.</p>
<p>So, install_theme now helps each theme folder remember the previously used settings.</p>
<pre>
gem install install_theme  # version 0.7.0+
install_theme path/to/rails_app path/to/template #content_box \
      --partial "header:#header h2" \
      --partial sidebar:#sidebar"
</pre>
<p>Now, the next time you apply that same theme to another project you don&#8217;t need to mention &#8220;#content_box&#8221; or use the <code>--partial</code> flags:</p>
<pre>
install_theme path/to/another_rails_app path/to/template
</pre>
<h3>How?</h3>
<p>If you squint your eyes just right, you&#8217;ll notice that your original template folder now has an <code>install_theme.yml</code> file. It contains your original settings. You can imagine for yourself how the rest of the &#8220;themes can remember things&#8221; magic might work.</p>
<h3>Templates &#8220;For Ruby on Rails&#8221;</h3>
<p>If you are a template maker, you can now easily make your HTML template &#8220;For Ruby on Rails&#8221; by including an <code>install_theme.yml</code> file. Think of the children.</p>
<h3>Major change</h3>
<p>I changed the order of the first two arguments. In future, the path/to/template will be optional. Why? Imagine if each theme you ever used was cached in <code>~/.install_theme/themes</code> and you could select a theme from a list or by <code>--theme theme_name</code>. That seems neat.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre/' rel='bookmark' title='Permanent Link: First look at rails 3.0.pre'>First look at rails 3.0.pre</a> <small> This article is out of date in some aspects....</small></li><li><a href='http://drnicwilliams.com/2009/10/06/install-any-html-themetemplate-into-your-rails-app/' rel='bookmark' title='Permanent Link: Install any HTML theme/template into your Rails app'>Install any HTML theme/template into your Rails app</a> <small> Have you ever even bothered to Google for &#8220;rails...</small></li><li><a href='http://drnicwilliams.com/2009/03/30/closing-in-on-the-dream-one-click-to-deploy-rails-apps/' rel='bookmark' title='Permanent Link: Closing in on The Dream: &#8220;one-click-to-deploy Rails apps&#8221;'>Closing in on The Dream: &#8220;one-click-to-deploy Rails apps&#8221;</a> <small> Got a simple app you want to build? Allocate...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=nSMIu1-C6oA:rq_SSerCpUE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=nSMIu1-C6oA:rq_SSerCpUE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=nSMIu1-C6oA:rq_SSerCpUE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=nSMIu1-C6oA:rq_SSerCpUE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=nSMIu1-C6oA:rq_SSerCpUE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=nSMIu1-C6oA:rq_SSerCpUE:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2009/10/07/rails-themes-can-remember-things/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>hash bang cucumber</title>
		<link>http://drnicwilliams.com/2009/10/07/hash-bang-cucumber/</link>
		<comments>http://drnicwilliams.com/2009/10/07/hash-bang-cucumber/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 04:37:02 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Cucumber]]></category>
		<category><![CDATA[Trick]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=594</guid>
		<description><![CDATA[I don&#8217;t know if this is a good idea or not, but often I just wish I could copy and paste a cucumber feature file into the command line and have it just run the frigging scenarios without having to prefix it with &#8220;cucumber&#8221;.

Perhaps I&#8217;m a bit delirious but I think it would be fun [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2009/04/15/cucumber-building-a-better-world-object/' rel='bookmark' title='Permanent Link: Cucumber: building a better World (object)'>Cucumber: building a better World (object)</a> <small>How to write helper libraries for your Cucumber step definitions...</small></li><li><a href='http://drnicwilliams.com/2009/03/26/testing-outbound-emails-with-cucumber/' rel='bookmark' title='Permanent Link: Testing outbound emails with Cucumber'>Testing outbound emails with Cucumber</a> <small> My testimonial for Cucumber still stands even in 2009....</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know if this is a good idea or not, but often I just wish I could copy and paste a cucumber feature file into the command line and have it just run the frigging scenarios without having to prefix it with &#8220;cucumber&#8221;.</p>
<p><img src="http://img.skitch.com/20091007-fpa5dmbe4npyiyh3y61y3g1ahj.jpg" alt="running scenarios directly from command line" style="width: 100%" /></p>
<p>Perhaps I&#8217;m a bit delirious but I think it would be fun to paste <code>features/112_users_crud.feature</code> into the console and it would run the scenarios:</p>
<pre>$ features/users_crud.feature</pre>
<p>instead of having to always do the extra key strokes:</p>
<pre>$ cucumber features/users_crud.feature</pre>
<h3>Solution?</h3>
<p>Two steps:</p>
<ol>
<li>At the very top of each feature file add: <code>#!/usr/bin/env cucumber</code></li>
<li>Run <code>chmod +x features/*.feature</code>
</ol>
<p>Shazam!</p>
<h3>Hash bang me up!</h3>
<p>To apply this to all your feature files, jump into <code>script/console</code> or <code>irb</code> and run the following code within your project:</p>
<pre>
Dir["**/*.feature"].each do |feature|
  contents = File.read(feature)
  File.open(feature, "w") do |f|
    f << "#!/usr/bin/env cucumber\n\n"
    f << contents
  end
  `chmod +x "#{feature}"`
end
</pre>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2009/04/15/cucumber-building-a-better-world-object/' rel='bookmark' title='Permanent Link: Cucumber: building a better World (object)'>Cucumber: building a better World (object)</a> <small>How to write helper libraries for your Cucumber step definitions...</small></li><li><a href='http://drnicwilliams.com/2009/03/26/testing-outbound-emails-with-cucumber/' rel='bookmark' title='Permanent Link: Testing outbound emails with Cucumber'>Testing outbound emails with Cucumber</a> <small> My testimonial for Cucumber still stands even in 2009....</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=R1GgMp1ESA4:GkEDdxWisVg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=R1GgMp1ESA4:GkEDdxWisVg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=R1GgMp1ESA4:GkEDdxWisVg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=R1GgMp1ESA4:GkEDdxWisVg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=R1GgMp1ESA4:GkEDdxWisVg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=R1GgMp1ESA4:GkEDdxWisVg:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2009/10/07/hash-bang-cucumber/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Install any HTML theme/template into your Rails app</title>
		<link>http://drnicwilliams.com/2009/10/06/install-any-html-themetemplate-into-your-rails-app/</link>
		<comments>http://drnicwilliams.com/2009/10/06/install-any-html-themetemplate-into-your-rails-app/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 23:55:58 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[Mocra]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[install_theme]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=580</guid>
		<description><![CDATA[
Have you ever even bothered to Google for &#8220;rails html template&#8221;? There are millions of &#8220;Wordpress themes&#8221; you can download for free or less than $100, a thousand times more static HTML templates, but never any category of template called &#8220;Ruby on Rails theme&#8221;. 24 millions results for Googling single column html theme.
So we&#8217;re only [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2009/11/12/dead-simple-javascript-unit-testing-in-rails/' rel='bookmark' title='Permanent Link: Dead simple JavaScript Unit Testing in Rails'>Dead simple JavaScript Unit Testing in Rails</a> <small> Formats: Video/Screencast (410 Mb, torrent) | Video only (vimeo)...</small></li><li><a href='http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre/' rel='bookmark' title='Permanent Link: First look at rails 3.0.pre'>First look at rails 3.0.pre</a> <small> This article is out of date in some aspects....</small></li><li><a href='http://drnicwilliams.com/2009/10/07/rails-themes-can-remember-things/' rel='bookmark' title='Permanent Link: Rails themes can remember things'>Rails themes can remember things</a> <small>I was getting annoyed at having to remember all the...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://img.skitch.com/20091005-8at43u9msix8pbky8p2ft5ejj3.preview.jpg" alt="theme applied and menu update" style="float: right; display: inline; margin: 0 0 2px 7px; width: 40%"/></p>
<p>Have you ever even bothered to Google for &#8220;rails html template&#8221;? There are millions of &#8220;Wordpress themes&#8221; you can download for free or less than $100, a thousand times more static HTML templates, but never any category of template called &#8220;Ruby on Rails theme&#8221;. 24 millions results for Googling <a href="http://www.google.com/search?hl=en&amp;q=single+column+html+theme">single column html theme</a>.</p>
<p>So we&#8217;re only left with HTML templates. Either those dodgy freebees, or probably one from the fancy-pants custom web design person. But how do we install them to our Rails apps?</p>
<p>I don&#8217;t know. It sucks. And it takes more time than it should. Here&#8217;s my idea &#8211; a tool to install any HTML template into your Rails app. To treat any HTML template as if it was a &#8220;Ruby on Rails HTML Template&#8221;.</p>
<p>So I&#8217;ve started to try and make any &#8220;HTML Template&#8221; into a &#8220;Ruby on Rails Template&#8221; with the helper app <a href="http://github.com/drnic/install_theme">install_theme</a>.</p>
<h3 id="what8217s_it_do">What&#8217;s it do?</h3>
<p>Take any HTML/CSS template, <code>install_theme</code> will install the various assets into the appropriate places of your Rails application, and convert the main sample page of the template into your app/views/layouts/application.html.erb (or .haml). Easy peasy.</p>
<p>Instead of taking a few hours or a day to install a template into your Rails app, the most part now just takes a minute or two. Into either ERB or Haml. Repeatable if the original HTML/CSS template changes.</p>
<p>Consider a free admin template <a href="http://www.oswd.org/design/information/id/2312">Refreshed</a> [<a href="http://www.oswd.org/design/download/id/2312">download</a>].</p>
<p><a href="http://skitch.com/drnic/nb731/refreshed-theme"><img src="http://img.skitch.com/20091005-teh6s3axcj275q8tx7tjkwu3ht.jpg" alt="refreshed theme" /></a></p>
<p>Installing a theme for fun and profit into a fresh rails app:</p>
<pre>$ gem install install_theme
$ rails my_app
$ cd my_app
$ install_theme . path/to/theme/folder ".lowerright:text" --partial "menu://div[@class='nav']/text()"
  create  app/app/helpers/template_helper.rb
  create  app/controllers/original_template_controller.rb
  create  app/helpers/template_helper.rb
  create  app/views/layouts/_menu.html.erb
  create  app/views/layouts/application.html.erb
  create  app/views/original_template/index.html.erb
  create  public/images/footer.png
  ...
  create  public/stylesheets/style.css

Your theme has been installed into your app.
</pre>
<p>When you launch the app, it will be instantly themed. The section of the original template with DOM path <code>.lowerright</code> will be removed and replaced by your rendered actions.</p>
<p>The <code>--partial</code> flag converts a section into a partial template (or via <code>content_for</code> helper). More on this in a minute.</p>
<p>Note: the example above uses both CSS path and XPath expressions. For each section of the template you want to convert to a partial you use then <code>--partial</code> flag. The argument is &#8220;label:xpath&#8221; or &#8220;label:csspath&#8221;. So either <code>--partial "header://div[@id='header']/h2"</code> or <code>--partial "header:#header h2"</code>.</p>
<p>Here are the content and partial selections using CSSpath:</p>
<pre>$ install_theme . path/to/theme/folder ".lowerright:text" --partial "menu:.nav:text"
</pre>
<p><img src="http://img.skitch.com/20091005-e7wbqw6m198qtbdbe9y3h1s7j2.jpg" alt="refreshed theme - identifying partials" /></p>
<p>Here are the content and partial selections using XPath:</p>
<pre>$ install_theme . path/to/theme/folder "//div[@class='lowerright']/text()" --partial "menu://div[@class='nav']/text()"
</pre>
<p><img src="http://img.skitch.com/20091005-x673pwf9bshi4sbjhxa91ksenj.jpg" alt="refreshed theme - identifying partials" /></p>
<h2 id="overriding_the_theme_partials">Overriding the theme partials</h2>
<p>Now that you&#8217;ve selected portions of the template to be dynamically changeable partials, how do you change them?</p>
<ol>
<li>Use <code>&lt;% content_for :menu do %&gt; ... &lt;% end %&gt;</code> from any view template</li>
<li>Create a <code>_menu.html.erb</code> partial in your controller&#8217;s views folder, e.g. <code>app/views/posts/_menu.html.erb</code></li>
<li>Modify the <code>_menu.html.erb</code> partial in the <code>app/views/layouts</code> folder. This is the default source.</li>
</ol>
<p>The original template&#8217;s menu items (home, about, forum, etc) have been moved into <code>app/views/layouts/_menu.html.erb</code>. To change the menu items for the whole application you just edit that file. For this template, it will look like:</p>
<pre>&lt;a href="#"&gt;home&lt;/a&gt;
&lt;a href="#"&gt;about&lt;/a&gt;
&lt;a href="#"&gt;forum&lt;/a&gt;
&lt;a href="#"&gt;design&lt;/a&gt;
&lt;a href="#"&gt;info&lt;/a&gt;
&lt;a href="#"&gt;contact&lt;/a&gt;
</pre>
<p>This is the extracted content of the <code>.nav</code> DOM element. You now modify it to have the same DOM structure, a bunch of links, and you&#8217;ll get the same theme output.</p>
<p>Let&#8217;s change the menu across the entire application. Edit <code>app/views/layouts/_menu.html.erb</code>:</p>
<pre>&lt;%= link_to "home", "/" %&gt;
&lt;%= link_to "posts", posts_path %&gt;
&lt;%= link_to "new post", new_post_path %&gt;
</pre>
<p>If you wanted to change the menu for all actions in the posts controller, then create a similar partial in <code>app/views/posts/_menu.html.erb</code>.</p>
<p>If you wanted to change the menu for a specific action, then use <code>content_for</code> in your view:</p>
<pre>&lt;% content_for :menu do: %&gt;
  &lt;a href="/"&gt;home&lt;/a&gt;
  &lt;a href="/login"&gt;sign in&lt;/a&gt;
  &lt;a href="/signup"&gt;create account&lt;/a&gt;
&lt;% end %&gt;
</pre>
<h2 id="haml">Haml</h2>
<p>I use Haml and I like it. <code>install_theme</code> automatically detects if you are using Haml, and generates haml HTML views and sass CSS files.</p>
<pre>$ gem install drnic-haml --source http://gemcutter.org  # see below
$ rails my_haml_app
$ cd my_haml_app
$ haml --rails .
$ install_theme . path/to/theme/folder ".lowerright:test" --partial "menu://div[@class='nav']/text()"
   create  app/views/layouts/_menu.html.haml
   create  app/views/layouts/application.html.haml
   create  app/views/original_template/index.html.haml
   create  public/stylesheets/sass/style.sass
</pre>
<p>NOTE: there is a new version of haml&#8217;s html2haml (which install_theme uses) coming that fixes many bugs. In the short term, use the drnic-haml above.</p>
<h2 id="where8217d_my_original_content_go">Where&#8217;d my original content go?</h2>
<p>Your template might include examples of how a table looks, or a form, or pagination. It would good if they weren&#8217;t lost on the chopping floor.</p>
<p>The original template&#8217;s contents are stored at <code>app/views/original_templates/index.html.erb</code> and viewable at <a href="http://localhost:3000/original_template">http://localhost:3000/original_template</a></p>
<p>That means you can now copy + paste any sample HTML snippets as you need them.</p>
<h2 id="how_it_works">How it works?</h2>
<p>Look inside the generated <code>application.html.erb</code> file and you&#8217;ll see the following for each named partial:</p>
<pre>&lt;%= yield(:menu) || render_or_default('menu') %&gt;
</pre>
<p>The <code>yield(:menu)</code> enables the <code>content_for</code> helper to override the partials.</p>
<p>The <code>render_or_default</code> helper finds the appropriate partial to use (see app/helpers/template_helper.rb for source).</p>
<h2 id="the_future">The Future</h2>
<p>Let me know if anyone else thinks this is useful, and what other fun things you think it could do.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2009/11/12/dead-simple-javascript-unit-testing-in-rails/' rel='bookmark' title='Permanent Link: Dead simple JavaScript Unit Testing in Rails'>Dead simple JavaScript Unit Testing in Rails</a> <small> Formats: Video/Screencast (410 Mb, torrent) | Video only (vimeo)...</small></li><li><a href='http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre/' rel='bookmark' title='Permanent Link: First look at rails 3.0.pre'>First look at rails 3.0.pre</a> <small> This article is out of date in some aspects....</small></li><li><a href='http://drnicwilliams.com/2009/10/07/rails-themes-can-remember-things/' rel='bookmark' title='Permanent Link: Rails themes can remember things'>Rails themes can remember things</a> <small>I was getting annoyed at having to remember all the...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=ed_z5YLd1jo:bDjSBmk8WpU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=ed_z5YLd1jo:bDjSBmk8WpU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=ed_z5YLd1jo:bDjSBmk8WpU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=ed_z5YLd1jo:bDjSBmk8WpU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=ed_z5YLd1jo:bDjSBmk8WpU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=ed_z5YLd1jo:bDjSBmk8WpU:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2009/10/06/install-any-html-themetemplate-into-your-rails-app/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>FutureRuby talk: Living With 1000 Open Source Projects</title>
		<link>http://drnicwilliams.com/2009/07/13/futureruby-talk-living-with-1000-open-source-projects/</link>
		<comments>http://drnicwilliams.com/2009/07/13/futureruby-talk-living-with-1000-open-source-projects/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 15:56:59 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Cucumber]]></category>
		<category><![CDATA[Mocra]]></category>
		<category><![CDATA[Presentation]]></category>
		<category><![CDATA[Speaking]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=574</guid>
		<description><![CDATA[The FutureRuby conference has been (and still is, as of 11:43am on Sunday) wonderful. I just finished my talk on &#8220;Living With 1000 Open Source Projects&#8221; which was great fun, good for a bunch of laughs, and more importantly allowed me to share some thoughts on Zero Maintenance, Managing community expectations, self-sustaining communities, and the [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://futureruby.com">FutureRuby</a> conference has been (and still is, as of 11:43am on Sunday) wonderful. I just finished my talk on &#8220;Living With 1000 Open Source Projects&#8221; which was great fun, good for a bunch of laughs, and more importantly allowed me to share some thoughts on Zero Maintenance, Managing community expectations, self-sustaining communities, and the difficulty of scaling pet children.</p>
<p>Below are the slides and all the nice things people said about the talk, which has made me feel very good for sharing, and for the 60hr return flight from Brisbane to Toronto.</p>
<p>If you want to hear the jokes, and an Australian &#8220;mistaking&#8221; Canada for a state of America, perhaps wait for <a href="http://infoq.com">InfoQ</a> to publish the video.</p>
<h3>The slides</h3>
<div style="width:425px;text-align:left" id="__ss_1710647"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/drnic/living-with-1000-open-source-projects" title="Living With 1000 Open Source Projects">Living With 1000 Open Source Projects</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=livingwith1000opensourceprojects-novideos-090712054221-phpapp01&#038;stripped_title=living-with-1000-open-source-projects" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=livingwith1000opensourceprojects-novideos-090712054221-phpapp01&#038;stripped_title=living-with-1000-open-source-projects" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/drnic">Dr nic Williams</a>.</div>
</div>
<h3>Nice things people said</h3>
<p><a href="http://skitch.com/drnic/bacp4/drnic-futureruby"><img src="http://img.skitch.com/20090712-txxryk4juqm8kib2xmhherebd8.jpg" alt="@drnic #futureruby" /></a></p>
<h3>Thanks to&#8230;</h3>
<p><a href="http://designbyelle.com">Elle Meredith</a> who helped me design and theme the slides so they looked spot-on-awesome.</p>
<p>My <a href="http://www.flickr.com/photos/drnic/sets/72157620673400036/">two children</a> for not being old enough to be disturbed by some of the things I said about them during the talk.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=hNUGdTL9kNw:ajenhI4oi18:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=hNUGdTL9kNw:ajenhI4oi18:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=hNUGdTL9kNw:ajenhI4oi18:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=hNUGdTL9kNw:ajenhI4oi18:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=hNUGdTL9kNw:ajenhI4oi18:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=hNUGdTL9kNw:ajenhI4oi18:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2009/07/13/futureruby-talk-living-with-1000-open-source-projects/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Proof of Doctorhoodedness</title>
		<link>http://drnicwilliams.com/2009/07/05/proof-of-doctorhoodedness/</link>
		<comments>http://drnicwilliams.com/2009/07/05/proof-of-doctorhoodedness/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 03:34:42 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[For Hire]]></category>
		<category><![CDATA[Mocra]]></category>
		<category><![CDATA[Speaking]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=564</guid>
		<description><![CDATA[At recent conferences, other speakers have taken up an amusing new sport: ask Dr Nic to prove he&#8217;s a real doctor. Traditionally my reply is &#8220;I&#8217;m just not that clever to make it up.&#8221; Undeterred the personal challenges continued. At JAOO in Sydney and Brisbane (my home town) Glenn Vanderburg even challenged me to bring [...]]]></description>
			<content:encoded><![CDATA[<p>At recent conferences, other speakers have taken up an amusing new sport: ask Dr Nic to prove he&#8217;s a real doctor. Traditionally my reply is &#8220;I&#8217;m just not that clever to make it up.&#8221; Undeterred the personal challenges continued. At JAOO in Sydney and Brisbane (my home town) <a href="http://www.vanderburg.org/Blog">Glenn Vanderburg</a> even challenged me to bring my thesis to the conference. I accepted this challenge but then promptly forgot.</p>
<p>Today I actually found the thing. It&#8217;s red. The colour of the binding was my only chance to impose some sense of personalisation.</p>
<p>The title was <strong>The Morphing Architecture: Runtime Evolution of Distribute Applications.</strong> The abstract is too long to be bothered reciting here. Succinctly, as best I remember it, it could be:</p>
<blockquote><p>If you have distributed applications (components owned by multiple organisations) that run 24&#215;7, and you need to upgrade behaviour, how the hell do you sequence the live upgrade?</p></blockquote>
<div class="thumbnail"><a href="http://skitch.com/drnic/bst6h/the-thesis-cover"><img src="http://img.skitch.com/20090705-r57qnqxhbas51hr44fn5p2err8.preview.jpg" alt="the thesis: cover" /></a></div>
<p><br/></p>
<div class="thumbnail"><a href="http://skitch.com/drnic/bst67/the-thisis-submission"><img src="http://img.skitch.com/20090705-c63dw6t2fq16m817nite8n7dkc.preview.jpg" alt="the thisis: submission" /></a></div>
<p><br/></p>
<div class="thumbnail"><a href="http://skitch.com/drnic/bst66/the-thesis-acceptance"><img src="http://img.skitch.com/20090705-mekj64x9jbpcx7aqi5xx9cbe2e.preview.jpg" alt="the thesis: acceptance" /></a></div>
<p><br/></p>
<p>Like most PhDs, it is a project of theoretical usefulness, but not significantly close to any commercial interests so that some large company doesn&#8217;t solve all your interesting problems before you get around to writing a 200 page thesis.</p>
<p>In 220+ pages, the only interesting parts (to me now) are from my Acknowledgments section:</p>
<blockquote><p>As [my parent's] eldest of two sons, I am that person in each family who is the &#8220;first experiment in parenting.&#8221;</p></blockquote>
<p>The Acknowledgements section ended with this:</p>
<blockquote><p>And finally [thanks]&#8230;<br />
To all the people who ever came up to me&#8230;<br />
&nbsp;&nbsp;&nbsp;&nbsp;Asked me how my thesis was going&#8230;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Laughed hideously&#8230;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;And ran off.</p></blockquote>
<p>Ah, memories.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=OJrYBs_5TWY:j6iXfdFepPU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=OJrYBs_5TWY:j6iXfdFepPU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=OJrYBs_5TWY:j6iXfdFepPU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=OJrYBs_5TWY:j6iXfdFepPU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=OJrYBs_5TWY:j6iXfdFepPU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=OJrYBs_5TWY:j6iXfdFepPU:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2009/07/05/proof-of-doctorhoodedness/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
