<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Kevin Colyar » Blog</title>
	
	<link>http://kevin.colyar.net</link>
	<description>Computer Scientist &amp; Software Craftstman</description>
	<lastBuildDate>Mon, 19 Jul 2010 23:34:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
   <image>
    <title>Kevin Colyar</title>
    <url>http://www.gravatar.com/avatar/1ef0603cbb4cee2961dd9dc2076d8c25?s=</url>
    <link>http://kevin.colyar.net</link>
   </image>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/kevincolyar" /><feedburner:info uri="kevincolyar" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Gist of the Day #001 – Irb Syntax Coloring</title>
		<link>http://feedproxy.google.com/~r/kevincolyar/~3/1c0OoOg4cC4/</link>
		<comments>http://kevin.colyar.net/2010/07/gist-of-the-day-001-irb-syntax-coloring/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 23:33:55 +0000</pubDate>
		<dc:creator>Kevin Colyar</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[gist]]></category>

		<guid isPermaLink="false">http://kevin.colyar.net/?p=406</guid>
		<description><![CDATA[To get sweet syntax coloring in irb like this:

Do this in your .irbrc file:

]]></description>
			<content:encoded><![CDATA[<p>To get sweet syntax coloring in irb like this:<br />
<img src="http://img.skitch.com/20100719-mnmfwiaq31xabcgjx5aj56dj9q.png" alt="" /></p>
<p>Do this in your .irbrc file:<br />
<script src="http://gist.github.com/482211.js?file=.irbrc"></script></p>
<img src="http://feeds.feedburner.com/~r/kevincolyar/~4/1c0OoOg4cC4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kevin.colyar.net/2010/07/gist-of-the-day-001-irb-syntax-coloring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kevin.colyar.net/2010/07/gist-of-the-day-001-irb-syntax-coloring/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=gist-of-the-day-001-irb-syntax-coloring</feedburner:origLink></item>
		<item>
		<title>A Better sudo for Dreamhost PS</title>
		<link>http://feedproxy.google.com/~r/kevincolyar/~3/7mC-B8c9Nlk/</link>
		<comments>http://kevin.colyar.net/2010/06/a-better-sudo-for-dreamhost-ps/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 18:59:37 +0000</pubDate>
		<dc:creator>Kevin Colyar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kevin.colyar.net/?p=380</guid>
		<description><![CDATA[Tired of having to su to your sudo users on your dreamhost server?  Here&#8217;s a quick script to help.
Requirements:

You have a sudouser setup on your dreamhost account.  These are only available for private servers.
Make sure ~/bin is in your path.

Now to the good stuff.
Puth the following code into ~/bin/sudo

 #!/bin/sh
su yoursudouser -c "/usr/bin/sudo $*"
Make the [...]]]></description>
			<content:encoded><![CDATA[<p>Tired of having to su to your sudo users on your dreamhost server?  Here&#8217;s a quick script to help.</p>
<p><strong>Requirements</strong>:</p>
<ul>
<li>You have a sudouser setup on your dreamhost account.  These are only available for private servers.</li>
<li>Make sure ~/bin is in your path.</li>
</ul>
<p>Now to the good stuff.</p>
<p>Puth the following code into ~/bin/sudo</p>
<ol></ol>
<p><code> #!/bin/sh<br />
su yoursudouser -c "/usr/bin/sudo $*"</code></p>
<p>Make the file executable</p>
<ol></ol>
<p><code>$ chmod +x ~/bin/sudo</code></p>
<p>You can now do the following from your normal user:</p>
<p><code>$ sudo ls</code></p>
<img src="http://feeds.feedburner.com/~r/kevincolyar/~4/7mC-B8c9Nlk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kevin.colyar.net/2010/06/a-better-sudo-for-dreamhost-ps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kevin.colyar.net/2010/06/a-better-sudo-for-dreamhost-ps/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=a-better-sudo-for-dreamhost-ps</feedburner:origLink></item>
		<item>
		<title>Getting Started With iCuke</title>
		<link>http://feedproxy.google.com/~r/kevincolyar/~3/WxxoGqwfdYU/</link>
		<comments>http://kevin.colyar.net/2010/06/getting-started-with-icuke/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 05:32:40 +0000</pubDate>
		<dc:creator>Kevin Colyar</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Cucumber]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://kevin.colyar.net/?p=358</guid>
		<description><![CDATA[Tonight I decided to give iCuke a try but I couldn&#8217;t find any good getting started guides.  iCuke is a BDD gem for cucumber that enables integration testing for the iPhone.  I&#8217;m familiar with using cucumber with Rails so getting going wasn&#8217;t terribly difficult but thought the pre-reqs should be a little more clear.
Here are [...]]]></description>
			<content:encoded><![CDATA[<p>Tonight I decided to give <a href="http://github.com/unboxed/icuke">iCuke</a> a try but I couldn&#8217;t find any good getting started guides.  iCuke is a BDD gem for <a href="http://cukes.info/">cucumber</a> that enables integration testing for the iPhone.  I&#8217;m familiar with using <a href="http://cukes.info/">cucumber</a> with <a href="http://rubyonrails.org/">Rails</a> so getting going wasn&#8217;t terribly difficult but thought the pre-reqs should be a little more clear.</p>
<p><em>Here are five simple steps for getting started:</em></p>
<p><strong>Step 1: Setup directories</strong></p>
<p><code>$ cd path/to/your/iphone/app<br />
$ mkdir features<br />
$ cd features<br />
$ mkdir support step_definitions</code></p>
<p><strong>Step 2: Create cucumber.yml with the following content:<br />
</strong> <code>default: -r support -r step_definitions .</code></p>
<div><strong>Step 3: Create support/iphone.rb with the following content:</strong><br />
<code>require 'icuke/cucumber'</code></div>
<div><strong><br />
</strong></div>
<div><strong>Step 4: Enable the iPhone Simulator Accessibility Inspector in System Preferences</strong></div>
<div>
<div><a href="http://kevin.colyar.net/wp-content/uploads/2010/06/iPhone-Simulator.jpg"><img class="size-full wp-image-361 alignnone" title="iPhone Simulator" src="http://kevin.colyar.net/wp-content/uploads/2010/06/iPhone-Simulator.jpg" alt="" width="319" height="204" /></a></div>
<div style="margin-top: 10px;"><strong>Step 5:  Create app.feature with the following content:<br />
</strong></div>
<div>
<p><span style="font-family: Monaco, 'Courier New', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; line-height: normal; font-size: 10px;"> </span></p>
<pre style="padding-top: 0.25em !important; padding-right: 0.5em !important; padding-bottom: 0.5em !important; padding-left: 0.5em !important; font-size: 13px; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; background-image: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; background-color: transparent !important; background-position: initial initial !important; background-repeat: initial initial !important; margin: 0px !important; border: initial !important none !important initial !important;">
<div id="LC1" class="line" style="padding: 0px; margin: 0px;"><span class="nc" style="color: #445588; font-weight: bold; padding: 0px; margin: 0px;">Background:</span><span class="no" style="color: #008080; padding: 0px; margin: 0px;"> </span>
<span class="k" style="color: #000000; font-weight: bold; padding: 0px; margin: 0px;">  Given </span><span class="s" style="color: #dd1144; padding: 0px; margin: 0px;">"MyApp"</span> from <span class="s" style="color: #dd1144; padding: 0px; margin: 0px;">"../MyApp.xcodeproj"</span> is loaded in the simulator
<div id="LC5" class="line" style="padding: 0px; margin: 0px;"><span class="nc" style="color: #445588; font-weight: bold; padding: 0px; margin: 0px;">Scenario:</span><span class="no" style="color: #008080; padding: 0px; margin: 0px;"> User views the Home screen</span><span class="k" style="color: #000000; font-weight: bold; padding: 0px; margin: 0px;">
  When </span>I tap <span class="s" style="color: #dd1144; padding: 0px; margin: 0px;">"Home"</span>
  <span class="k" style="color: #000000; font-weight: bold; padding: 0px; margin: 0px;">Then </span>I should see <span class="s" style="color: #dd1144; padding: 0px; margin: 0px;">"Welcome"</span></div>
</div>
</pre>
</div>
</div>
<img src="http://feeds.feedburner.com/~r/kevincolyar/~4/WxxoGqwfdYU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kevin.colyar.net/2010/06/getting-started-with-icuke/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://kevin.colyar.net/2010/06/getting-started-with-icuke/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=getting-started-with-icuke</feedburner:origLink></item>
		<item>
		<title>Show Path in Finder Window Title Bars</title>
		<link>http://feedproxy.google.com/~r/kevincolyar/~3/RLk5IfvpB8I/</link>
		<comments>http://kevin.colyar.net/2010/03/show-path-in-finder-window-title-bars/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 20:50:29 +0000</pubDate>
		<dc:creator>Kevin Colyar</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://kevin.colyar.net/?p=344</guid>
		<description><![CDATA[
Here&#8217;s a quick way to show your path in Finder windows.  Open a Terminal window and enter the following:
To enable:
$ defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
$ killall Finder
To disable:
$ defaults write com.apple.finder _FXShowPosixPathInTitle -bool NO
$ killall Finder
]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://kevin.colyar.net/wp-content/uploads/2010/03/Library_Application-Support.png"><img class="size-medium wp-image-352 aligncenter" title="_Library_Application Support" src="http://kevin.colyar.net/wp-content/uploads/2010/03/Library_Application-Support-300x225.png" alt="" width="300" height="225" /></a></p>
<p>Here&#8217;s a quick way to show your path in Finder windows.  Open a Terminal window and enter the following:</p>
<p>To enable:</p>
<p><code>$ defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES</code><br />
<code>$ killall Finder</code></p>
<p>To disable:</p>
<p><code>$ defaults write com.apple.finder _FXShowPosixPathInTitle -bool NO</code><br />
<code>$ killall Finder</code></p>
<img src="http://feeds.feedburner.com/~r/kevincolyar/~4/RLk5IfvpB8I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kevin.colyar.net/2010/03/show-path-in-finder-window-title-bars/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kevin.colyar.net/2010/03/show-path-in-finder-window-title-bars/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=show-path-in-finder-window-title-bars</feedburner:origLink></item>
		<item>
		<title>Vim Screencasts</title>
		<link>http://feedproxy.google.com/~r/kevincolyar/~3/XR5sKK-9F7A/</link>
		<comments>http://kevin.colyar.net/2010/03/vim-screencasts/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 05:54:22 +0000</pubDate>
		<dc:creator>Kevin Colyar</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Mouse-less Computing]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://kevin.colyar.net/?p=340</guid>
		<description><![CDATA[Derek Wyatt&#8217;s Screencasts &#8211; By far the best series on learning Vim I&#8217;ve seen.  Must see.
http://www.vimeo.com/user1690209/videos
UPDATE &#8211; Derek Wyatt has created a new, more organized site for his Vim tutorials
http://www.derekwyatt.org/vim/vim-tutorial-videos/
Vimcasts &#8211; This is a good link to add to your rss reader.  Updates fairly often  with good vim tips.
http://vimcasts.org/
Codeulate Screencasts&#8217; Vim for Rails [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Derek Wyatt&#8217;s Screencasts</strong> &#8211; By far the best series on learning Vim I&#8217;ve seen.  Must see.<br />
<a href="http://www.vimeo.com/user1690209/videos" target="_blank">http://www.vimeo.com/user1690209/videos</a></p>
<p>UPDATE &#8211; Derek Wyatt has created a new, more organized site for his Vim tutorials<br />
<a title="http://www.derekwyatt.org/vim/vim-tutorial-videos/" href="http://www.derekwyatt.org/vim/vim-tutorial-videos/" target="_blank">http://www.derekwyatt.org/vim/vim-tutorial-videos/</a></p>
<p><strong>Vimcasts</strong> &#8211; This is a good link to add to your rss reader.  Updates fairly often  with good vim tips.<br />
<a href="http://vimcasts.org/" target="_blank">http://vimcasts.org/</a></p>
<p><strong>Codeulate Screencasts&#8217; Vim for Rails Developers</strong> &#8211; I actually haven&#8217;t gotten to watch this yet but I will be getting it  soon.<br />
<a href="http://www.codeulatescreencasts.com/products/vim-for-rails-developers" target="_blank">http://www.codeulatescreencasts.com/products/vim-for-rails-developers</a></p>
<img src="http://feeds.feedburner.com/~r/kevincolyar/~4/XR5sKK-9F7A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kevin.colyar.net/2010/03/vim-screencasts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kevin.colyar.net/2010/03/vim-screencasts/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=vim-screencasts</feedburner:origLink></item>
		<item>
		<title>Using a Seperate Browser for Selenium with Cucumber</title>
		<link>http://feedproxy.google.com/~r/kevincolyar/~3/pKkwfb1RYfA/</link>
		<comments>http://kevin.colyar.net/2009/12/using-a-seperate-browser-for-selenium-with-cucumbe/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 05:01:04 +0000</pubDate>
		<dc:creator>Kevin Colyar</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Cucumber]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://kevin.colyar.net/?p=300</guid>
		<description><![CDATA[If you&#8217;re using Selenium with Cucumber on a Mac you probably know that Firefox 3.5.3 is that latest version that works with Selenium.  I was getting fed up with not being able to update to the latest version of Firefox so here&#8217;s what I did.  Simply install Firefox 3.5.3 (the latest Selenium compatible [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using Selenium with Cucumber on a Mac you probably know that Firefox 3.5.3 is that latest version that works with Selenium.  I was getting fed up with not being able to update to the latest version of Firefox so here&#8217;s what I did.  Simply install Firefox 3.5.3 (the latest Selenium compatible browser at the time of this writting) and name it /Applications/Firefox-3.5.3.app</p>
<p>This will be the Firefox installation Selenium will use and now you&#8217;re free to upgrade your /Applications/Firefox.app install.</p>
<p>Now add the following code to your <code>RAILS_ROOT/features/environments/selenium.rb file</code>.</p>
<div style="background: #999; color: #EEE; padding: 4px"><span style="color: #bdb66a;"><strong>Webrat</strong></span>.configure <span style="color: #f0e68b;"><strong>do</strong></span> |<span style="color: #98fa98;">config</span>|</p>
<p>config.mode = <span style="color: #ffa0a0;">:selenium</span></p>
<p><span style="color: #86cdeb;"> # Selenium defaults to using the selenium environment. Use the following to override this.</span></p>
<p>config.application_environment = <span style="color: #ffa0a0;">:test</span></p>
<p>config.selenium_browser_key = <span style="color: #ffdeac;">&#8220;</span><span style="color: #ffa0a0;">*firefox /Applications/Firefox-3.5.3.app/Contents/MacOS/firefox-bin</span><span style="color: #ffdeac;">&#8220;</span></p>
<p><span style="color: #f0e68b;"><strong>end</strong></span></div>
<p>Don&#8217;t forget to do this hack:<br />
<code><br />
$ cd /Applications/Firefox-3.5.3.app/Contents/MacOS<br />
$ mv libsqlite3.dylib _libsqlite3.dylib<br />
</code></p>
<p>For more help setting up Cucumber and Selenium, check my other post <a title="Permanent Link to Setting Up Cucumber to Use Webrat and Selenium with Rails" rel="bookmark" href="../2009/12/setting-up-webrat-and-selenium-on-rails/">Setting Up Cucumber to Use Webrat and Selenium with Rails.</a></p>
<img src="http://feeds.feedburner.com/~r/kevincolyar/~4/pKkwfb1RYfA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kevin.colyar.net/2009/12/using-a-seperate-browser-for-selenium-with-cucumbe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kevin.colyar.net/2009/12/using-a-seperate-browser-for-selenium-with-cucumbe/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=using-a-seperate-browser-for-selenium-with-cucumbe</feedburner:origLink></item>
		<item>
		<title>Fixing Airfoil Speakers for Ubuntu</title>
		<link>http://feedproxy.google.com/~r/kevincolyar/~3/diy3FwGY0Mg/</link>
		<comments>http://kevin.colyar.net/2009/12/fixing-airfoil-speakers-for-ubuntu/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 05:01:35 +0000</pubDate>
		<dc:creator>Kevin Colyar</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://kevin.colyar.net/?p=294</guid>
		<description><![CDATA[Airfoil is a great piece of software that I use for playing music on all the computers and iPhones in my house.  This weekend I tried to install Airfoil speakers on the Unbuntu machine in my workshop and ran into trouble.  Long story short, I needed to replace the installed DLLs with those of the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rogueamoeba.com/airfoil/mac/">Airfoil</a> is a great piece of software that I use for playing music on all the computers and iPhones in my house.  This weekend I tried to install Airfoil speakers on the Unbuntu machine in my workshop and ran into trouble.  Long story short, I needed to replace the installed DLLs with those of the Windows client.  This works because DLLS are .NET libraries and run on Mono on Ubuntu.</p>
<p>I&#8217;ve packaged the DLLs <a href="http://kevin.colyar.net/wp-content/uploads/2009/12/Airfoil-DLLs.zip">here</a> so you don&#8217;t have to find a Windows machine to install Airfoil speakers on.</p>
<img src="http://feeds.feedburner.com/~r/kevincolyar/~4/diy3FwGY0Mg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kevin.colyar.net/2009/12/fixing-airfoil-speakers-for-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kevin.colyar.net/2009/12/fixing-airfoil-speakers-for-ubuntu/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=fixing-airfoil-speakers-for-ubuntu</feedburner:origLink></item>
		<item>
		<title>Setting Up Cucumber to Use Webrat and Selenium with Rails</title>
		<link>http://feedproxy.google.com/~r/kevincolyar/~3/s3j0FkpGFt8/</link>
		<comments>http://kevin.colyar.net/2009/12/setting-up-webrat-and-selenium-on-rails/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 04:45:44 +0000</pubDate>
		<dc:creator>Kevin Colyar</dc:creator>
				<category><![CDATA[Cucumber]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[Webrat]]></category>

		<guid isPermaLink="false">http://kevin.colyar.net/?p=245</guid>
		<description><![CDATA[The following is the result of having to setup cucumber to use webrat and selenium twice from scratch and not finding a very good resource for doing so. I hope this can help someone else.  Corrections and feedback are welcome.]]></description>
			<content:encoded><![CDATA[<style type="text/css">
  code {
    background-color: #333; 
   display: block; 
   color: #FFF;
   font-family: monospace;
  padding: 6px;
}
</style>
<p>The following is the result of having to setup cucumber to use webrat and selenium twice from scratch and not finding a very good resource for doing so. I hope this can help someone else.  Corrections and feedback are welcome.</p>
<p><strong>Install selenium-client version 1.2.16</strong><br />
<code>$ gem install selenium-client --version=1.2.16</code></p>
<p>Generate cucumber environment<br />
<code>$ ./script/generate cucumber</code></p>
<p><strong>Cucumber Setup:</strong></p>
<p>Use can use my cucumber_setup rails generator.  It&#8217;s on github at <a href="http://github.com/kevincolyar/rails_generators">http://github.com/kevincolyar/rails_generators</a> and run:<br />
<code><br />
$ ./script/generate cucumber_setup<br />
</code><br />
and you&#8217;re done.</p>
<p><strong>Otherwise</strong>, here&#8217;s how you can setup your rails environment to use both webrat and selenium with rails from scratch.</p>
<p>Create a <b>cucumber.yml</b> file in the root of your rails project containing the following:<br />
<code><br />
<font color="#fbf204">1 </font><font color="#98fa98">default</font><font color="#ffdeac">:</font>&nbsp;<font color="#f0e68b"><b>-</b></font>r features/support <font color="#f0e68b"><b>-</b></font>r features/environments/plain.rb <font color="#f0e68b"><b>-</b></font>r features/step_definitions features/plain<br />
<font color="#fbf204">2 </font><font color="#98fa98">selenium</font><font color="#ffdeac">:</font>&nbsp;<font color="#f0e68b"><b>-</b></font>r features/support <font color="#f0e68b"><b>-</b></font>r features/environments/enhanced.rb <font color="#f0e68b"><b>-</b></font>r features/step_definitions features/enhanced<br />
<font color="#fbf204">3 </font><font color="#98fa98">autotest</font><font color="#ffdeac">:</font>&nbsp;<font color="#f0e68b"><b>-</b></font>r features/support <font color="#f0e68b"><b>-</b></font>r features/environments/plain.rb <font color="#f0e68b"><b>-</b></font>r features/step_definitions <font color="#f0e68b"><b>--</b></font>color <font color="#f0e68b"><b>--</b></font>format pretty <font color="#f0e68b"><b>--</b></font>tags ~@selenium<br />
<font color="#fbf204">4 </font>autotest<font color="#f0e68b"><b>-</b></font><font color="#98fa98">all</font><font color="#ffdeac">:</font>&nbsp;<font color="#f0e68b"><b>-</b></font>r features/support <font color="#f0e68b"><b>-</b></font>r features/environments/plain.rb <font color="#f0e68b"><b>-</b></font>r features/step_definitions <font color="#f0e68b"><b>--</b></font>color <font color="#f0e68b"><b>--</b></font>format progress <font color="#f0e68b"><b>--</b></font>tags ~@selenium<br />
<font color="#fbf204">5 </font><br />
</font><br />
</code></p>
<p>Create the following directories:<br />
<code><br />
$ mkdir features/environments features/plain features/enhanced<br />
</code></p>
<p>Create <b>features/environments/plain.rb</b> containing the following:<br />
<code><br />
<font color="#fbf204">1 </font><font color="#86cdeb">#Cucumber::Rails.use_transactional_fixtures</font><br />
<font color="#fbf204">2 </font><font color="#86cdeb">#Cucumber::Rails.bypass_rescue # Comment out this line if you want Rails own error handling </font><br />
<font color="#fbf204">3 </font><br />
<font color="#fbf204">4 </font><font color="#bdb66a"><b>Webrat</b></font>.configure <font color="#f0e68b"><b>do</b></font>&nbsp;|<font color="#98fa98">config</font>|<br />
<font color="#fbf204">5 </font>&nbsp;&nbsp;config.mode = <font color="#ffa0a0">:rails</font><br />
<font color="#fbf204">6 </font><font color="#f0e68b"><b>end</b></font><br />
<font color="#fbf204">7 </font><font color="#86cdeb"># (e.g. rescue_action_in_public / rescue_responses / rescue_from)</font><br />
</font><br />
</code></p>
<p>Create <b>features/environments/enhanced.rb</b> containing the following:<br />
<code><br />
<span style="color: #fbf204;"> 1 </span><br />
<span style="color: #fbf204;"> 2 </span><span style="color: #bdb66a;"><strong>Webrat</strong></span>.configure <span style="color: #f0e68b;"><strong>do</strong></span> |<span style="color: #98fa98;">config</span>|<br />
<span style="color: #fbf204;"> 3 </span> config.mode = <span style="color: #ffa0a0;">:selenium</span><br />
<span style="color: #fbf204;"> 4 </span> <span style="color: #86cdeb;"># Selenium defaults to using the selenium environment. Use the following to override this.</span><br />
<span style="color: #fbf204;"> 5 </span> <span style="color: #86cdeb;"># config.application_environment = :test</span><br />
<span style="color: #fbf204;"> 6 </span><span style="color: #f0e68b;"><strong>end</strong></span><br />
<span style="color: #fbf204;"> 7 </span><br />
<span style="color: #fbf204;"> 8 </span><span style="color: #86cdeb;"># this is necessary to have webrat "wait_for" the response body to be available</span><br />
<span style="color: #fbf204;"> 9 </span><span style="color: #86cdeb;"># when writing steps that match against the response body returned by selenium</span><br />
<span style="color: #fbf204;">10 </span>World(<span style="color: #bdb66a;"><strong>Webrat</strong></span>::<span style="color: #bdb66a;"><strong>Selenium</strong></span>::<span style="color: #bdb66a;"><strong>Matchers</strong></span>)<br />
<span style="color: #fbf204;">11 </span><br />
<span style="color: #fbf204;">12 </span><span style="color: #bdb66a;"><strong>Before</strong></span> <span style="color: #f0e68b;"><strong>do</strong></span><br />
<span style="color: #fbf204;">13 </span> <span style="color: #86cdeb;"># truncate your tables here, since you can't use transactional fixtures*</span><br />
<span style="color: #fbf204;">14 </span><span style="color: #f0e68b;"><strong>end</strong></span><br />
</code></p>
<p><strong>Firefox hack:</strong><br />
<code>$ cd /Applications/Firefox.app/Contents/MacOS<br />
$ sudo mv libsqlite3.dylib _libsqlite3.dylib</code><br />
<span style="font-size: .9em; font-weight: bold">If anyone knows a better fix for this please let me know. </span></p>
<p><strong>Running Cucumber:</strong></p>
<p>Now just place your webrat stories in <b>features/plain</b> and your selenium stories <b>features/enhanced</b></p>
<p>To run your webrat stories, simply run:<br />
<code>$ cucumber</code></p>
<p>To run your selenium stories, run:<br />
<code>$ cucumber -p selenium</code></p>
<img src="http://feeds.feedburner.com/~r/kevincolyar/~4/s3j0FkpGFt8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kevin.colyar.net/2009/12/setting-up-webrat-and-selenium-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kevin.colyar.net/2009/12/setting-up-webrat-and-selenium-on-rails/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=setting-up-webrat-and-selenium-on-rails</feedburner:origLink></item>
		<item>
		<title>My GTD Tools</title>
		<link>http://feedproxy.google.com/~r/kevincolyar/~3/s8pe43C9ku8/</link>
		<comments>http://kevin.colyar.net/2009/11/my-gtd-tools/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 05:12:47 +0000</pubDate>
		<dc:creator>Kevin Colyar</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[GTD]]></category>
		<category><![CDATA[Mouse-less Computing]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://kevin.colyar.net/?p=241</guid>
		<description><![CDATA[The following is a list of tools that I use on a daily basis to support my way of Getting Things Done:

Remember the Milk &#8211; My main inbox and list manager.
Concentrate &#8211; My Pomodoro timer for bursts of highly concentrated work.
Wallet notepad and mini pen &#8211; For writing down &#8220;stuff&#8221; that comes to mind.
MacVim &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>The following is a list of tools that I use on a daily basis to support my way of <a href="http://en.wikipedia.org/wiki/Getting_Things_Done">Getting Things Done</a>:</p>
<ul>
<li><a href="http://www.rememberthemilk.com/">Remember the Milk</a> &#8211; My main inbox and list manager.</li>
<li><a href="http://getconcentrating.com/">Concentrate</a> &#8211; My <a href="http://www.pomodorotechnique.com/">Pomodoro</a> timer for bursts of highly concentrated work.</li>
<li>Wallet notepad and mini pen &#8211; For writing down &#8220;stuff&#8221; that comes to mind.</li>
<li><a href="http://code.google.com/p/macvim/">MacVim</a> &#8211; Text Editor for editing files of projects, goals, and accomplishments.</li>
<li><a href="http://www.dropbox.com/">Dropbox</a> &#8211; For syncing project files and folders between multiple computers.</li>
<li>Two Tray Inbox &#8211; One tray for incoming and one for &#8216;to read&#8217;.</li>
<li>Pen and paper &#8211; For mind mapping and collecting.</li>
<li>Books, Blogs, and Audiobooks &#8211; For sharpening the axe.</li>
</ul>
<img src="http://feeds.feedburner.com/~r/kevincolyar/~4/s8pe43C9ku8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kevin.colyar.net/2009/11/my-gtd-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kevin.colyar.net/2009/11/my-gtd-tools/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=my-gtd-tools</feedburner:origLink></item>
		<item>
		<title>DejaMenu</title>
		<link>http://feedproxy.google.com/~r/kevincolyar/~3/X6ZMjR8j8c0/</link>
		<comments>http://kevin.colyar.net/2009/10/dejamenu/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 21:13:18 +0000</pubDate>
		<dc:creator>Kevin Colyar</dc:creator>
				<category><![CDATA[Mouse-less Computing]]></category>

		<guid isPermaLink="false">http://kevin.colyar.net/?p=239</guid>
		<description><![CDATA[Found a cool little app to help with mouse-less navigation in OSX.  It&#8217;s call DejaMenu and it can be found here:
http://homepage.mac.com/khsu/DejaMenu/DejaMenu.html
It&#8217;s very simple to use.  The default hot-key combination is command-shift-m to bring up DejaMenu which displays a dialog of the current apps menu bar actions.  I&#8217;ve been looking for a good [...]]]></description>
			<content:encoded><![CDATA[<p>Found a cool little app to help with mouse-less navigation in OSX.  It&#8217;s call DejaMenu and it can be found here:</p>
<p><a href="http://homepage.mac.com/khsu/DejaMenu/DejaMenu.html">http://homepage.mac.com/khsu/DejaMenu/DejaMenu.html</a></p>
<p>It&#8217;s very simple to use.  The default hot-key combination is command-shift-m to bring up DejaMenu which displays a dialog of the current apps menu bar actions.  I&#8217;ve been looking for a good mouse-less way to access the menu bar.  I just wish it had vi-like navigation instead of using the arrow keys.</p>
<img src="http://feeds.feedburner.com/~r/kevincolyar/~4/X6ZMjR8j8c0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kevin.colyar.net/2009/10/dejamenu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kevin.colyar.net/2009/10/dejamenu/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=dejamenu</feedburner:origLink></item>
	</channel>
</rss>
