<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-US">
  <id>tag:blog.agiledisciple.com,2008:/posts</id>
  <link rel="alternate" type="text/html" href="http://blog.agiledisciple.com/posts" />
  
  <title>Agile Disciple</title>
  <updated>2009-08-17T02:52:54Z</updated>
  <generator uri="http://enkiblog.com">Enki</generator>
  <author>
    <name>Christopher Redinger</name>
    <email>info@agiledisciple.com</email>
  </author>
  <link rel="self" href="http://feeds.feedburner.com/AgileDisciple" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry>
    <id>tag:blog.agiledisciple.com,2008:Post/26</id>
    <published>2009-08-17T02:52:00Z</published>
    <updated>2009-08-17T02:52:54Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AgileDisciple/~3/J3vvu9gsrTY/speaking-at-rubyrx" />
    <title>Speaking at RubyRX</title>
    <content type="html">&lt;p&gt;I&amp;#8217;ll be speaking at &lt;a href="http://nfjsone.com/conference/washington_dc/2009/09/rubyrx/event_about"&gt;RubyRX&lt;/a&gt; which takes place September 10-11. This event coincides with &lt;a href="http://nfjsone.com/conference/washington_dc/2009/09/agilerx/event_about"&gt;AgileRX&lt;/a&gt;, making it great event to attend.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ll be presenting on building a &lt;span class="caps"&gt;GPS&lt;/span&gt; tracking application in Rails. When I&amp;#8217;m not on stage, I&amp;#8217;m really looking forward to seeing some of the other sessions. In particular, I love to see Rich Kilmer and Dave Hussman&amp;#8217;s presentations.&lt;/p&gt;
&lt;p&gt;Please stop by and say Hi if you make it to this event.&lt;/p&gt;
&lt;p&gt;&lt;img src="/images/rubyrx.tiff" alt="" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AgileDisciple/~4/J3vvu9gsrTY" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://blog.agiledisciple.com/2009/08/17/speaking-at-rubyrx</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.agiledisciple.com,2008:Post/25</id>
    <published>2009-06-22T02:37:42Z</published>
    <updated>2009-06-22T02:37:42Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AgileDisciple/~3/09hNC_5hll8/ruby-tidbits-spork-your-cucumber" />
    <title>Ruby Tidbits: Spork your Cucumber</title>
    <content type="html">&lt;p&gt;This is a continuation of &lt;a href="http://agiledisciple.com/2009/06/14/ruby-tidbits-spork"&gt;last week&amp;#8217;s post&lt;/a&gt;. Not long after Tim Harper released Spork for RSpec, the &lt;a href="http://github.com/aslakhellesoy/cucumber"&gt;Cucumber&lt;/a&gt; team announced support for &lt;a href="http://wiki.github.com/aslakhellesoy/cucumber/spork-and-drb"&gt;Spork in Cucumber&lt;/a&gt;. If this sounds like some kind of dining meme, just let me show you how much of a picnic this is to use.&lt;/p&gt;
&lt;p&gt;Since the last blog post, Spork 0.5.7 has been released, so I&amp;#8217;ll be using that version here. Cucumber is at version 0.3.11.&lt;/p&gt;
&lt;p&gt;First, let&amp;#8217;s bootstrap Cucumber&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;  ruby script/generate cucumber&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Time to generate some features.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;  script/generate feature Spoon color:string size:string&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;We can make our features pass pretty easily for this example.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;  script/generate rspec_scaffold Spoon color:string size:string&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Don&amp;#8217;t forget to migrate&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;  rake db:migrate&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Now start spork for cucumber&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;  spork cuc&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And run the features&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;  rake features&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Now we&amp;#8217;re not going to see much here since this project is so small, but I did time the run on these.&lt;/p&gt;
&lt;p&gt;Without Spork&lt;br /&gt;
&lt;pre&gt;&lt;code&gt; time rake features&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;real	0m3.296s&lt;br /&gt;
user	0m2.456s&lt;br /&gt;
sys	0m0.756s&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;With Spork:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt; time rake features&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;real	0m1.914s&lt;br /&gt;
user	0m1.093s&lt;br /&gt;
sys	0m0.298s&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I would love to see some real world stats on this on somebody&amp;#8217;s cucumber suite. If you want help getting this going on your long running suite, let me know and I&amp;#8217;ll lend a hand in exchange for getting some timing results.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AgileDisciple/~4/09hNC_5hll8" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://blog.agiledisciple.com/2009/06/22/ruby-tidbits-spork-your-cucumber</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.agiledisciple.com,2008:Post/24</id>
    <published>2009-06-14T20:02:00Z</published>
    <updated>2009-06-14T20:02:50Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AgileDisciple/~3/nUjtaDejRvg/ruby-tidbits-spork" />
    <title>Ruby Tidbits: Spork </title>
    <content type="html">&lt;p&gt;Last week Tim Harper announced &lt;a href="http://github.com/timcharper/spork"&gt;Spork&lt;/a&gt;, which is billed as a better RSpec DRb server. What does that mean, and why should I care?&lt;/p&gt;
