<?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>Matthew Bass &#187; Tools</title>
	<atom:link href="http://matthewbass.com/category/tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://matthewbass.com</link>
	<description>Musings on software and life...</description>
	<lastBuildDate>Sat, 17 Jul 2010 03:44:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Amending git commits</title>
		<link>http://matthewbass.com/2010/07/10/amending-git-commits/</link>
		<comments>http://matthewbass.com/2010/07/10/amending-git-commits/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 20:37:14 +0000</pubDate>
		<dc:creator>Matthew Bass</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://matthewbass.com/?p=617</guid>
		<description><![CDATA[Git is a wonderful SCM with some very powerful features. But as a programmer, it&#8217;s very easy to aquire a rudimentary working knowledge of Git and never learn anything more. For example, how would we fix our repository if we committed the wrong piece of code? What if our commit had an error in it? [...]]]></description>
			<content:encoded><![CDATA[<p>Git is a wonderful SCM with some very powerful features. But as a programmer, it&#8217;s very easy to aquire a rudimentary working knowledge of Git and never learn anything more. For example, how would we fix our repository if we committed the wrong piece of code? What if our commit had an error in it? How do we fix things without reverting or introducing a second commit?</p>
<p>It turns out this is very easy to do. The latest versions of Git have an <code>amend</code> command. Amend lets us alter the last commit we made. All that&#8217;s necessary is for us to arrange our working directory the way we want the last commit to look and then execute:</p>
<pre class="brush: bash;">
git commit --amend
</pre>
<p>This will update the most recent commit based on the state of our working directory. For example, say we changed our README file in the last commit and accidentally introduced a typo. To fix the last commit, we would edit the README again, <code>git add</code> the change, and instead of running <code>git commit</code> which would create a second commit, we run <code>git commit --amend</code> which patches the last commit. This can be repeated as many times as necessary.</p>
<p>Note that rewriting history like this can have serious implications if you&#8217;ve already published the most recent commit. But if you&#8217;re the only developer using the repository, or if you haven&#8217;t published yet, this can be a great way to fix minor mistakes without introducing an entirely new commit.</p>
<p>You can read more about <code>amend</code> in the <a href="http://www.kernel.org/pub/software/scm/git/docs/git-commit.html">documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewbass.com/2010/07/10/amending-git-commits/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quick &#8216;n dirty Lindo step for Cucumber</title>
		<link>http://matthewbass.com/2010/05/11/quick-n-dirty-lindo-step-for-cucumber/</link>
		<comments>http://matthewbass.com/2010/05/11/quick-n-dirty-lindo-step-for-cucumber/#comments</comments>
		<pubDate>Tue, 11 May 2010 19:02:54 +0000</pubDate>
		<dc:creator>Matthew Bass</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://matthewbass.com/?p=523</guid>
		<description><![CDATA[Lindo is great for verifying your Rails tests by opening the HTTP response body in a browser for inspection. It works with most popular testing frameworks including Test::Unit and RSpec. But what about Cucumber?
It&#8217;s actually pretty easy to build a custom Cucumber step that triggers Lindo from your cukes. First, install the Lindo gem in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.adeptware.com/blog/2009/06/29/lindo-makes-rails-testing-easier/">Lindo</a> is great for verifying your Rails tests by opening the HTTP response body in a browser for inspection. It works with most popular testing frameworks including Test::Unit and RSpec. But what about Cucumber?</p>
<p>It&#8217;s actually pretty easy to build a custom Cucumber step that triggers Lindo from your cukes. First, install the Lindo gem in your Rails app. Then create <code>features/steps/lindo_steps.rb</code> and insert this code:</p>
<pre class="brush: ruby;">
Then /^render the current page$/ do
  extend Lindo
  vr
end
</pre>
<p>The step can be named whatever you like best, but &#8220;render the current page&#8221; works for me. To trigger Lindo from within your cukes, simply reference the step like so:</p>
<pre class="brush: ruby;">
Given I am logged in
When I follow &quot;some link&quot;
Then render the current page
</pre>
<p>When Cucumber hits the last step, the default browser window will open and the contents of the page at that step in the scenario will be displayed. This is very handy when troubleshooting why a specific scenario is failing. It&#8217;s also useful for determining what you should be testing for on a given page.</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewbass.com/2010/05/11/quick-n-dirty-lindo-step-for-cucumber/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress upgrade was moderately easy</title>
		<link>http://matthewbass.com/2010/02/12/wordpress-upgrade-was-moderately-easy/</link>
		<comments>http://matthewbass.com/2010/02/12/wordpress-upgrade-was-moderately-easy/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 16:27:04 +0000</pubDate>
		<dc:creator>Matthew Bass</dc:creator>
				<category><![CDATA[General Interest]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://matthewbass.com/?p=289</guid>
		<description><![CDATA[I recently upgraded my blog to WordPress 2.9.1 and I&#8217;m very pleased with the results. The upgrade itself was very straightforward. It was just a matter of replacing the correct files in my project. I have my project checked into GitHub so I was able to immediately see what had changed. I also had a [...]]]></description>
			<content:encoded><![CDATA[<p>I recently upgraded my blog to <a href="http://wordpress.org/">WordPress 2.9.1</a> and I&#8217;m very pleased with the results. The upgrade itself was very straightforward. It was just a matter of replacing the correct files in my project. I have my project checked into <a href="http://github.com">GitHub</a> so I was able to immediately see what had changed. I also had a safety net in case I wanted to back out of the upgrade.</p>
<p>One nice benefit to upgrading was that I&#8217;m now able to leverage the <a href="http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/">Syntax Highlighter</a> plugin. It does nifty stuff like this:</p>
<pre class="brush: ruby;">
class HelloWorld
  def say_hello
    puts &quot;Hello world!&quot;
  end
end
HelloWorld.new.say_hello
</pre>
<p>If you run a WordPress blog, I would definitely recommend checking it into some sort of source control. Also, being able to run the blog on my development system is very beneficial. I was able to verify that the upgrade hadn&#8217;t borked my layout before making everything live. I use Apache to serve it up locally.</p>
<p>What platform do you use for blogging? What do you like about it?</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewbass.com/2010/02/12/wordpress-upgrade-was-moderately-easy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Delete/backspace doesn&#8217;t work in nano</title>
		<link>http://matthewbass.com/2010/02/11/deletebackspace-doesnt-work-in-nano/</link>
		<comments>http://matthewbass.com/2010/02/11/deletebackspace-doesnt-work-in-nano/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 18:32:21 +0000</pubDate>
		<dc:creator>Matthew Bass</dc:creator>
				<category><![CDATA[General Interest]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://matthewbass.com/?p=436</guid>
		<description><![CDATA[If you&#8217;ve ever performed a fresh install of Ubuntu, you&#8217;ve probably noticed that the delete/backspace key doesn&#8217;t work correctly in nano. This is frustrating, but easy enough to fix.
This problem also occurs quite frequently for me when logging into a remote server. For example, a default Slicehost instance usually suffers from this behavior.
If you truly [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever performed a fresh install of Ubuntu, you&#8217;ve probably noticed that the delete/backspace key doesn&#8217;t work correctly in nano. This is frustrating, but easy enough <a href="http://extrabright.com/blog/2007/06/03/ubuntu-nano-backspace-problem-fix/">to fix</a>.</p>
<p>This problem also occurs quite frequently for me when logging into a remote server. For example, a default <a href="http://slicehost.com">Slicehost</a> instance usually suffers from this behavior.</p>
<p>If you truly want to understand what causes the problem, check out <a href="http://tldp.org/HOWTO/Keyboard-and-Console-HOWTO-5.html">this article</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewbass.com/2010/02/11/deletebackspace-doesnt-work-in-nano/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lindo testing helper gets some love</title>
		<link>http://matthewbass.com/2009/06/29/lindo-testing-helper-gets-some-love/</link>
		<comments>http://matthewbass.com/2009/06/29/lindo-testing-helper-gets-some-love/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 20:00:38 +0000</pubDate>
		<dc:creator>Matthew Bass</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://matthewbass.com/?p=369</guid>
		<description><![CDATA[Lindo helps you write and verify Rails functional and integration tests by opening the HTTP response body in the default browser for inspection. This can be a real time-saver when you&#8217;re trying to figure out why your assert_select or have_tag calls aren&#8217;t passing.
In its initial version, Lindo assumed that your app was running at localhost:3000 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.adeptware.com/blog/2009/06/29/lindo-makes-rails-testing-easier/">Lindo</a> helps you write and verify Rails functional and integration tests by opening the HTTP response body in the default browser for inspection. This can be a real time-saver when you&#8217;re trying to figure out why your <code>assert_select</code> or <code>have_tag</code> calls aren&#8217;t passing.</p>
<p>In its initial version, Lindo assumed that your app was running at localhost:3000 (a fair assumption given the prevalence of Mongrel last year). Now that <a href="http://www.modrails.com/">Passenger</a> is on the scene, something better needed to be done. The reliance on a running app server was a disadvantage to begin with. Now Lindo doesn&#8217;t require anything to be running. It dumps the HTML to disk, fixes any relative asset URLs, and opens the file using your default browser.</p>
<p>Once you&#8217;ve written your first test with the assistance of Lindo, you won&#8217;t want to go back!</p>
<p>Lindo was developed by my company, <a href="http://adeptware.com">Adeptware</a>, and can be pulled from <a href="http://github.com/adeptware/lindo/">GitHub</a>. I&#8217;ve also posted a brief <a href="http://www.adeptware.com/blog/2009/06/29/lindo-makes-rails-testing-easier/">introduction to Lindo</a> and some basic installation instructions.</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewbass.com/2009/06/29/lindo-testing-helper-gets-some-love/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Auto timeout sessions in Rails</title>
		<link>http://matthewbass.com/2009/06/03/auto-timeout-sessions-in-rails/</link>
		<comments>http://matthewbass.com/2009/06/03/auto-timeout-sessions-in-rails/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 00:23:52 +0000</pubDate>
		<dc:creator>Matthew Bass</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://matthewbass.com/?p=336</guid>
		<description><![CDATA[I released the initial version of my auto-session-timeout plugin for Rails at West End Ruby tonight.
Have you ever wanted to force your users off your app if they go idle for a certain period of time? Many online banking sites use this technique. If your app is used on any kind of public computer system, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://matthewbass.com/wp-content/uploads/2009/06/20090604-e41yj7h4jw8iwqr21maw1pnhg6.jpg" alt="Time Out!" title="Time Out!" width="130" height="186" align="right" style="padding-left:20px" />I released the initial version of my <a href="http://github.com/pelargir/auto-session-timeout/">auto-session-timeout</a> plugin for Rails at <a href="http://www.meetup.com/raleighrb/calendar/10543524/">West End Ruby</a> tonight.</p>
<p>Have you ever wanted to force your users off your app if they go idle for a certain period of time? Many online banking sites use this technique. If your app is used on any kind of public computer system, this type of functionality is essential for maintaining the privacy of your data.</p>
<p>After installing the plugin, a small snippet of JavaScript is placed on each page. The JS polls the server every minute to see if the session is still active. If the user has been idle for at least an hour, they are immediately redirected to a timeout page. The session will not timeout as long as the user keeps clicking around. The timeout and polling intervals are both configurable.</p>
<p>The plugin is dead simple to install and configure. To get started:</p>
<pre class="brush: bash; light: true;">
script/plugin install git://github.com/pelargir/auto-session-timeout.git
</pre>
<p>Then hit the <a href="http://github.com/pelargir/auto-session-timeout">README</a> for step-by-step instructions.</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewbass.com/2009/06/03/auto-timeout-sessions-in-rails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Where does TextMate store its bundles anyway?</title>
		<link>http://matthewbass.com/2008/06/11/where-does-textmate-store-its-bundles/</link>
		<comments>http://matthewbass.com/2008/06/11/where-does-textmate-store-its-bundles/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 02:44:47 +0000</pubDate>
		<dc:creator>Matthew Bass</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://matthewbass.com/2008/06/11/where-does-textmate-store-its-bundles/</guid>
		<description><![CDATA[After spending nearly an hour tracking down where a particular TextMate bundle was coming from, I have surmised that there are no less than four places on my Mac&#8217;s hard drive where bundles may be lurking. In no particular order, they are:

~/Library/Application Support/TextMate/Pristine Copy/Bundles
~/Library/Application Support/TextMate/Bundles
/Applications/TextMate.app/Contents/SharedSupport/Bundles
/Library/Application Support/TextMate/Bundles

]]></description>
			<content:encoded><![CDATA[<p>After spending nearly an hour tracking down where a particular TextMate bundle was coming from, I have surmised that there are no less than four places on my Mac&#8217;s hard drive where bundles may be lurking. In no particular order, they are:</p>
<pre>
~/Library/Application Support/TextMate/Pristine Copy/Bundles
~/Library/Application Support/TextMate/Bundles
/Applications/TextMate.app/Contents/SharedSupport/Bundles
/Library/Application Support/TextMate/Bundles
</pre>
]]></content:encoded>
			<wfw:commentRss>http://matthewbass.com/2008/06/11/where-does-textmate-store-its-bundles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brightkite is fun</title>
		<link>http://matthewbass.com/2008/05/30/brightkite-is-fun/</link>
		<comments>http://matthewbass.com/2008/05/30/brightkite-is-fun/#comments</comments>
		<pubDate>Fri, 30 May 2008 19:46:32 +0000</pubDate>
		<dc:creator>Matthew Bass</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://matthewbass.com/2008/05/30/brightkite-is-fun/</guid>
		<description><![CDATA[I&#8217;m really enjoying using Brightkite. It&#8217;s a location-based social networking tool that lets you see what other people in your vicinity are doing. A GPS unit isn&#8217;t required and it integrates fairly well with Twitter and GMaps. (I&#8217;d love to see even tighter Twitter integration in the future.) Drop a comment on this post if [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m really enjoying using <a href="http://brightkite.com">Brightkite</a>. It&#8217;s a location-based social networking tool that lets you see what other people in your vicinity are doing. A GPS unit isn&#8217;t required and it integrates fairly well with Twitter and GMaps. (I&#8217;d love to see even tighter Twitter integration in the future.) Drop a comment on this post if you want an invite.</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewbass.com/2008/05/30/brightkite-is-fun/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Key_read/uudecode failed when pulling from git</title>
		<link>http://matthewbass.com/2008/05/21/key_readuudecode-failed-when-pulling-from-git/</link>
		<comments>http://matthewbass.com/2008/05/21/key_readuudecode-failed-when-pulling-from-git/#comments</comments>
		<pubDate>Wed, 21 May 2008 22:33:03 +0000</pubDate>
		<dc:creator>Matthew Bass</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://matthewbass.com/2008/05/21/key_readuudecode-failed-when-pulling-from-git/</guid>
		<description><![CDATA[I began getting a strange error message from git earlier this week:

key_read: uudecode (random SSH key junk here)
 ssh-rsa (more random SSH key junk here)
 failed

The error message only showed up when I ran git pull. Google didn&#8217;t find much to help me, but acting on a hunch I removed the IP address of my [...]]]></description>
			<content:encoded><![CDATA[<p>I began getting a strange error message from git earlier this week:</p>
<pre>
key_read: uudecode (random SSH key junk here)
 ssh-rsa (more random SSH key junk here)
 failed
</pre>
<p>The error message only showed up when I ran <code>git pull</code>. Google didn&#8217;t find much to help me, but acting on a hunch I removed the IP address of my git repo from my known hosts. The error immediately went away.</p>
<p>If you&#8217;re getting the same message, determine the IP address or domain name of your git repo. Search for those values in your <code>~/.ssh/known_hosts</code> file and remove them. You should be good to go after that.</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewbass.com/2008/05/21/key_readuudecode-failed-when-pulling-from-git/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Introducing the Lindo (response_visualizer) plugin for Rails</title>
		<link>http://matthewbass.com/2007/11/03/introducing-the-response_visualizer-plugin-for-rails/</link>
		<comments>http://matthewbass.com/2007/11/03/introducing-the-response_visualizer-plugin-for-rails/#comments</comments>
		<pubDate>Sat, 03 Nov 2007 14:31:03 +0000</pubDate>
		<dc:creator>Matthew Bass</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://matthewbass.com/2007/11/03/introducing-the-response_visualizer-plugin-for-rails/</guid>
		<description><![CDATA[Being at RubyConf this weekend has provided the necessary motivation for me to finally release a new Ruby gem I&#8217;ve been building. It&#8217;s an extraction from a project I&#8217;ve been working on for Relevance.
I&#8217;m a regular user of assert_select in my functional tests. I find myself frequently doing something like this when the assertion is [...]]]></description>
			<content:encoded><![CDATA[<p>Being at RubyConf this weekend has provided the necessary motivation for me to finally release a new Ruby gem I&#8217;ve been building. It&#8217;s an extraction from a project I&#8217;ve been working on for <a href="http://thinkrelevance.com">Relevance</a>.</p>
<p>I&#8217;m a regular user of <code>assert_select</code> in my functional tests. I find myself frequently doing something like this when the assertion is failing and I can&#8217;t figure out why:</p>
<pre>
def test_something
  post :something
  raise @response.body.inspect
  assert_select "div[id=header]"
end
</pre>
<p>Inspecting the response body usually leads me to a solution, but it&#8217;s tedious parsing through the huge amount of HTML that gets returned, often in a semi-unreadable format. Enter the response_visualizer plugin (which has since been renamed <a href="http://www.adeptware.com/blog/2009/06/29/lindo-makes-rails-testing-easier/">Lindo</a>):</p>
<pre>
script/plugin install http://github.com/adeptware/lindo/
</pre>
<p>Or clone the project directly:</p>
<pre>
git clone http://github.com/adeptware/lindo/
</pre>
<p>The plugin provides a <code>vr</code> method to your functional tests. When this method is called, the response body is automatically opened in the default browser allowing for easy visual inspection of the page&#8217;s content:</p>
<pre>
post :new
vr
...
</pre>
<p>If you&#8217;d prefer to jump straight to the source code, passing the <code>:html</code> symbol will open the formatted HTML in the default text editor:</p>
<pre>
post :new
vr(:html)
...
</pre>
<p>This has saved me a lot of time in figuring out why a specific assertion is failing. Instead of parsing through the HTML, I can view the entire page and immediately tell if something is missing or out of place. I find myself calling <code>vr</code> even before I write my assertions now.</p>
<p>After installing, check out the <a href="http://github.com/adeptware/lindo/tree/master/README">README</a> file for additional documentation. There is also a <a href="http://github.com/adeptware/lindo/">GitHub project</a> if you&#8217;d like to contribute a patch or fork the code. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewbass.com/2007/11/03/introducing-the-response_visualizer-plugin-for-rails/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
