<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Blog &#124; Rubyyot &#187; Programming</title>
	<atom:link href="http://blog.rubyyot.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rubyyot.com</link>
	<description>Programming, Pragmatism and Getting By in the World</description>
	<lastBuildDate>Wed, 24 Mar 2010 00:14:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>So What&#8217;s the Deal with IndexCards?</title>
		<link>http://blog.rubyyot.com/2010/03/so-whats-the-deal-with-indexcards/</link>
		<comments>http://blog.rubyyot.com/2010/03/so-whats-the-deal-with-indexcards/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 00:09:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[#daily365]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[indexcards]]></category>
		<category><![CDATA[rubyyot]]></category>
		<category><![CDATA[tokyo cabinet]]></category>

		<guid isPermaLink="false">http://blog.rubyyot.com/?p=721</guid>
		<description><![CDATA[What&#8217;s all this IndexCards nonsense?
IndexCards is a website that I&#8217;ve been devoting a good deal of my free time to recently.  It is a family project where we draw new stuff on index cards everyday.
So it&#8217;s an Art Project?
Well yes, and no.  IndexCards is:

An Art Project &#8211; You got me, yes it&#8217;s in [...]]]></description>
			<content:encoded><![CDATA[<h2>What&#8217;s all this IndexCards nonsense?</h2>
<p>IndexCards is a website that I&#8217;ve been devoting a good deal of my free time to recently.  It is a family project where we draw new stuff on index cards everyday.</p>
<h2>So it&#8217;s an Art Project?</h2>
<p>Well yes, and no.  <a href="http://indexcards.rubyyot.com" target="_blank">IndexCards</a> is:</p>
<ul>
<li>An Art Project &#8211; You got me, yes it&#8217;s in some ways completely non-technical.</li>
<li>A Family Activity &#8211; Since my kids have gotten involved, it has just gotten better and better.</li>
<li>An Evolving Sinatra Based Website &#8211; My first Sinatra based project, and I am really liking it.</li>
<li>A Way for Me to Try out Tokyo Cabinet &#8211; I&#8217;ve found that I don&#8217;t always need a relational database.</li>
<li>An Opportunity to Use my Razsell Gem &#8211; A live app that consumes feeds from Zazzle.</li>
<li>A Design Project &#8211; Let&#8217;s face it creating a website from scratch that is part of the design community raises the bar a little.</li>
</ul>
<h3>IndexCards is an Art Project</h3>
<p>I created IndexCards in response to the <a href="http://www.smashingmagazine.com/2009/12/22/design-something-every-day/" target="_blank">Design Something Every Day Challenge</a> posted on Smashing Magazine at the end of 2009.  I enjoy drawing and painting, but have directed so much of my interest towards Ruby and Open Source Projects (and the internet) in the past couple years that I haven&#8217;t spent time creating any art.  As a new years resolution, I decided to change this by accepting the challenge.</p>
<h3>IndexCards is a Family Activity</h3>
<p>After a month or so of me scribbling away on little pieces of paper, my kids asked me what I was up to.  So I explained that it is a project to help me to improve my artistic skills and &#8220;enjoy the journey&#8221; so to speak.  They all wanted to participate and so I&#8217;ve been including them since then.  Recently, I&#8217;ve started creating <a href="http://indexcards.rubyyot.com/events" target="_blank">Art Night events</a> where I introduce a theme and we all start drawing away.  It has been a great family activity and I&#8217;ve been very impressed by all of their work.</p>
<h3>IndexCards is an Evolving Sinatra Based Website</h3>
<p>OK there is a technical side to this project, but that&#8217;s perfect for me.  I find that I like both the technical and creative sides of things.  When one side of my brain needs a break I can flip over to the other and continue working on the project.  A lot of the site&#8217;s inner workings are not visible from the web, but there is definitely a web based component.  For that I decided to use <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> and it&#8217;s been great to work with.  It&#8217;s a lot more open that working with Ruby on Rails, but many of the tedious parts of working directly with Rack have been smoothed out.  I&#8217;m interested<br />
in creating another Sinatra based application.</p>
<h3>IndexCards is a Way for Me to Try Out Tokyo Cabinet</h3>
<p>Another technical bit I wanted to try out in <a href="http://1978th.net/tokyocabinet/" target="_blank">Tokyo Cabinet</a> a key value store of Mixi fame.  I used the rufus-tokyo gem to interface with Ruby along with the Repository pattern.  I was really worried at first that I&#8217;d get to a point where I really<br />
needed a relational database and I&#8217;d have to rewrite the data persistence in MySql.  As the project goes on, I&#8217;m finding that my fears were unfounded.  Tokyo Cabinet was a great fit for the project.</p>
<h3>IndexCards is an Opportunity to Use my Razsell Gem</h3>
<p>Ah <a href="http://github.com/rubyyot/razsell" target="_blank">Razsell</a>.  I created this gem while starting out on Kung Fu Tees, a T-shirt design site I wanted to make with my kids. Kung Fu Tees, this far is vaporware, but Razsell has emerged as it&#8217;s own project any users.  It allows you to query the Zazzle.com rss API and consume the feed to populate a store.  Using it has caused me to make a few changes, which is great, because that&#8217;s what happens when you really use the code you write.</p>
<h3>IndexCards is a Design Project</h3>
<p>So I&#8217;ve always been wary of CSS and web design in general.  I mean I&#8217;m ok at it, but am generally disappointed with the look of my sites when I compare them to so many of the other websites out there.  Designing a website that is part of the web design community ups the ante a bit.  So far I&#8217;m not<br />
completely satisfied with it, but it is much better than I&#8217;d feared it would be.</p>
<h2>But, Why Index Cards?</h2>
<p>I wanted to draw daily, but I didn&#8217;t want to burden myself with a huge canvas.  Index cards are the perfect size to constrain the scope of the image and challenge me to make it fit.  Not to mention they are cheap and you can find them almost anywhere.  That leaves a little budget for art supplies, and<br />
I&#8217;ve been picking up a few things here and there.  Just today I ordered a <a href="http://www.lamyusa.com/safari.html" target="_blank">Lamy Safari fountain pen</a> to try out, and am looking forward to it.</p>
<p>Original small works of art (<a href="http://www.ebsqart.com/Galleries/cmd_Art_Gallery_OSWOA%20Original%20Small%20Works%20of%20Art_1_1.htm" target="_blank">OSWOA</a>) have<br />
stemmed from the Artist Trading Cards and ACEO communities on ebay.  Maybe I can find a tie-in for those.  They fit right in.</p>
<h2>IndexCards is fun, You Should Check it Out</h2>
<p>If you haven&#8217;t been to <a href="http://indexcards.rubyyot.com" target="_blank">IndexCards</a> go take a look.  Maybe you will be inspired to do some art of your own.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rubyyot.com/2010/03/so-whats-the-deal-with-indexcards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting 502 Bad Gateway with Passenger after cleaning gems</title>
		<link>http://blog.rubyyot.com/2010/02/getting-502-bad-gateway-with-passenger-after-cleaning-gems/</link>
		<comments>http://blog.rubyyot.com/2010/02/getting-502-bad-gateway-with-passenger-after-cleaning-gems/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 17:50:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[gem clean]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://blog.rubyyot.com/?p=718</guid>
		<description><![CDATA[502 Bad Gateway
Recently I was updating some gems on my server. I did a gem update and a gem update &#8211;system.  Everything seemed to be running smoothly.  However a few minutes later I was checking my sites and I discovered that all of my Rack based sites were down and giving a 502 [...]]]></description>
			<content:encoded><![CDATA[<h2>502 Bad Gateway</h2>
<p>Recently I was updating some gems on my server. I did a gem update and a gem update &#8211;system.  Everything seemed to be running smoothly.  However a few minutes later I was checking my sites and I discovered that all of my Rack based sites were down and giving a 502 error.</p>
<h2>The Background</h2>
<p>In my short experience being my own webmaster, I&#8217;ve found that the 502 error code is the most unhelpful of error codes. It means that your app is not working.  After a few times checking my error logs I noticed that the error that was bubbling up was &#8220;No such file or directory&#8221;.  So I took this and searched through my apps looking for a file that might be missing</p>
<p>After a few hours of searching, restarting Nginx and reinstalling passenger, my apps and my gems, I took some time to think about the issue. I realized that all of my passenger apps were now suddenly failing, but my wordpress blog was still chugging along just fine. So I decided that the problem must be with Passenger.</p>
<h2>The Culprit</h2>
<p>After much digging around, I found that the Nginx config was still pointing to the Passenger version 2.2.9.  A version I&#8217;d removed with gem clean many hours before.  Once I updated this to version 2.2.10, which was the current version installed, everything started working again.</p>
<h2>The Moral</h2>
<p>If you update Passenger make sure that your webserver configuration is pointing to the new version.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rubyyot.com/2010/02/getting-502-bad-gateway-with-passenger-after-cleaning-gems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby Wisdom</title>
		<link>http://blog.rubyyot.com/2010/02/ruby-wisdom/</link>
		<comments>http://blog.rubyyot.com/2010/02/ruby-wisdom/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 04:31:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://blog.rubyyot.com/?p=715</guid>
		<description><![CDATA[I got this error today testing a Rails 3 app that I&#8217;m working on..

  3&#41; Error:
test_updates_status&#40;QueueWorkerTest&#41;:
NoMethodError: undefined method 'save!' for &#34;g&#34;:String
    /home/rubyyot/working/stuff.longshotlabs.com/lib/stuff/queue_worker.rb:66:in 'block in retrieve_item_info'
    /home/rubyyot/working/stuff.longshotlabs.com/lib/stuff/queue_worker.rb:64:in 'each'
    /home/rubyyot/working/stuff.longshotlabs.com/lib/stuff/queue_worker.rb:64:in 'retrieve_item_info'
    /home/rubyyot/working/stuff.longshotlabs.com/lib/stuff/queue_worker.rb:38:in 'process_unit'
    /home/rubyyot/working/stuff.longshotlabs.com/lib/stuff/queue_worker.rb:14:in 'process_queue'
    /home/rubyyot/working/stuff.longshotlabs.com/test/unit/queue_worker_test.rb:35:in 'test_updates_status'

]]></description>
			<content:encoded><![CDATA[<p>I got this error today testing a Rails 3 app that I&#8217;m working on..</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">  <span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Error:
test_updates_status<span style="color: #7a0874; font-weight: bold;">&#40;</span>QueueWorkerTest<span style="color: #7a0874; font-weight: bold;">&#41;</span>:
NoMethodError: undefined method <span style="color: #ff0000;">'save!'</span> <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #ff0000;">&quot;g&quot;</span>:String
    <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>rubyyot<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>stuff.longshotlabs.com<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>stuff<span style="color: #000000; font-weight: bold;">/</span>queue_worker.rb:<span style="color: #000000;">66</span>:<span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">'block in retrieve_item_info'</span>
    <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>rubyyot<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>stuff.longshotlabs.com<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>stuff<span style="color: #000000; font-weight: bold;">/</span>queue_worker.rb:<span style="color: #000000;">64</span>:<span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">'each'</span>
    <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>rubyyot<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>stuff.longshotlabs.com<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>stuff<span style="color: #000000; font-weight: bold;">/</span>queue_worker.rb:<span style="color: #000000;">64</span>:<span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">'retrieve_item_info'</span>
    <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>rubyyot<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>stuff.longshotlabs.com<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>stuff<span style="color: #000000; font-weight: bold;">/</span>queue_worker.rb:<span style="color: #000000;">38</span>:<span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">'process_unit'</span>
    <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>rubyyot<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>stuff.longshotlabs.com<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>stuff<span style="color: #000000; font-weight: bold;">/</span>queue_worker.rb:<span style="color: #000000;">14</span>:<span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">'process_queue'</span>
    <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>rubyyot<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>stuff.longshotlabs.com<span style="color: #000000; font-weight: bold;">/</span>test<span style="color: #000000; font-weight: bold;">/</span>unit<span style="color: #000000; font-weight: bold;">/</span>queue_worker_test.rb:<span style="color: #000000;">35</span>:<span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">'test_updates_status'</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.rubyyot.com/2010/02/ruby-wisdom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Date.parse() is not your friend.</title>
		<link>http://blog.rubyyot.com/2010/02/date-parse-is-not-your-friend/</link>
		<comments>http://blog.rubyyot.com/2010/02/date-parse-is-not-your-friend/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 15:08:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[parse]]></category>
		<category><![CDATA[ruby 1.9]]></category>

		<guid isPermaLink="false">http://blog.rubyyot.com/?p=711</guid>
		<description><![CDATA[I&#8217;ve started looking at Ruby 1.9 with multiruby, and one of the first things that I found in testing is that Date.parse assumes European dates (dd/mm/yyyy format) in v1.9.  The solution is to use strptime() instead so you can specify a format.

Date.strptime&#40;&#34;12/31/2009&#34;, &#34;%m/%d/%Y&#34;&#41;

]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started looking at Ruby 1.9 with multiruby, and one of the first things that I found in testing is that Date.parse assumes European dates (dd/mm/yyyy format) in v1.9.  The solution is to use strptime() instead so you can specify a format.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC00FF; font-weight:bold;">Date</span>.<span style="color:#9900CC;">strptime</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;12/31/2009&quot;</span>, <span style="color:#996600;">&quot;%m/%d/%Y&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.rubyyot.com/2010/02/date-parse-is-not-your-friend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Can&#039;t find tokyocabinet native extentions</title>
		<link>http://blog.rubyyot.com/2010/02/cant-find-tokyocabinet-native-extentions/</link>
		<comments>http://blog.rubyyot.com/2010/02/cant-find-tokyocabinet-native-extentions/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 22:27:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[edo]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[tokyo cabinet]]></category>

		<guid isPermaLink="false">http://blog.rubyyot.com/?p=706</guid>
		<description><![CDATA[I was trying out rufus/edo today after installing Tokyo Cabinet. and I kept getting the following error

/usr/local/lib/site_ruby/1.8/i486-linux/tokyocabinet.so: libtokyocabinet.so.9: cannot open shared object file: No such file or directory - /usr/local/lib/site_ruby/1.8/i486-linux/tokyocabinet.so &#40;LoadError&#41;
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from test.rb:1

The solution was to modify the [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying out <a href="http://github.com/jmettraux/rufus-tokyo/blob/master/lib/rufus/edo/README.txt">rufus/edo</a> today after installing Tokyo Cabinet. and I kept getting the following error</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>i486-linux<span style="color: #000000; font-weight: bold;">/</span>tokyocabinet.so: libtokyocabinet.so.9: cannot open shared object <span style="color: #c20cb9; font-weight: bold;">file</span>: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory - <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>i486-linux<span style="color: #000000; font-weight: bold;">/</span>tokyocabinet.so <span style="color: #7a0874; font-weight: bold;">&#40;</span>LoadError<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        from <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>custom_require.rb:<span style="color: #000000;">31</span>:<span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span>require<span style="color: #ff0000;">'
        from test.rb:1</span></pre></div></div>

<p>The solution was to modify the LD_LIBRARY_PATH to include /usr/local/lib</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#~/.bashrc</span>
&nbsp;
 <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LD_LIBRARY_PATH</span>=<span style="color: #007800;">$LD_LIBRARY_PATH</span>:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.rubyyot.com/2010/02/cant-find-tokyocabinet-native-extentions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Railsbridge BugMash on now</title>
		<link>http://blog.rubyyot.com/2010/01/railsbridge-bugmash-on-now/</link>
		<comments>http://blog.rubyyot.com/2010/01/railsbridge-bugmash-on-now/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 22:16:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[bugmash]]></category>
		<category><![CDATA[rails 3.0pre]]></category>
		<category><![CDATA[railsbridge]]></category>

		<guid isPermaLink="false">http://blog.rubyyot.com/?p=704</guid>
		<description><![CDATA[Railsbridge BugMash
The call went out the other day for participants in the Rails 3.0pre BugMash on Jan 16th &#8211; 17th.  Included were some imple instructions for cloning Rails 3 and creating a new Rails app from it.  So I pulled it down and gave Rails 3 a test spin.
Project
I decided to start a [...]]]></description>
			<content:encoded><![CDATA[<h3>Railsbridge BugMash</h3>
<p>The call went out the other day for participants in the <a href="http://railsbridge.org/news_items/10" target="_blank">Rails 3.0pre BugMash</a> on Jan 16th &#8211; 17th.  Included were some imple instructions for cloning Rails 3 and creating a new Rails app from it.  So I pulled it down and gave Rails 3 a test spin.</p>
<h3>Project</h3>
<p>I decided to start a project for making a sort of universal friends list.  One that encorporates XFN tags and OpenID.  The data could then be used as a resource for other sites to seed a friends list.  In order to claim an OpenID as your own you need to authenticate it.</p>
<h3>Bundler</h3>
<p>The first thing I noticed was the existance of the <a href="http://github.com/rubyyot/knowyou/blob/bugmash/Gemfile" target="_blank">Gemfile</a> in the rails root and how empty <a href="http://github.com/rubyyot/knowyou/blob/bugmash/config/environment.rb" target="_blank">config/environment.rb</a> is.  I&#8217;d read on about the new bundler and thought it was going to be painful, but I was wrong, it was actually a joy.  It even removed gem after I commented out the requirement statement in the Gemfile.</p>
<h3>Plugins</h3>
<p>I installed Authlogic as a plugin, after failing to get it working as a gem.  I&#8217;ve had the same issue with Rails 2.3 so I don&#8217;t think this is an issue with Rails 3.  The OpenId Authentication plugin worked fine as well.</p>
<h3>Routes</h3>
<p>The new routing module took a little getting used to, but after a few mistakes I got it working correctly.  In the end <a href="http://github.com/rubyyot/knowyou/blob/bugmash/config/routes.rb" target="_blank">config/routes.rb</a> looks much cleaner, and still contains lots of commented samples.  Also the legacy routing is commented by default, which is nice since that&#8217;s something I do anyway.</p>
<h3>Premade .gitignore</h3>
<p>Speaking of nice defaults, creating the rails app made .gitignore file for me with tmp / db / log already in it.  Very Nice!</p>
<h3>View validation</h3>
<p>One thing that came as a bit of a surprise to me that the views are validated against the models.  If you reference a field on the model in the view that does not exist, Rails will now error and tell you that it&#8217;s not there.  So you need to rake db:migrate to have it recognize the fields on a model.</p>
<h3>Conclusion</h3>
<p>I have really liked what I see of Rails 3 thus far.  Thanks to all those that have worked on it.  I think that I will start using this version by default.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rubyyot.com/2010/01/railsbridge-bugmash-on-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building rubyyot.com from scratch with Rack and Git</title>
		<link>http://blog.rubyyot.com/2010/01/building-rubyyot-com-from-scratch-with-rack-and-git/</link>
		<comments>http://blog.rubyyot.com/2010/01/building-rubyyot-com-from-scratch-with-rack-and-git/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 04:33:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[rack]]></category>
		<category><![CDATA[rubyyot]]></category>

		<guid isPermaLink="false">http://blog.rubyyot.com/?p=695</guid>
		<description><![CDATA[2010 is here, where did the time go?
Huh?  It&#8217;s 2010?  I haven&#8217;t posted in 6 months?  What happened?
Summer of Learning Challenge
The Summer of Learning Challenge didn&#8217;t happen.  I didn&#8217;t even do it.  No excuses.  I did other things.
All is not lost
Around the end of 2009, I dusted off my [...]]]></description>
			<content:encoded><![CDATA[<h3>2010 is here, where did the time go?</h3>
<p>Huh?  It&#8217;s 2010?  I haven&#8217;t posted in 6 months?  What happened?</p>
<h3>Summer of Learning Challenge</h3>
<p>The <a href="http://blog.rubyyot.com/2009/05/summer-of-learning-challenge" target="_blank">Summer of Learning Challenge</a> didn&#8217;t happen.  I didn&#8217;t even do it.  No excuses.  I did other things.</p>
<h3>All is not lost</h3>
<p>Around the end of 2009, I dusted off my idea of creating a git based wiki like publishing portal with Rack.  I put it together in about a week or so and it&#8217;s slowly evolving and gaining some content.  It&#8217;s fun, even exciting, to bypass frameworks and DSLs and all the opinionated code and build something on the leanness that is Rack. A great learning opportunity to boot. So maybe something came of the challenge after all.</p>
<h3>Rubyyot &#8211; Rack + Git</h3>
<p>It&#8217;s up on <a href="http://www.rubyyot.com" target="_blank">rubyyot.com</a> with the <a href="http://github.com/rubyyot/rubyyot" target="_blank">source on github</a> still wonderfully rough around the edges and in need of a code review.  Ahh, to create something again.</p>
<h3>Flannel &#8211; Warm and fuzzy</h3>
<p>I made my own markup parser for this, it&#8217;s called<a title="Flannel" href="http://rubyyot.com/flannel" target="_blank"> flannel </a>and an liking it so far.  Of course it too is still in it&#8217;s infancy, but I&#8217;m not only using it to format my wiki thing, I&#8217;ve also given it a little command line attention to allow it to transform text files for my blog posts.  It&#8217;s warm, fuzzy and everything is just as I want it, and if not, I change it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rubyyot.com/2010/01/building-rubyyot-com-from-scratch-with-rack-and-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with ISpec and Ioke &#8211; part 4</title>
		<link>http://blog.rubyyot.com/2009/06/getting-started-with-ispec-and-ioke-part-4/</link>
		<comments>http://blog.rubyyot.com/2009/06/getting-started-with-ispec-and-ioke-part-4/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 05:53:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ioke]]></category>
		<category><![CDATA[ispec]]></category>

		<guid isPermaLink="false">http://blog.rubyyot.com/?p=674</guid>
		<description><![CDATA[Part 4
This is part 4 of the increasingly mis-named Getting started with Ispec and Ioke trilogy.  Last time we discussed the let keyword and I started working on the template object which represented the template to be parsed into a document.
 Previously I used ISpec to assert that we could evaluate on cells on [...]]]></description>
			<content:encoded><![CDATA[<h3>Part 4</h3>
<p>This is part 4 of the increasingly mis-named <em><a href="http://blog.rubyyot.com/getting-started-with-ispec-and-ioke/">Getting started with Ispec and Ioke trilogy</a></em>.  Last time we discussed the let keyword and I started working on the template object which represented the template to be parsed into a document.</p>
<p> Previously I used ISpec to assert that we could evaluate on cells on Bag.  I wanted to start off this time by proving to myself that I could just as easily use activatable cells on Bag as well.</p>

<div class="wp_syntax"><div class="code"><pre class="ioke" style="font-family:monospace;">    it(&quot;should evaluate method on bag&quot;,
      bag = Bag mimic
      bag bread = method(&quot;butter&quot;)
      evaluator = Evaluator mimic(bag)
      evaluator evaluate(bread) should == &quot;butter&quot;
    )</pre></div></div>

<p>As you can see, this time instead of assigning a string to a cell on the property bag an evaluating it, I instead assigned a method which returned a string to a cell and evaluated it.  Sure enough it worked without any changes to the code.  This creates some interesting possibilities, though I haven&#8217;t thought through all of the ramifications at the moment. </p>
<p>Sure enough it worked.</p>
<p>Next I wanted to push the envelope on Evaluator a little bit by defining the method which will do the work of parsing the template and injecting the values from the property bag into it.</p>

<div class="wp_syntax"><div class="code"><pre class="ioke" style="font-family:monospace;">describe(&quot;parsing&quot;,
    it(&quot;should return the template when the bag is nil&quot;,
      evaluator = Evaluator mimic(nil)
      template = Template mimic
      template text = &quot;An extra special template&quot;
&nbsp;
      document = evaluator combine(template)
      document should == &quot;An extra special template&quot;
    )
  )</pre></div></div>

<p>This is really a small step, and as I get more familiar with TDD and BDD, these seem to the the steps that I&#8217;m most comforable with lining up and knocking down when implementing new features. The other part of this is, doing the simplest thing that could possibly work to pass the spec / test.  In this case, this is the simplest thing.</p>

<div class="wp_syntax"><div class="code"><pre class="ioke" style="font-family:monospace;">Evaluator combine = method (
  &quot;Generates a document from a template and bag&quot;,
&nbsp;
  template,
  template text
)</pre></div></div>

<p>
From here, I think that the next step is going involve using Ioke&#8217;s implementation of Regexp, which I will need to read up on.  So I think I will cut this short for today and wait for next time for that topic.
</p>
<h3>The Code</h3>
<p>The code for this example is <a href="http://github.com/rubyyot/ioke-examples/tree/start_ispec_4" title="rubyyot at Github ioke-examples tag start_ispec_4" target="_blank" rel="me">available on github tagged as start_ispec_4</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rubyyot.com/2009/06/getting-started-with-ispec-and-ioke-part-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting a project off the ground with TDD and Cucumber</title>
		<link>http://blog.rubyyot.com/2009/06/getting-a-project-off-the-ground-with-tdd-and-cucumber/</link>
		<comments>http://blog.rubyyot.com/2009/06/getting-a-project-off-the-ground-with-tdd-and-cucumber/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 05:17:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[starting a project]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://blog.rubyyot.com/?p=659</guid>
		<description><![CDATA[RSimpy
I am currently wrapping up an initial release of a new gem that wraps the Simpy.com API.  I like social bookmarking and used delicious for years before switching to Simpy as my primary service.  Simpy is not the biggest online bookmarking service, but I&#8217;ve decided to use it for reasons I will outline [...]]]></description>
			<content:encoded><![CDATA[<h3>RSimpy</h3>
<p>I am currently wrapping up an initial release of a new gem that wraps the <a href="http://simpy.com/" title="" target="_blank" rel="user">Simpy.com</a> API.  I like social bookmarking and used delicious for years before switching to Simpy as my primary service.  Simpy is not the biggest online bookmarking service, but I&#8217;ve decided to use it for reasons I will outline in another post.  In any case I&#8217;ve put together a gem that wraps the API with the help of Httparty.  It actually turned out much simpler than I expected it to be, httparty did all of the heavy lifting, but again that is for another post.</p>
<p>So, I have a functioning gem for Simpy, now I want to make something useful with it.  The reason I made the gem was to simplify my bookmarking which is overall a mess on multiple workstations in multiple locations.  Since I&#8217;ve recently been getting familia with cron, I&#8217;ve decided to make a script to store urls locally and use <a href="http://en.wikipedia.org/wiki/Cron" title="cron" target="_blank" rel="definition">cron</a> to run a script that pushes a file of pages to Simpy.</p>
<p>As I touched on briefly, I&#8217;ve been unhappy with all my previous bookmarking solutions thus far.  This time I want to make it, dead simple.  I don&#8217;t want to have to enter any additional information if I don&#8217;t want to, just a url and have it go on it&#8217;s merry way.  However to post the link, I will need to at least have the page title.  Pulling a page title from a url is really outside of the scope of RSimpy.  Ruby makes it fairly simple to do, but I don&#8217;t want to isolate the functionality to a script.  Ruminate to the rescue, but what is Ruminate?</p>
<h3>Ruminate</h3>
<p>Well the answer to that question is that I&#8217;m not really sure.  A few months back, I made a gem with jeweler called ruminate with the description  &#8220;Extracts statistics from html documents&#8221;.  Actually, I&#8217;m not really sure what I originally had in mind when I setup this gem, but it will be useful now since I want to extract at least the page title.  Once I get the ability to extract a page title, I can make a script that is simply glue code to put Ruminate together with RSimpy and voila!</p>
<h3>Bootstrapping the project</h3>
<p>I have a vague idea of something that I want Ruminate to do, that is I want to be able to query a url to return the title of the page.  It&#8217;s obviously not the entire purpose of the gem, but I&#8217;m sure that will be lots of other bits that will come together in time. </p>
<p>The question is, How do I kickstart this project with TDD to get it off the ground?</p>
<h3>Programming by Intention</h3>
<p><a title="programming by intention" target="blank" href="http://www.hans-eric.com/2007/09/05/tools-of-the-effective-developer-personal-planning/">Programming by intention</a> is the practice of writing code, while pretending that any methods or classes you might reference already exist and operate in the way that you reference them.  It&#8217;s a great way of uncovering a simple intuative API that you might otherwise would have missed.</p>
<p>I&#8217;ve seen it described in two books, first in <a href="http://www.pragprog.com/titles/bmsft/everyday-scripting-with-ruby"  target="_blank" title="Everyday scripting with Ruby" rel="book I've read"><em>Everyday Scripting with Ruby</em></a>, from The Pragmatic Bookshelf. Secondly, it&#8217;s used in an excellent book I&#8217;m currently reading called  <a href="http://www.javalobby.org/java/forums/t102176.html" target="_blank" title="Test Driven" rel="book I've read"><em>Test Driven</em></a> from Manning.</p>
<p>  There are <a href="http://bradwilson.typepad.com/blog/2009/04/its-not-tdd-its-design-by-example.html" target="_blank">a number</a> <a href="http://www.hanselman.com/blog/HanselminutesPodcast146TestDrivenDevelopmentIsDesignTheLastWordOnTDD.aspx" target="_blank">of sources</a> <a href="http://blog.jpboodhoo.com/DesignVsCodingHowMuchIsTooMuch.aspx" target="_blank">stating that</a> <a href="http://weblogs.asp.net/rosherove/archive/2007/10/08/the-various-meanings-of-tdd.aspx" target="_blank">TDD</a> <a href="http://blog.codiceplastico.com/?p=181" target="_blank">is about design first</a> <a href="http://davybrion.com/blog/2008/08/introducing-tdd-how-would-you-do-it/" target="_blank">and automated testing</a> <a href="http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/04/22/should-you-tdd-when-flying-solo.aspx" target="_blank">is a nice by-product</a>.  In my limited experience with TDD, programming by intention is the crux of this design, and by extension the primary purpose of TDD.</p>
<h3>Cucumber</h3>
<p>One of the things that I really like about cucumber is that you can plainly state your intent and important bits of your feature focused domain in plain English and match that up to executable code. To describe the ability of Ruminate to grab the title of a url, I made the following test:</p>

<div class="wp_syntax"><div class="code"><pre class="cucumber" style="font-family:monospace;">Feature: Get Page Title
  In to get the page title
  A user of ruminate
  Will request a page title
&nbsp;
  Scenario: Requesting the title of a page from the page
    Given the url &quot;http://www.google.com&quot;
    When I execute the request
    Then the &quot;title&quot; should be &quot;Google&quot;</pre></div></div>

<p>I let cucumber auto-generate the regular expression blocks and came up with the following steps:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">&nbsp;
Given <span style="color:#006600; font-weight:bold;">/</span>^the url <span style="color:#996600;">&quot;([^<span style="color:#000099;">\&quot;</span>]*)&quot;</span>$<span style="color:#006600; font-weight:bold;">/</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>url<span style="color:#006600; font-weight:bold;">|</span>
  <span style="color:#0066ff; font-weight:bold;">@url</span> = url
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">When</span> <span style="color:#006600; font-weight:bold;">/</span>^I execute the request$<span style="color:#006600; font-weight:bold;">/</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  query = <span style="color:#996600;">&quot;Select title from #{@url};&quot;</span>
  <span style="color:#0066ff; font-weight:bold;">@result</span> = chew query
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">Then</span> <span style="color:#006600; font-weight:bold;">/</span>^the <span style="color:#996600;">&quot;([^<span style="color:#000099;">\&quot;</span>]*)&quot;</span> should be <span style="color:#996600;">&quot;([^<span style="color:#000099;">\&quot;</span>]*)&quot;</span>$<span style="color:#006600; font-weight:bold;">/</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>msg, value<span style="color:#006600; font-weight:bold;">|</span>
  assert_equal value, <span style="color:#0066ff; font-weight:bold;">@result</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>As you can see I&#8217;ve decided to try out a sql like syntax for the tool.  I thought it sounded interesting, we&#8217;ll see if I keep it. In any case, I now need to make this test pass with the help of a mixin, that I&#8217;m including in features/support/env.rb</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># features/support/env.rb</span>
<span style="color:#ff6633; font-weight:bold;">$LOAD_PATH</span>.<span style="color:#9900CC;">unshift</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">dirname</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">__FILE__</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">'/../../lib'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'ruminate'</span>
<span style="color:#9966CC; font-weight:bold;">include</span> Ruminate
&nbsp;
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'test/unit/assertions'</span>
&nbsp;
World<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#6666ff; font-weight:bold;">Test::Unit::Assertions</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># lib/ruminate.rb</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'query_parser'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'engine'</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">module</span> Ruminate
  <span style="color:#9966CC; font-weight:bold;">def</span> chew query
    parser = <span style="color:#6666ff; font-weight:bold;">Ruminate::QueryParser</span>.<span style="color:#9900CC;">new</span>
    query_object = parser.<span style="color:#9900CC;">parse</span> query
    engine = <span style="color:#6666ff; font-weight:bold;">Ruminate::Engine</span>.<span style="color:#9900CC;">new</span>
&nbsp;
    engine.<span style="color:#9900CC;">execute</span> query_object
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Here I&#8217;ve used the mixin to split the method into to operations and encapsulated each of these into a class.  Programming by intention has now generated a mixin and two classes that have a clean separation of responsibilities.  Here is the simplest thing that could possibly work to make the feature pass.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># lib/query_parser.rb</span>
<span style="color:#9966CC; font-weight:bold;">module</span> Ruminate
  <span style="color:#9966CC; font-weight:bold;">class</span> QueryParser
    <span style="color:#9966CC; font-weight:bold;">def</span> parse query
      <span style="color:#0000FF; font-weight:bold;">nil</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># lib/engine.rb</span>
<span style="color:#9966CC; font-weight:bold;">module</span> Ruminate
  <span style="color:#9966CC; font-weight:bold;">class</span> Engine
    <span style="color:#9966CC; font-weight:bold;">def</span> execute query
      <span style="color:#996600;">&quot;Google&quot;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Obviously this isn&#8217;t the final code, but it gives us the minimal implementation to pass the feature.  Now I can turn to Test::Unit and shoulda to flesh out tests and implementations to make it work in a more useful manner.</p>
<p>What I really wanted to show here is how to get a TDD project started.  I know that I&#8217;ve struggled with this in the past.  What to test first can be a big decision, one that can create a type of code writers block. When this moment happened where everything just came together and I was able to generate a mixin and two orthagonal classes with a simple feature, I wanted to write it up.</p>
<h3>The Code</h3>
<p>The full code for this example can be found <a href="http://github.com/rubyyot/ruminate/tree/simplest-thing-that-could-possibly-work">on github with the tag simplest-thing-that-could-possibly-work</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rubyyot.com/2009/06/getting-a-project-off-the-ground-with-tdd-and-cucumber/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chores: A test driven website &#8211; Part 10</title>
		<link>http://blog.rubyyot.com/2009/06/chores-a-test-driven-website-part-10/</link>
		<comments>http://blog.rubyyot.com/2009/06/chores-a-test-driven-website-part-10/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 02:58:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Chores]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[known state]]></category>

		<guid isPermaLink="false">http://blog.rubyyot.com/?p=636</guid>
		<description><![CDATA[Where was I?
By the time I finished up post nine and started working on post 10, I was completely lost.  It was entirely my fault and it happens to the best of us, and me too.  Coming back to the Chores app after time had passed, and looking around, I thought two things:

How [...]]]></description>
			<content:encoded><![CDATA[<h3>Where was I?</h3>
<p>By the time I finished up <a href="http://blog.rubyyot.com/2009/05/chores-a-test-driven-website-part-10/" rel="me" target="_blank">post nine</a> and started working on post 10, I was completely lost.  It was entirely my fault and it happens to the best of us, and me too.  Coming back to the Chores app after time had passed, and looking around, I thought two things:</p>
<ul>
<li>How did this get to be such a mess?</li>
<li>Where was I?</li>
</ul>
<p>A number of factors had come into play that led to this point.  The first of which was lack of discipline.  As came across features I thought were interesting or necessary, I abandoned the test driven mantra of <a href="http://geekswithblogs.net/WillSmith/archive/2008/03/18/red-green-refactor.aspx" target="_blank">red, green, refactor</a>.  This ruined my focus, splintered my development efforts and generated a fair share of untested code.</p>
<p>Another issue I ran into is that over the time between my first posts and now, a number of new versions of libraries were released and Rails itself moved from version 2.2.2 to 2.3.2.  Subtle variations in the APIs for these gems, generated a few errors and left me scratching my head more than once.  I would like to say that <em>change is good</em></strong>, it&#8217;s great that the Ruby community is so active in improving it&#8217;s products.  However, I needed to be more proactive in managing the changes.</p>
<p>Time is another factor that worked it&#8217;s entropy in Chores.  You hear people talking about the poor developer left to maintain sloppy code months or years after it&#8217;s release, and that they may be you.  Well it was me, and I was feeling the hurt.</p>
<h3>Not all is lost</h3>
<p>Thus far, I&#8217;ve painted a pretty dire picture of the state of the code.  I&#8217;ve probably left you thinking, &#8220;but this is Chores: A test driven website!  How could this happen?&#8221;  Well it does happen, but you are right. On the bright side, it is a test driven website.  If it wasn&#8217;t I would probably be tempted to toss it out and start over.  But, because it&#8217;s test driven and in source control, I&#8217;m fairly confident that I can get the codebase up to date and functional in a reasonable amount of time.   This in addition to a few practices will have me back in business in no time</p>
<ul>
<li><a href="http://blog.rubyyot.com/2009/05/configuring-gems-for-your-rails-app/" target="_blank" rel="me">Configuring gems for Rails</a> &#8211; Manage dependencies by documenting the gems you are using and requiring certain versions.  You can also <a href="http://railscasts.com/episodes/110-gem-dependencies" target="_blank">freeze a version</a> of each to your app.</li>
<li><a href="http://blog.hasmanythrough.com/2008/12/18/agile-git-and-the-story-branch-pattern" target="_blank">Git branches for new features</a> &#8211; create a new branch for a new feature to help stay focused. </li>
<li><a href="http://blog.rubyyot.com/2009/05/gtd-on-rails-with-annotations/" target="_blank" rel="me">When inspiration strikes, annotate!</a> &#8211; Rather than getting sidetracked by things outside of the scope of the current feature, leave a note and come back to it.</li>
</ul>
<p> While these are good practices to follow in the future, what can I do to get this codebase back under control?
<ul>
<li><strong>Git back to known state</strong> &#8211; Since I&#8217;ve done some unknown piecemeal development on chores I will use my post_9 tag.</li>
<li><strong>Make sure existing tests pass</strong> &#8211; This is where our tests are worth their weight.  We know what code is working, and what that code does.</li>
<li><strong>Evaluate holes</strong> &#8211; Find the weak points in the tests and make a plan to fix them. </li>
</ul>
<h3>Git Happy</h3>
<p><em><strong>Note</strong>: You can <a href="http://github.com/rubyyot/chores/tree/post_9" target="_blank">find post_9 here</a>, though if you happen to be following along, you would want to merge it into your own source.</em></p>
<p>My first step is to rewind to the tag I made for my last post.  Right away I realise that I now have two source repositories, one on my shared host and one on github.  One is really enough so part of the process will be to move to only github.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git status
<span style="color: #666666; font-style: italic;"># On branch master</span>
<span style="color: #666666; font-style: italic;"># Your branch is ahead of 'origin/master' by 4 commits.</span>
<span style="color: #666666; font-style: italic;">#</span>
nothing to commit <span style="color: #7a0874; font-weight: bold;">&#40;</span>working directory clean<span style="color: #7a0874; font-weight: bold;">&#41;</span>
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git remote
github
origin
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git remote <span style="color: #c20cb9; font-weight: bold;">rm</span> origin
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git remote
github
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git remote add origin   git:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>rubyyot<span style="color: #000000; font-weight: bold;">/</span>chores.git</pre></div></div>

<p>Above, I listed my remote repositories.  I see that I have two, so I remove one and add another.  A mistake I made here is that I set my remote to my public clone url.  I should have, since I will be pushing to it, used my clone url, git@github.com:rubyyot/chores.git. </p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git status
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git reset <span style="color: #660033;">--hard</span> post_9
HEAD is now at b0eecae added auto formatting to Identity.find_or_create_if_valid</pre></div></div>

<p>Here I have done a hard (destructive) reset back to the tag post_9.  I could have avoided doing such a dangerous procedure if I had been working on a branch. </p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git status
<span style="color: #666666; font-style: italic;"># On branch master</span>
<span style="color: #666666; font-style: italic;"># Untracked files:</span>
<span style="color: #666666; font-style: italic;">#   (use &quot;git add &lt;file&gt;...&quot; to include in what will be committed)</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">#       db/production.sqlite3</span>
nothing added to commit but untracked files present <span style="color: #7a0874; font-weight: bold;">&#40;</span>use <span style="color: #ff0000;">&quot;git add&quot;</span> to track<span style="color: #7a0874; font-weight: bold;">&#41;</span>
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ <span style="color: #c20cb9; font-weight: bold;">vi</span> .gitignore      <span style="color: #666666; font-style: italic;">#added db/*.sqlite3 to .gitignore</span>
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git status
<span style="color: #666666; font-style: italic;"># On branch master</span>
<span style="color: #666666; font-style: italic;"># Changed but not updated:</span>
<span style="color: #666666; font-style: italic;">#   (use &quot;git add &lt;file&gt;...&quot; to update what will be committed)</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">#       modified:   .gitignore</span>
<span style="color: #666666; font-style: italic;">#</span>
no changes added to commit <span style="color: #7a0874; font-weight: bold;">&#40;</span>use <span style="color: #ff0000;">&quot;git add&quot;</span> and<span style="color: #000000; font-weight: bold;">/</span>or <span style="color: #ff0000;">&quot;git commit -a&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Here I noticed that git sees my &#8220;production&#8221; sqlite3 database is not in sync with the index.   I really don&#8217;t want or need to have a pseudo-production sqlite3 database in source control so I updated my .gitignore file to ignore it. </p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ rake <span style="color: #7a0874; font-weight: bold;">test</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>rubyyot<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ruby1.8 <span style="color: #660033;">-I</span><span style="color: #ff0000;">&quot;/home/rubyyot/working/chores/lib&quot;</span> <span style="color: #660033;">-I</span><span style="color: #ff0000;">&quot;/home/rubyyot/working/chores/test&quot;</span> <span style="color: #ff0000;">&quot;/home/rubyyot/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb&quot;</span> <span style="color: #ff0000;">&quot;test/unit/identity_test.rb&quot;</span> <span style="color: #ff0000;">&quot;test/unit/chore_test.rb&quot;</span> <span style="color: #ff0000;">&quot;test/unit/child_test.rb&quot;</span>
Loaded suite <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>rubyyot<span style="color: #000000; font-weight: bold;">/</span>.gem<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span>rake-0.8.4<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>rake<span style="color: #000000; font-weight: bold;">/</span>rake_test_loader
Started
.............................
Finished <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000;">0.347031</span> seconds.
&nbsp;
<span style="color: #000000;">29</span> tests, <span style="color: #000000;">43</span> assertions, <span style="color: #000000;">0</span> failures, <span style="color: #000000;">0</span> errors
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ruby1.8 <span style="color: #660033;">-I</span><span style="color: #ff0000;">&quot;/home/rubyyot/working/chores/lib&quot;</span> <span style="color: #660033;">-I</span><span style="color: #ff0000;">&quot;/home/rubyyot/working/chores/test&quot;</span> <span style="color: #ff0000;">&quot;/home/rubyyot/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb&quot;</span> <span style="color: #ff0000;">&quot;test/functional/children_controller_test.rb&quot;</span> <span style="color: #ff0000;">&quot;test/functional/chores_controller_test.rb&quot;</span> <span style="color: #ff0000;">&quot;test/functional/home_controller_test.rb&quot;</span>
Loaded suite <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>rubyyot<span style="color: #000000; font-weight: bold;">/</span>.gem<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span>rake-0.8.4<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>rake<span style="color: #000000; font-weight: bold;">/</span>rake_test_loader
Started
..........
Finished <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000;">0.201701</span> seconds.
&nbsp;
<span style="color: #000000;">10</span> tests, <span style="color: #000000;">17</span> assertions, <span style="color: #000000;">0</span> failures, <span style="color: #000000;">0</span> errors
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ruby1.8 <span style="color: #660033;">-I</span><span style="color: #ff0000;">&quot;/home/rubyyot/working/chores/lib&quot;</span> <span style="color: #660033;">-I</span><span style="color: #ff0000;">&quot;/home/rubyyot/working/chores/test&quot;</span> <span style="color: #ff0000;">&quot;/home/rubyyot/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb&quot;</span>
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ rake features
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>rubyyot<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ruby1.8 <span style="color: #660033;">-I</span> <span style="color: #ff0000;">&quot;/usr/lib/ruby/gems/1.8/gems/cucumber-0.3.11/lib:lib&quot;</span> <span style="color: #ff0000;">&quot;/usr/lib/ruby/gems/1.8/gems/cucumber-0.3.11/bin/cucumber&quot;</span> <span style="color: #660033;">--format</span> pretty features<span style="color: #000000; font-weight: bold;">/</span>define_children.feature features<span style="color: #000000; font-weight: bold;">/</span>define_chores.feature
Story:  Define child
As a parent
I want to define my child<span style="color: #7a0874; font-weight: bold;">&#40;</span>ren<span style="color: #7a0874; font-weight: bold;">&#41;</span>
So that I can assign them chores
&nbsp;
  Scenario: Defining a child                                        <span style="color: #666666; font-style: italic;"># features/define_children.feature:6</span>
    Given I am logged <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #c20cb9; font-weight: bold;">as</span> <span style="color: #ff0000;">&quot;test.example.com&quot;</span>                      <span style="color: #666666; font-style: italic;"># features/step_definitions/chores_steps.rb:9</span>
    And I am on the homepage                                        <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:6</span>
    When I follow <span style="color: #ff0000;">&quot;Add Child&quot;</span>                                       <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:18</span>
    And I fill <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">&quot;child[nickname]&quot;</span> with <span style="color: #ff0000;">&quot;Bobby&quot;</span>                    <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:22</span>
    And I fill <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">&quot;child[open_identifier]&quot;</span> with <span style="color: #ff0000;">&quot;bobby.example.com&quot;</span> <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:22</span>
    And I press <span style="color: #ff0000;">&quot;Add&quot;</span>                                               <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:14</span>
    Then I should see <span style="color: #ff0000;">&quot;Child added.&quot;</span>                                <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:93</span>
    And I should see <span style="color: #ff0000;">&quot;Bobby&quot;</span>                                        <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:93</span>
&nbsp;
  Scenario: Defining a second child                                 <span style="color: #666666; font-style: italic;"># features/define_children.feature:16</span>
    Given I am logged <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #c20cb9; font-weight: bold;">as</span> <span style="color: #ff0000;">&quot;test.example.com&quot;</span>                      <span style="color: #666666; font-style: italic;"># features/step_definitions/chores_steps.rb:9</span>
    And I am on the homepage                                        <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:6</span>
    When I follow <span style="color: #ff0000;">&quot;Add Child&quot;</span>                                       <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:18</span>
    And I fill <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">&quot;child[nickname]&quot;</span> with <span style="color: #ff0000;">&quot;Bobby&quot;</span>                    <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:22</span>
    And I fill <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">&quot;child[open_identifier]&quot;</span> with <span style="color: #ff0000;">&quot;bobby.example.com&quot;</span> <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:22</span>
    And I press <span style="color: #ff0000;">&quot;Add&quot;</span>                                               <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:14</span>
    And I follow <span style="color: #ff0000;">&quot;Add another Child&quot;</span>                                <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:18</span>
    And I fill <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">&quot;child[nickname]&quot;</span> with <span style="color: #ff0000;">&quot;Suzy&quot;</span>                     <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:22</span>
    And I fill <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">&quot;child[open_identifier]&quot;</span> with <span style="color: #ff0000;">&quot;suzy.example.com&quot;</span>  <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:22</span>
    And I press <span style="color: #ff0000;">&quot;Add&quot;</span>                                               <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:14</span>
    Then I should see <span style="color: #ff0000;">&quot;Child added.&quot;</span>                                <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:93</span>
    And I should see <span style="color: #ff0000;">&quot;Bobby&quot;</span>                                        <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:93</span>
    And I should see <span style="color: #ff0000;">&quot;Suzy&quot;</span>                                         <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:93</span>
&nbsp;
Story:  Define chores
As a parent
I want to define chores
So that I can assign them to my children
&nbsp;
  Scenario: Creating a chore                      <span style="color: #666666; font-style: italic;"># features/define_chores.feature:6</span>
    Given I am logged <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #c20cb9; font-weight: bold;">as</span> <span style="color: #ff0000;">&quot;test.example.com&quot;</span>    <span style="color: #666666; font-style: italic;"># features/step_definitions/chores_steps.rb:9</span>
    And I am on the homepage                      <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:6</span>
    When I follow <span style="color: #ff0000;">&quot;Add Chore&quot;</span>                     <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:18</span>
    And I fill <span style="color: #000000; font-weight: bold;">in</span> the chore with <span style="color: #ff0000;">&quot;My first chore&quot;</span> <span style="color: #666666; font-style: italic;"># features/step_definitions/chores_steps.rb:5</span>
    And I press <span style="color: #ff0000;">&quot;Add&quot;</span>                             <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:14</span>
    Then I should see <span style="color: #ff0000;">&quot;Chore added.&quot;</span>              <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:93</span>
    And I should see <span style="color: #ff0000;">&quot;My first chore&quot;</span>             <span style="color: #666666; font-style: italic;"># features/step_definitions/webrat_steps.rb:93</span>
&nbsp;
<span style="color: #000000;">3</span> scenarios <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">3</span> passed<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000;">28</span> steps <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">28</span> passed<span style="color: #7a0874; font-weight: bold;">&#41;</span>
0m0.266s</pre></div></div>

<p>Now I&#8217;ve run my tests and features and am pleasantly surprised to see that they are all passing.  I didn&#8217;t expect this, but it&#8217;s a pleasant surprise.  Still there could be some hidden surprises lurking in the shadows. </p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git status
<span style="color: #666666; font-style: italic;"># On branch master</span>
<span style="color: #666666; font-style: italic;"># Changed but not updated:</span>
<span style="color: #666666; font-style: italic;">#   (use &quot;git add &lt;file&gt;...&quot; to update what will be committed)</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">#       modified:   .gitignore</span>
<span style="color: #666666; font-style: italic;">#       modified:   db/test.sqlite3</span>
<span style="color: #666666; font-style: italic;">#</span>
no changes added to commit <span style="color: #7a0874; font-weight: bold;">&#40;</span>use <span style="color: #ff0000;">&quot;git add&quot;</span> and<span style="color: #000000; font-weight: bold;">/</span>or <span style="color: #ff0000;">&quot;git commit -a&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> db<span style="color: #000000; font-weight: bold;">/</span>test.sqlite3
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #ff0000;">'db/test.sqlite3'</span>
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git status
<span style="color: #666666; font-style: italic;"># On branch master</span>
<span style="color: #666666; font-style: italic;"># Changes to be committed:</span>
<span style="color: #666666; font-style: italic;">#   (use &quot;git reset HEAD &lt;file&gt;...&quot; to unstage)</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">#       deleted:    db/test.sqlite3</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Changed but not updated:</span>
<span style="color: #666666; font-style: italic;">#   (use &quot;git add &lt;file&gt;...&quot; to update what will be committed)</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">#       modified:   .gitignore</span>
<span style="color: #666666; font-style: italic;">#</span>
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git add .gitignore
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git status
<span style="color: #666666; font-style: italic;"># On branch master</span>
<span style="color: #666666; font-style: italic;"># Changes to be committed:</span>
<span style="color: #666666; font-style: italic;">#   (use &quot;git reset HEAD &lt;file&gt;...&quot; to unstage)</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">#       modified:   .gitignore</span>
<span style="color: #666666; font-style: italic;">#       deleted:    db/test.sqlite3</span>
<span style="color: #666666; font-style: italic;">#</span></pre></div></div>

<p>After running my tests my sqlite3 test db shows as modified.  Since my modification to .gitignore should be excluding all sqlite3 databases, it must already be in the git index.  So I removed it and added the updated .gitignore to the index.  I&#8217;m all ready for a commit.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git commit <span style="color: #660033;">-m</span> <span style="color: #ff0000;">&quot;resetting to post_9&quot;</span>
Created commit 79d6f46: resetting to post_9
 <span style="color: #000000;">2</span> files changed, <span style="color: #000000;">1</span> insertions<span style="color: #7a0874; font-weight: bold;">&#40;</span>+<span style="color: #7a0874; font-weight: bold;">&#41;</span>, <span style="color: #000000;">0</span> deletions<span style="color: #7a0874; font-weight: bold;">&#40;</span>-<span style="color: #7a0874; font-weight: bold;">&#41;</span>
 delete mode <span style="color: #000000;">100644</span> db<span style="color: #000000; font-weight: bold;">/</span>test.sqlite3
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git push github
git push github
Enter passphrase <span style="color: #000000; font-weight: bold;">for</span> key <span style="color: #ff0000;">'/home/rubyyot/.ssh/id_rsa'</span>:
To git<span style="color: #000000; font-weight: bold;">@</span>github.com:rubyyot<span style="color: #000000; font-weight: bold;">/</span>chores.git
 <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>rejected<span style="color: #7a0874; font-weight: bold;">&#93;</span>        master -<span style="color: #000000; font-weight: bold;">&gt;</span> master <span style="color: #7a0874; font-weight: bold;">&#40;</span>non-fast forward<span style="color: #7a0874; font-weight: bold;">&#41;</span>
error: failed to push some refs to <span style="color: #ff0000;">'git@github.com:rubyyot/chores.git'</span></pre></div></div>

<p>I make my commit and try to push to github.  The attempt is rejected.  Looks like I need to merge into it. </p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">rubyyot@atlas:~<span style="color:#006600; font-weight:bold;">/</span>working<span style="color:#006600; font-weight:bold;">/</span>chores$ git pull github master
Enter passphrase <span style="color:#9966CC; font-weight:bold;">for</span> key <span style="color:#996600;">'/home/rubyyot/.ssh/id_rsa'</span>:
From git@github.<span style="color:#9900CC;">com</span>:rubyyot<span style="color:#006600; font-weight:bold;">/</span>chores
 <span style="color:#006600; font-weight:bold;">*</span> branch            master     <span style="color:#006600; font-weight:bold;">-&gt;</span> FETCH_HEAD
Merge made by recursive.
 <span style="color:#9900CC;">README</span> <span style="color:#006600; font-weight:bold;">|</span>    <span style="color:#006666;">6</span> <span style="color:#006600; font-weight:bold;">++++++</span>
 <span style="color:#006666;">1</span> files changed, <span style="color:#006666;">6</span> insertions<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">+</span><span style="color:#006600; font-weight:bold;">&#41;</span>, <span style="color:#006666;">0</span> deletions<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">-</span><span style="color:#006600; font-weight:bold;">&#41;</span>
rubyyot@atlas:~<span style="color:#006600; font-weight:bold;">/</span>working<span style="color:#006600; font-weight:bold;">/</span>chores$ git merge ac60baa287c7ee73851d1b9895c7e6c826abddac
Already up<span style="color:#006600; font-weight:bold;">-</span>to<span style="color:#006600; font-weight:bold;">-</span>date.</pre></div></div>

<p>I pull from github which appears to auto-merge.  My manual attempt to merge tells me that I&#8217;m up to date.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ <span style="color: #c20cb9; font-weight: bold;">vi</span> README   <span style="color: #666666; font-style: italic;">#made a small change to README</span>
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git status
<span style="color: #666666; font-style: italic;"># On branch master</span>
<span style="color: #666666; font-style: italic;"># Your branch is ahead of 'origin/master' by 3 commits.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Changed but not updated:</span>
<span style="color: #666666; font-style: italic;">#   (use &quot;git add &lt;file&gt;...&quot; to update what will be committed)</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">#       modified:   README</span>
<span style="color: #666666; font-style: italic;">#</span>
no changes added to commit <span style="color: #7a0874; font-weight: bold;">&#40;</span>use <span style="color: #ff0000;">&quot;git add&quot;</span> and<span style="color: #000000; font-weight: bold;">/</span>or <span style="color: #ff0000;">&quot;git commit -a&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git add .
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git commit <span style="color: #660033;">-m</span> <span style="color: #ff0000;">&quot;small change to try commit to github&quot;</span>
Created commit 9991b45: small change to try commit to github
 <span style="color: #000000;">1</span> files changed, <span style="color: #000000;">1</span> insertions<span style="color: #7a0874; font-weight: bold;">&#40;</span>+<span style="color: #7a0874; font-weight: bold;">&#41;</span>, <span style="color: #000000;">1</span> deletions<span style="color: #7a0874; font-weight: bold;">&#40;</span>-<span style="color: #7a0874; font-weight: bold;">&#41;</span>
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git push github
Enter passphrase <span style="color: #000000; font-weight: bold;">for</span> key <span style="color: #ff0000;">'/home/rubyyot/.ssh/id_rsa'</span>:
Counting objects: <span style="color: #000000;">15</span>, done.
Compressing objects: <span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">8</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, done.
Writing objects: <span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">9</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">9</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, <span style="color: #000000;">955</span> bytes, done.
Total <span style="color: #000000;">9</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>delta <span style="color: #000000;">5</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, reused <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>delta <span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
To git<span style="color: #000000; font-weight: bold;">@</span>github.com:rubyyot<span style="color: #000000; font-weight: bold;">/</span>chores.git
   ac60baa..9991b45  master -<span style="color: #000000; font-weight: bold;">&gt;</span> master
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git status
<span style="color: #666666; font-style: italic;"># On branch master</span>
nothing to commit <span style="color: #7a0874; font-weight: bold;">&#40;</span>working directory clean<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p> I made a small change and attempted to commit to github.  It worked, yay!</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">rubyyot@atlas:~<span style="color:#006600; font-weight:bold;">/</span>working<span style="color:#006600; font-weight:bold;">/</span>chores$ vi README  <span style="color:#008000; font-style:italic;">#another small change to README</span>
rubyyot@atlas:~<span style="color:#006600; font-weight:bold;">/</span>working<span style="color:#006600; font-weight:bold;">/</span>chores$ git status
<span style="color:#008000; font-style:italic;"># On branch master</span>
<span style="color:#008000; font-style:italic;"># Changed but not updated:</span>
<span style="color:#008000; font-style:italic;">#   (use &quot;git add &lt;file&gt;...&quot; to update what will be committed)</span>
<span style="color:#008000; font-style:italic;">#</span>
<span style="color:#008000; font-style:italic;">#       modified:   README</span>
<span style="color:#008000; font-style:italic;">#</span>
no changes added to commit <span style="color:#006600; font-weight:bold;">&#40;</span>use <span style="color:#996600;">&quot;git add&quot;</span> <span style="color:#9966CC; font-weight:bold;">and</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#9966CC; font-weight:bold;">or</span> <span style="color:#996600;">&quot;git commit -a&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
rubyyot@atlas:~<span style="color:#006600; font-weight:bold;">/</span>working<span style="color:#006600; font-weight:bold;">/</span>chores$ git add .
<span style="color:#9900CC;">rubyyot</span>@atlas:~<span style="color:#006600; font-weight:bold;">/</span>working<span style="color:#006600; font-weight:bold;">/</span>chores$ git commit <span style="color:#006600; font-weight:bold;">-</span>m <span style="color:#996600;">&quot;another small commit to test new remote to github&quot;</span>
Created commit a5b8a72: another small commit to test new remote to github
 <span style="color:#006666;">1</span> files changed, <span style="color:#006666;">1</span> insertions<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">+</span><span style="color:#006600; font-weight:bold;">&#41;</span>, <span style="color:#006666;">1</span> deletions<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">-</span><span style="color:#006600; font-weight:bold;">&#41;</span>
rubyyot@atlas:~<span style="color:#006600; font-weight:bold;">/</span>working<span style="color:#006600; font-weight:bold;">/</span>chores$ git push origin
fatal: protocol error: expected sha<span style="color:#006600; font-weight:bold;">/</span>ref, got <span style="color:#996600;">'
*********'</span>
&nbsp;
You can<span style="color:#996600;">'t push to git://github.com/user/repo.git
Use git@github.com:user/repo.git
&nbsp;
*********'</span></pre></div></div>

<p>You will recall that earlier I removed my remote to my shared host and replaced it with github.  Here I tried to push another small commit to it and it failed.  I used my public clone url rather than my private ssh protected one, as I mentioned earlier.  Time to fix that.  </p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git remote <span style="color: #c20cb9; font-weight: bold;">rm</span> origin
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git remote add origin git<span style="color: #000000; font-weight: bold;">@</span>github.com:rubyyot<span style="color: #000000; font-weight: bold;">/</span>chores.git
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git status
<span style="color: #666666; font-style: italic;"># On branch master</span>
nothing to commit <span style="color: #7a0874; font-weight: bold;">&#40;</span>working directory clean<span style="color: #7a0874; font-weight: bold;">&#41;</span>
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git push origin
Enter passphrase <span style="color: #000000; font-weight: bold;">for</span> key <span style="color: #ff0000;">'/home/rubyyot/.ssh/id_rsa'</span>:
Counting objects: <span style="color: #000000;">5</span>, done.
Compressing objects: <span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">3</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, done.
Writing objects: <span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">3</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, <span style="color: #000000;">330</span> bytes, done.
Total <span style="color: #000000;">3</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>delta <span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, reused <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>delta <span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
To git<span style="color: #000000; font-weight: bold;">@</span>github.com:rubyyot<span style="color: #000000; font-weight: bold;">/</span>chores.git
   9991b45..a5b8a72  master -<span style="color: #000000; font-weight: bold;">&gt;</span> master
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$ git <span style="color: #c20cb9; font-weight: bold;">gc</span>
Counting objects: <span style="color: #000000;">352</span>, done.
Compressing objects: <span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">244</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">244</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, done.
Writing objects: <span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">352</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">352</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, done.
Total <span style="color: #000000;">352</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>delta <span style="color: #000000;">105</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, reused <span style="color: #000000;">275</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>delta <span style="color: #000000;">71</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores$</pre></div></div>

<p>All fixed up and I&#8217;m back in sync.  I am still new to git and am only familiar with the handful of commands I use on a daily basis.  There was probably a better or easier way to do what I did.  If so, feel free to comment.  If you are new to git too here are a couple resources.</p>
<ul>
<li><a href="http://www.kernel.org/pub/software/scm/git/docs/everyday.html" target="_blank">Everyday Git</a> </li>
<li><a href="http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/01/git-for-windows-developers-git-series-part-1.aspx" target="_blank">Git for Windows on Los Techies</a></li>
</ul>
<h3>How do I?</h3>
<p>Below I included a small experiment I did where I cloned the chores source to a new local repository, checked out the post_9 tag to a new branch, modified origin to point to another repository, and checked the branch into master.  Hopefully it will give you something to work with if you want to do anything similar.  Alternatively, you could fork my github source into your own github repo and have fun.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">&nbsp;
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working$ git clone   git:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>rubyyot<span style="color: #000000; font-weight: bold;">/</span>chores.git chores-github
Initialized empty Git repository <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>rubyyot<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores-github<span style="color: #000000; font-weight: bold;">/</span>.git<span style="color: #000000; font-weight: bold;">/</span>
remote: Counting objects: <span style="color: #000000;">352</span>, done.
remote: Compressing objects: <span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">227</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">227</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, done.
remote: Total <span style="color: #000000;">352</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>delta <span style="color: #000000;">105</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, reused <span style="color: #000000;">320</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>delta <span style="color: #000000;">88</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
Receiving objects: <span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">352</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">352</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, <span style="color: #000000;">139.50</span> KiB, done.
Resolving deltas: <span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">105</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">105</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, done.
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working$ <span style="color: #7a0874; font-weight: bold;">cd</span> chores-github<span style="color: #000000; font-weight: bold;">/</span>
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores-github$ git branch post_9_branch post_9
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores-github$ git checkout post_9_branch
Switched to branch <span style="color: #ff0000;">&quot;post_9_branch&quot;</span>
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores-github$
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores-github$ git remote <span style="color: #c20cb9; font-weight: bold;">rm</span> origin
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores-github$ git remote add origin <span style="color: #c20cb9; font-weight: bold;">ssh</span>:<span style="color: #000000; font-weight: bold;">//</span>USERNAME<span style="color: #000000; font-weight: bold;">@</span>example.com<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>repo
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores-github$ git pull origin master
USERNAME<span style="color: #000000; font-weight: bold;">@</span>example.coms password:
From <span style="color: #c20cb9; font-weight: bold;">ssh</span>:<span style="color: #000000; font-weight: bold;">//</span>USERNAME<span style="color: #000000; font-weight: bold;">@</span>example.com<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>repo
 <span style="color: #000000; font-weight: bold;">*</span> branch            master     -<span style="color: #000000; font-weight: bold;">&gt;</span> FETCH_HEAD
Already up-to-date.
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores-github$ git status
<span style="color: #666666; font-style: italic;"># On branch post_9_branch</span>
nothing to commit <span style="color: #7a0874; font-weight: bold;">&#40;</span>working directory clean<span style="color: #7a0874; font-weight: bold;">&#41;</span>
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores-github$ git checkout master
Switched to branch <span style="color: #ff0000;">&quot;master&quot;</span>
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores-github$ git merge post_9_branch
Already up-to-date.
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores-github$ git status
<span style="color: #666666; font-style: italic;"># On branch master</span>
nothing to commit <span style="color: #7a0874; font-weight: bold;">&#40;</span>working directory clean<span style="color: #7a0874; font-weight: bold;">&#41;</span>
rubyyot<span style="color: #000000; font-weight: bold;">@</span>atlas:~<span style="color: #000000; font-weight: bold;">/</span>working<span style="color: #000000; font-weight: bold;">/</span>chores-github$</pre></div></div>

<h3>Conclusion</h3>
<p>In all it seems that things were not as bad as I had originally thought.  Still it reinforces the need for discipline in doing TDD and coding in general.  In the next post I will look over the health of the app and (hopefully) take appropriate steps to correct any problems. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rubyyot.com/2009/06/chores-a-test-driven-website-part-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