&lt;p&gt;&lt;a href="http://github.com/dchelimsky/rspec"&gt;RSpec&lt;/a&gt; of course is a Behavior Driven Development framework for Ruby. &lt;a href="http://www.ruby-doc.org/stdlib/libdoc/drb/rdoc/index.html"&gt;DRb&lt;/a&gt; is a distributed object system for Ruby, and it ships with the standard library.&lt;/p&gt;
&lt;p&gt;As a Rails code base gets larger, you can start to see app initialization times increase. In production, this isn&amp;#8217;t a big problem, since you aren&amp;#8217;t frequently starting your app. However, when you are involved in a rapid development/test cycle this can become a nuisance when you start to find yourself waiting for your app to initialize to run your tests.&lt;/p&gt;
&lt;p&gt;Spork aims to tackle this problem by only taking that initialization hit once. It starts up the application environment, and then listens over DRb. Then, RSpec can connect to that DRb server and run specs inside that process, skipping the initialization. Furthermore, before running the specs, Spork will fork itself, which is a relatively inexpensive call on &lt;span class="caps"&gt;POSIX&lt;/span&gt;&lt;sup class="footnote"&gt;&lt;a href="#fn1"&gt;1&lt;/a&gt;&lt;/sup&gt; systems. Then, when the specs are done running, this process can just go away, and we don&amp;#8217;t have to worry about object pollution when running specs again later.&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s see just how easy it is to get going with Spork.&lt;/p&gt;
&lt;p&gt;My environment for this tidbit includes:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Mac OS X 10.5.7&lt;/li&gt;
	&lt;li&gt;Rails 2.3.2&lt;/li&gt;
	&lt;li&gt;RSpec 1.2.6&lt;/li&gt;
	&lt;li&gt;The Spork I am installing is version 0.5.6&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Install Spork from Ruby gems.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;  sudo gem install spork&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Create (use an existing) Rails project&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;  rails crappy_spoon&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Edit config/environments/test.rb. And add the following lines to tell Rails we are using RSpec.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;  config.gem "rspec", :lib =&amp;gt; false
  config.gem "rspec-rails", :lib =&amp;gt; false&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Bootstrap the RSpec environment.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;  script/generate rspec&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m going to use scaffolding just to get some specs to try things out with. (Don&amp;#8217;t forget to migrate)&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;  script/generate rspec_scaffold Fork
  rake db:migrate&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I have a little benchmark script that will run a command an number of times and print out the results. Running rake to run these specs 5 times gives:&lt;/p&gt;
&lt;table&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;user&lt;/td&gt;
		&lt;td&gt;system&lt;/td&gt;
		&lt;td&gt;total&lt;/td&gt;
		&lt;td&gt;real&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;5.350000&lt;/td&gt;
		&lt;td&gt;6.364407&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;5.300000&lt;/td&gt;
		&lt;td&gt;5.648598&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;5.320000&lt;/td&gt;
		&lt;td&gt;5.694012&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;5.300000&lt;/td&gt;
		&lt;td&gt;5.610330&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;5.350000&lt;/td&gt;
		&lt;td&gt;5.824451&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;&amp;gt;total:&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;26.620000&lt;/td&gt;
		&lt;td&gt;29.141798&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;&amp;gt;avg:&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;5.324000&lt;/td&gt;
		&lt;td&gt;5.828360&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;So on average on my machine I had to wait 5.8 seconds to run all my specs.&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s enable Spork and try it again.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  spork --bootstrap&lt;/pre&gt;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;When that&amp;#8217;s done, it prints out a message for us.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Done. Edit /Users/redinger/workspaces/rubyrx/crappy_spoon/spec/spec_helper.rb now with your favorite text editor and follow the instructions.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So, let&amp;#8217;s go do that. I moved everything into the prefork section for this example. Here&amp;#8217;s my final spec_helper.rb:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  require 'rubygems'
  require 'spork'

  Spork.prefork do
    ENV["RAILS_ENV"] ||= 'test'
    require File.dirname(__FILE__) + "/../config/environment"
    require 'spec/autorun'
    require 'spec/rails'

    Spec::Runner.configure do |config|
      config.use_transactional_fixtures = true
      config.use_instantiated_fixtures  = false
      config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
    end
  end

  Spork.each_run do
  end&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then, edit spec.opts to enable drb:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  spec.opts --drb&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Load up spork&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; spork &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Rerunning the benchmark:&lt;/p&gt;
&lt;table&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;user&lt;/td&gt;
		&lt;td&gt;system&lt;/td&gt;
		&lt;td&gt;total&lt;/td&gt;
		&lt;td&gt;real&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;2.220000&lt;/td&gt;
		&lt;td&gt;3.100511&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;2.210000&lt;/td&gt;
		&lt;td&gt;3.147859&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.010000&lt;/td&gt;
		&lt;td&gt;2.230000&lt;/td&gt;
		&lt;td&gt;3.057866&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;2.190000&lt;/td&gt;
		&lt;td&gt;2.919749&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;2.190000&lt;/td&gt;
		&lt;td&gt;2.864102&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;&amp;gt;total:&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.010000&lt;/td&gt;
		&lt;td&gt;11.040000&lt;/td&gt;
		&lt;td&gt;15.090087&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;&amp;gt;avg:&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.002000&lt;/td&gt;
		&lt;td&gt;2.208000&lt;/td&gt;
		&lt;td&gt;3.018017&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;And we are now down to an average of 3 seconds. Obviously this is with a bare bones app, so we don&amp;#8217;t see the real performance savings that we would with a real world app. But, just for the sake of argument, let&amp;#8217;s say someone accidentally added a &lt;code&gt;sleep 5&lt;/code&gt; to the init process (simulating an additional 5 second app initialization time).&lt;/p&gt;
&lt;p&gt;Rerunning without Spork running (it&amp;#8217;s worth pointing out here if you run rspec without having a Spork process running, the specs will just revert to running the old way, printing out a message notifying you there is no server running.):&lt;/p&gt;
&lt;table&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;user&lt;/td&gt;
		&lt;td&gt;system&lt;/td&gt;
		&lt;td&gt;total&lt;/td&gt;
		&lt;td&gt;real&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;6.150000&lt;/td&gt;
		&lt;td&gt;18.199735&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;5.040000&lt;/td&gt;
		&lt;td&gt;10.131084&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;5.040000&lt;/td&gt;
		&lt;td&gt;10.217521&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;5.060000&lt;/td&gt;
		&lt;td&gt;10.121561&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;5.020000&lt;/td&gt;
		&lt;td&gt;10.150404&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;&amp;gt;total:&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;26.310000&lt;/td&gt;
		&lt;td&gt;58.820305&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;&amp;gt;avg:&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;5.262000&lt;/td&gt;
		&lt;td&gt;11.764061&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;That causes the extra time to be seen for each running of the specs. Under spork, which takes an additional 5 seconds to start up the Spork server:&lt;/p&gt;
&lt;table&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;user&lt;/td&gt;
		&lt;td&gt;system&lt;/td&gt;
		&lt;td&gt;total&lt;/td&gt;
		&lt;td&gt;real&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;2.090000&lt;/td&gt;
		&lt;td&gt;2.722946&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;2.080000&lt;/td&gt;
		&lt;td&gt;2.661724&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;2.110000&lt;/td&gt;
		&lt;td&gt;2.731659&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;2.080000&lt;/td&gt;
		&lt;td&gt;2.665148&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.010000&lt;/td&gt;
		&lt;td&gt;2.100000&lt;/td&gt;
		&lt;td&gt;2.647866&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;&amp;gt;total:&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.010000&lt;/td&gt;
		&lt;td&gt;10.460000&lt;/td&gt;
		&lt;td&gt;13.429343&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;&amp;gt;avg:&lt;/td&gt;
		&lt;td&gt;0.000000&lt;/td&gt;
		&lt;td&gt;0.002000&lt;/td&gt;
		&lt;td&gt;2.092000&lt;/td&gt;
		&lt;td&gt;2.685869&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;No extra time. (Technically, less time, but we&amp;#8217;ll count that as margin of error.)&lt;/p&gt;
&lt;p&gt;One final thing to point out, if you just run &lt;code&gt;spork -d&lt;/code&gt; it will run diagnostic mode, which will list which files are being preloaded, and don&amp;#8217;t get reloaded each time the specs are run.&lt;/p&gt;
&lt;p&gt;Hopefully if you are using RSpec in your Rails project you can see how using spork can immediately benefit you.&lt;/p&gt;
&lt;p class="footnote" id="fn1"&gt;&lt;sup&gt;1&lt;/sup&gt; Right, I said &lt;span class="caps"&gt;POSIX&lt;/span&gt;, so Windows users will need to pursue a different solution for now.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AgileDisciple/~4/nUjtaDejRvg" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://blog.agiledisciple.com/2009/06/14/ruby-tidbits-spork</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.agiledisciple.com,2008:Post/23</id>
    <published>2009-04-28T20:57:58Z</published>
    <updated>2009-04-28T20:57:58Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AgileDisciple/~3/vQJvDVkYKOE/barcamprdu-2009" />
    <title>BarCampRDU 2009</title>
    <content type="html">&lt;p&gt;Registration has opened for &lt;a href="http://barcamp.org/BarCampRDU"&gt;BarCampRdu&lt;/a&gt;. It&amp;#8217;s free as always, so I&amp;#8217;ve &lt;a href="http://barcamprdu2009.eventbrite.com/"&gt;registered&lt;/a&gt;. And you should too.&lt;/p&gt;
&lt;p&gt;See you there!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AgileDisciple/~4/vQJvDVkYKOE" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://blog.agiledisciple.com/2009/04/28/barcamprdu-2009</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.agiledisciple.com,2008:Post/22</id>
    <published>2009-04-21T04:22:14Z</published>
    <updated>2009-04-21T04:22:14Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AgileDisciple/~3/ueXe5vP8C9Q/default-routes-and-rails-engines-dont-mix" />
    <title>Default Routes and Rails Engines don't mix</title>
    <content type="html">&lt;p&gt;Of course we&amp;#8217;ve known for a while to not use default routes in combination with restful routes. However, there is a hidden danger when dealing with Engines. I was doing what should have been a quick experiment with an Engine in Rails 2.3. So, I generated a default app.&lt;/p&gt;
&lt;pre&gt;
  rails cereal
  rails fruits
  cd cereal
  script/generate scaffold cornflake
&lt;/pre&gt;
&lt;p&gt;Then I &lt;a href="http://railscasts.com/episodes/149-rails-engines"&gt;follow the incantation&lt;/a&gt; to get my fruits engine into my cereal app. Part of that process involves copying over the routes.rb file. However, by default, that has these unfortunate routes defined already:&lt;/p&gt;
&lt;pre&gt;
  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'
&lt;/pre&gt;
&lt;p&gt;Now, I hit my app at /cornflakes/new, hit the &amp;#8216;Create&amp;#8217; button, and it posts to &amp;#8230; my &amp;#8216;index&amp;#8217; action?? What&amp;#8217;s up with that? Well, it took a while, but then I remembered that default route. I&amp;#8217;m assuming that the plugin routes get processed first, and that default route is getting installed before my resourceful route. Meaning, nothing in my app&amp;#8217;s routes.rb file is going to get recognized. No corn flakes, no lucky charms, nothing.&lt;/p&gt;
&lt;p&gt;Removing the offending lines set the world back to normal. Time to eat.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AgileDisciple/~4/ueXe5vP8C9Q" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://blog.agiledisciple.com/2009/04/21/default-routes-and-rails-engines-dont-mix</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.agiledisciple.com,2008:Post/21</id>
    <published>2009-04-20T22:13:00Z</published>
    <updated>2009-04-20T22:13:31Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AgileDisciple/~3/FPXBEUrtmUg/passenger-nginx-and-leopard-development" />
    <title>Passenger, nginx &amp; Leopard development</title>
    <content type="html">&lt;p&gt;If you&amp;#8217;re wondering if you can still develop on your Mac using Passenger along with the nginx config &amp;#8211; the answer is of course you can!&lt;/p&gt;
&lt;p&gt;First, &lt;a href="http://blog.phusion.nl/2009/04/16/phusions-one-year-anniversary-gift-phusion-passenger-220/"&gt;follow the installation instructions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Then you&amp;#8217;ll need to edit your /etc/hosts file to tell your host about the virtual domain. (This is only necessary I assume until the fantastic &lt;a href="http://www.fngtps.com/passenger-preference-pane"&gt;Passenger Preference Pane&lt;/a&gt; is updated to work with nginx)&lt;/p&gt;
&lt;pre&gt;
  127.0.0.1  localhost my_facebook_killer.local
&lt;/pre&gt;
&lt;p&gt;Finally, update your nginx.conf, which is pretty much the same as the Passenger installation instructions, with one extra line for development.&lt;/p&gt;
&lt;pre&gt;
  server {
    listen 80;
    server_name my_facebook_killer.local;
    root /path/to/your/rails/app/public;
    passenger_enabled on;
    rails_env development;  # This line tells passenger to start in development mode.
  }
&lt;/pre&gt;
&lt;p&gt;Now restart nginx and you should be able to test your app by hitting http://my_facebook_killer.local in your browser&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AgileDisciple/~4/FPXBEUrtmUg" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://blog.agiledisciple.com/2009/04/20/passenger-nginx-and-leopard-development</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.agiledisciple.com,2008:Post/20</id>
    <published>2009-04-16T19:37:32Z</published>
    <updated>2009-04-16T19:37:32Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AgileDisciple/~3/JFIT99SEsK0/there-thats-better" />
    <title>There, that's better</title>
    <content type="html">&lt;p&gt;It seems like just the other day I was bemoaning the fact that in order to run Phusion Passenger, I had to run Apache. Well Happy Birthday to Phusion, today they &lt;a href="http://blog.phusion.nl/2009/04/16/phusions-one-year-anniversary-gift-phusion-passenger-220/"&gt;announced nginx support&lt;/a&gt;. No sooner did I read that than I hopped on my server and ripped out Apache for the leaner, sleaker &lt;a href="http://nginx.net/"&gt;nginx&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Shortly thereafter, I&amp;#8217;m up and running again. Fantastic.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AgileDisciple/~4/JFIT99SEsK0" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://blog.agiledisciple.com/2009/04/16/there-thats-better</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.agiledisciple.com,2008:Post/19</id>
    <published>2009-04-13T20:05:00Z</published>
    <updated>2009-04-13T20:05:57Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AgileDisciple/~3/_Z1SNGpqRVo/can-t-find-the-phusion-passenger-apache-module-visit-http-www-modrails-com-for-installation-instructions" />
    <title>Can't find the Phusion Passenger Apache module</title>
    <content type="html">&lt;p&gt;&lt;code&gt;
Can't find the Phusion Passenger Apache module. Visit http://www.modrails.com for installation instructions.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I started receiving this message after upgrading my Phusion Passenger. And possibly other stuff. Rerunning the passenger setup didn&amp;#8217;t work. Then, while looking through my httpd.conf file, I found this line near the top:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;
LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Which referenced an older version of passenger. Removing that line made things happy again. Of course, I am references the correct version now, down at the bottom of the file.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AgileDisciple/~4/_Z1SNGpqRVo" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://blog.agiledisciple.com/2009/04/13/can-t-find-the-phusion-passenger-apache-module-visit-http-www-modrails-com-for-installation-instructions</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.agiledisciple.com,2008:Post/18</id>
    <published>2009-04-13T17:24:00Z</published>
    <updated>2009-04-13T17:24:36Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AgileDisciple/~3/xmU201EvdnM/getting-things-done-with-the-hitlist" />
    <title>Getting Things Done With The Hitlist</title>
    <content type="html">&lt;p&gt;&lt;a href="http://www.potionfactory.com/thehitlist"&gt;The HitList&lt;/a&gt; is a nice little app that got thrown into the last &lt;a href="http://www.macheist.com/"&gt;MacHeist&lt;/a&gt;. I&amp;#8217;m pretty impressed with it and am currently playing around with implementing some variant of Getting Things Done that will work for me. If you are looking for an app like this and have already passed on Things, I&amp;#8217;d highly suggest checking it out.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AgileDisciple/~4/xmU201EvdnM" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://blog.agiledisciple.com/2009/04/13/getting-things-done-with-the-hitlist</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.agiledisciple.com,2008:Post/17</id>
    <published>2009-04-10T06:10:34Z</published>
    <updated>2009-04-10T06:10:34Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AgileDisciple/~3/PPuoB9aXRRA/switching-it-up" />
    <title>Switching It Up</title>
    <content type="html">&lt;p&gt;Having some free time on my hands today, I decided it was time to switch things up on my blog software. So, as of this evening, here&amp;#8217;s how things are looking around here.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Hosted at &lt;a href="http://mosso.com"&gt;Mosso&lt;/a&gt;. Because the cloud is where it&amp;#8217;s at. I wanted my blog in the clouds, too. And cheaper.&lt;/li&gt;
	&lt;li&gt;Served by &lt;a href="http://www.modrails.com/"&gt;Phusion Passenger&lt;/a&gt;. Because Passenger is fantastic for hosting. I was sad to leave Nginx behind and have to return to Apache. But, Passenger was enticing enough.&lt;/li&gt;
	&lt;li&gt;Running &lt;a href="http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/"&gt;Ruby 1.9.1&lt;/a&gt;. Because it&amp;#8217;s time to leave the 1.8.x branch behind.&lt;/li&gt;
	&lt;li&gt;Blogging engine provided by &lt;a href="http://github.com/redinger/enki"&gt;Enki&lt;/a&gt;. Because I&amp;#8217;m a Ruby developer, and this blog engine really speaks to me.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Granted now I need to spend some time cleaning a few things up. But, overall this migration could not have been any easier.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AgileDisciple/~4/PPuoB9aXRRA" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://blog.agiledisciple.com/2009/04/10/switching-it-up</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.agiledisciple.com,2008:Post/16</id>
    <published>2009-02-17T22:24:00Z</published>
    <updated>2009-02-17T22:28:22Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AgileDisciple/~3/cyJGm_bz194/debugging-phusion-passenger" />
    <title>Debugging Phusion Passenger</title>
    <content type="html">I wrapped up &lt;a href="http://duckpunching.com/passenger-mod_rails-for-development-now-with-debugger"&gt;Adam Meehan's&lt;/a&gt; Passenger Debugging instructions into a gem for easier installation across all my rails projects.It's on &lt;a href="http://github.com/redinger/passenger_debugger/tree/master"&gt;the GitHubs&lt;/a&gt;. Just waiting for the gem to get built.&lt;img src="http://feeds.feedburner.com/~r/AgileDisciple/~4/cyJGm_bz194" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://blog.agiledisciple.com/2009/02/17/debugging-phusion-passenger</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.agiledisciple.com,2008:Post/15</id>
    <published>2009-02-13T01:40:00Z</published>
    <updated>2009-02-13T01:41:11Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AgileDisciple/~3/lw92Al0H4Ps/big-chimpin" />
    <title>Big Chimpin</title>
    <content type="html">Trying out the Chi.mp beta.&lt;a href="http://redinger.mp"&gt;redinger.mp&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/AgileDisciple/~4/lw92Al0H4Ps" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://blog.agiledisciple.com/2009/02/13/big-chimpin</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.agiledisciple.com,2008:Post/14</id>
    <published>2009-01-30T14:49:00Z</published>
    <updated>2009-01-30T14:50:26Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AgileDisciple/~3/KF70_7Wj5DE/freelancing-again" />
    <title>Freelancing Again</title>
    <content type="html">Just a quick note to say that I'm once again available for Ruby freelancing work.&lt;img src="http://feeds.feedburner.com/~r/AgileDisciple/~4/KF70_7Wj5DE" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://blog.agiledisciple.com/2009/01/30/freelancing-again</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.agiledisciple.com,2008:Post/13</id>
    <published>2008-08-12T14:52:00Z</published>
    <updated>2008-08-12T14:52:52Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AgileDisciple/~3/0os_1kyG34w/hoedown-in-10-minutes" />
    <title>Hoedown in 10 minutes</title>
    <content type="html">&lt;p&gt;Couldn&amp;#8217;t be there? &lt;a href="http://www.railsenvy.com/2008/8/12/the-ruby-hoedown-in-10-minutes"&gt;Watch the video.&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AgileDisciple/~4/0os_1kyG34w" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://blog.agiledisciple.com/2008/08/12/hoedown-in-10-minutes</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.agiledisciple.com,2008:Post/12</id>
    <published>2008-08-12T02:23:00Z</published>
    <updated>2008-08-12T02:28:38Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AgileDisciple/~3/XfEYb-isrKs/ruby-hoedown-08" />
    <title>Ruby Hoedown '08</title>
    <content type="html">&lt;p&gt;This past weekend I attended the &lt;a href="http://rubyhoedown.com"&gt;Ruby Hoedown&lt;/a&gt; in Hunstville, AL. As one of the members of the talk selection committee, I don&amp;#8217;t mind saying at all that I thought the line up was fantastic.&lt;/p&gt;	&lt;p&gt;I really liked &lt;a href="http://errtheblog.com/"&gt;Chris Wanstrath&amp;#8217;s&lt;/a&gt; anti-keynote. I say anti-keynote, because he basically wrote an essay and then presented it to us without slides. He said later that he was a better writer than speaker; and I&amp;#8217;d say it definitely worked. The essay was funny and motivating. I couldn&amp;#8217;t do justice trying to summarize it, so make sure to check out the video when it shows up on &lt;a href="http://confreaks.com/"&gt;Confreaks&lt;/a&gt;, hopefully next week. (Though not bringing GitHub t-shirts was a &lt;b&gt;fail&lt;/b&gt;)&lt;/p&gt;	&lt;p&gt;We got a two-for-one talk from &lt;a href="http://reinh.com/"&gt;Rein&amp;#8217;s&lt;/a&gt; talk about best practice patterns. The best part was the first talk, which covered such topics as unfactoring: undoing common refactorings for job security. After all if you refactor your code so anybody can understand it, then anybody can maintain it too, so you&amp;#8217;re programming yourself out of a job. Bad idea. And if you &lt;span class="caps"&gt;DRY&lt;/span&gt; up your code, you will be able to add new features more quickly. But why would you want to do that if you get paid by the hour?&lt;/p&gt;	&lt;p&gt;The lightning talk that really stood out to me was &lt;a href="http://smartic.us/"&gt;Bryan Liles&lt;/a&gt; TATFT version of his testing talk. The slides for the whole thing are up on his site, so it&amp;#8217;s worth looking through while waiting for the video.&lt;/p&gt;	&lt;p&gt;Another high point was &lt;a href="http://gilesbowkett.blogspot.com/"&gt;Giles Bowkett&amp;#8217;s&lt;/a&gt; talk on Archaeopteryx: A Ruby &lt;span class="caps"&gt;MIDI&lt;/span&gt; Generator. I loved the way he just jumped right into the demoing his app for us without giving us any background. So many talks start off slow before getting to the good stuff. He started with it by demoing what Archaeopteryx could do. The title was kind of misleading though, because the talk was really about doing stuff you love, because you love it. Which is why we have this app now.&lt;/p&gt;	&lt;p&gt;Of course Friday night was the &lt;a href="http://www.hashrocket.com/"&gt;Hashrocket&lt;/a&gt; after-event party. In the RV. In the parking lot at the Marriott. Thanks for doing this guys. The party was definitely worth being exhausted the next day. Best part? The &lt;a href="http://www.flickr.com/photos/zachinglis/2745056295/"&gt;hand-made beer pong table&lt;/a&gt; Yes, it actually made it through a game of beer pong.&lt;/p&gt;	&lt;p&gt;In other big news, &lt;a href="http://www.jeremymcanally.com/"&gt;Jeremy McAnally&lt;/a&gt; is planning next year&amp;#8217;s Ruby Hoedown in Nashville. The plan now is to make the conference free to attenders. Hopefully I&amp;#8217;ll see you there!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AgileDisciple/~4/XfEYb-isrKs" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://blog.agiledisciple.com/2008/08/12/ruby-hoedown-08</feedburner:origLink></entry>
</feed>
