<?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>The Lucid &#187; Rails</title>
	<atom:link href="http://thelucid.com/tag/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://thelucid.com</link>
	<description>The Lightweight Ramblings of Jamie Hill</description>
	<lastBuildDate>Thu, 26 Jan 2012 13:52:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Loving MongoDB but Missing Transactions</title>
		<link>http://thelucid.com/2012/01/26/loving-mongodb-but-missing-transactions/</link>
		<comments>http://thelucid.com/2012/01/26/loving-mongodb-but-missing-transactions/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 13:52:28 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[mongoid]]></category>
		<category><![CDATA[schema]]></category>
		<category><![CDATA[transactions]]></category>

		<guid isPermaLink="false">http://thelucid.com/?p=783</guid>
		<description><![CDATA[I&#8217;ve been venturing into the world of MongoDB via Mongoid in a Rails app. On one hand it&#8217;s a breath of fresh air (no migrations, flexible schemas etc.) but on the other hand I really, really miss transactions. If somebody asked me if I used transactions much in MySQL, I would probably have said no&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been venturing into the world of <a href="http://www.mongodb.org">MongoDB</a> via <a href="http://mongoid.org/">Mongoid</a> in a Rails app. On one hand it&#8217;s a breath of fresh air (no migrations, flexible schemas etc.) but on the other hand I really, really miss transactions.</p>
<p>If somebody asked me if I used transactions much in MySQL, I would probably have said no&#8230; however, now that I don&#8217;t have them I realise just how much I used them. Things that just work when using <a href="http://api.rubyonrails.org/classes/ActiveRecord/Base.html">ActiveRecord</a> such as creating a record and ensuring that an associated record gets created is sooo much harder.</p>
<p>MongoDB has &#8220;<a href="http://www.mongodb.org/display/DOCS/Atomic+Operations">Atomic Operations</a>&#8221; which means if you have an embedded relationship, all is good and the database will be rolled back if the entire document does not save. As soon as you have two top level collections and need to ensure that a record is created in both, things get a little hairy.</p>
<p>There seems to be a great deal of &#8220;if you need transactions just use a RDBMS&#8221; talk but what if you need a flexible schema and transactions, the last thing you want to manage is some kind of <a href="http://www.magentocommerce.com/wiki/2_-_magento_concepts_and_architecture/magento_database_diagram">EAV system like Magento</a>.</p>
<p>I&#8217;ve created <a href="http://groups.google.com/group/mongodb-user/browse_thread/thread/10da4c2571142671">a thread on the Mongo User forum</a> with a typical example so feel free to join in the discussion. I&#8217;d love to hear experienced Mongo user&#8217;s views on how to overcome these kinds of situations and what kind of applications people are running with MongoDB.</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2012/01/26/loving-mongodb-but-missing-transactions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Pow when developing Rails applications on OSX</title>
		<link>http://thelucid.com/2012/01/01/using-pow-when-developing-rails-applications-on-osx/</link>
		<comments>http://thelucid.com/2012/01/01/using-pow-when-developing-rails-applications-on-osx/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 15:17:03 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Mac / OS X]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[pow]]></category>
		<category><![CDATA[rack]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://thelucid.com/?p=768</guid>
		<description><![CDATA[I heard about Pow a while ago which is &#8220;a zero-config Rack server for Mac OS X&#8221; but never got around to giving it a go. I&#8217;ve just installed it and can instantly see that it is going to make developing with Rails (or any Rack app) a whole lot nicer, especially when dealing with [...]]]></description>
			<content:encoded><![CDATA[<p>I heard about <a href="http://pow.cx" rel="external">Pow</a> a while ago which is &#8220;a zero-config Rack server for Mac OS X&#8221; but never got around to giving it a go. I&#8217;ve just installed it and can instantly see that it is going to make developing with Rails (or any Rack app) a whole lot nicer, especially when dealing with apps that use subdomain account keys.</p>
<p>If you&#8217;ve not tried it yet, head over to <a href="http://pow.cx" rel="external">the Pow website</a> and get it installed with:</p>
<p><code lang="bash">curl get.pow.cx | sh</code></p>
<p>Happy new year everyone!</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2012/01/01/using-pow-when-developing-rails-applications-on-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cucumber&#8217;s &#8220;tableish&#8221; depreciated</title>
		<link>http://thelucid.com/2011/11/22/cucumbers-tableish-depreciated/</link>
		<comments>http://thelucid.com/2011/11/22/cucumbers-tableish-depreciated/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 16:14:41 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Cucumber]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[capybara]]></category>
		<category><![CDATA[tableish]]></category>

		<guid isPermaLink="false">http://thelucid.com/?p=761</guid>
		<description><![CDATA[I was just running some cucumber features on an old project and came across a problem whereby &#8220;tableish&#8221; has been depreciated in Cucumber. Dennis Reimann has posted a nice alternative here using Capybara&#8230; thanks Dennis.]]></description>
			<content:encoded><![CDATA[<p>I was just running some cucumber features on an old project and came across a problem whereby <a href="https://github.com/cucumber/cucumber-rails/issues/145">&#8220;tableish&#8221; has been depreciated in Cucumber</a>.</p>
<p>Dennis Reimann has posted a <a href="http://dennisreimann.de/blog/capybara-finder-for-cucumber-rails-deprecated-tableish/">nice alternative here using Capybara</a>&#8230; thanks Dennis.</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2011/11/22/cucumbers-tableish-depreciated/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rails 3 and the little known :enable_starttls_auto option</title>
		<link>http://thelucid.com/2011/01/17/rails-3-and-the-little-known-enable_starttls_auto-option/</link>
		<comments>http://thelucid.com/2011/01/17/rails-3-and-the-little-known-enable_starttls_auto-option/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 15:01:39 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[actionmailer]]></category>
		<category><![CDATA[rails 3]]></category>

		<guid isPermaLink="false">http://thelucid.com/?p=725</guid>
		<description><![CDATA[I just got the following error from ActionMailer when trying to send to a Gmail address: OpenSSL::SSL::SSLError (hostname was not match with the server certificate) After some Googling I found the &#8220;enable_starttls_auto&#8221; option in ActionMailer, setting this to &#8220;false&#8221; in the relevant environment file fixed the problem: config.action_mailer.smtp_settings = &#123; :address =&#62; '...', :user_name =&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>I just got the following error from ActionMailer when trying to send to a Gmail address:</p>
<pre>
OpenSSL::SSL::SSLError (hostname was not match with the server certificate)
</pre>
<p>After some Googling I found the &#8220;enable_starttls_auto&#8221; option in ActionMailer, setting this to &#8220;false&#8221; in the relevant environment file fixed the problem:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">  config.<span style="color:#9900CC;">action_mailer</span>.<span style="color:#9900CC;">smtp_settings</span> = <span style="color:#006600; font-weight:bold;">&#123;</span>
    <span style="color:#ff3333; font-weight:bold;">:address</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'...'</span>,
    <span style="color:#ff3333; font-weight:bold;">:user_name</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'...'</span>,
    <span style="color:#ff3333; font-weight:bold;">:domain</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'...'</span>,
    <span style="color:#ff3333; font-weight:bold;">:password</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'...'</span>,
    <span style="color:#ff3333; font-weight:bold;">:authentication</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:login</span>,
    <span style="color:#ff3333; font-weight:bold;">:enable_starttls_auto</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">false</span>
  <span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>

<p>This option apparently &#8220;Enables SMTP/TLS (STARTTLS) for this object if server accepts&#8221;. Not being up on my &#8220;SMTP/TLS&#8221;&#8216;s, I have no idea what this means but it solves the problem.</p>
<p>Hope this saves someone some time.</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2011/01/17/rails-3-and-the-little-known-enable_starttls_auto-option/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Artifice to Stub Server Responses</title>
		<link>http://thelucid.com/2011/01/04/using-artifice-to-stub-server-responses/</link>
		<comments>http://thelucid.com/2011/01/04/using-artifice-to-stub-server-responses/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 19:29:59 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Cucumber]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[artifice]]></category>
		<category><![CDATA[mocking]]></category>
		<category><![CDATA[stubbing]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://thelucid.com/?p=700</guid>
		<description><![CDATA[In a recent project I needed a way to fake a response from a server in my Cucumber features. Specifically, I was testing integration with a payment gateway and wanted to stub it&#8217;s responses based on different requests. In the past I have used FakeWeb, however it becomes a little hairy when you need to [...]]]></description>
			<content:encoded><![CDATA[<p>In a recent project I needed a way to fake a response from a server in my Cucumber features. Specifically, I was testing integration with a payment gateway and wanted to stub it&#8217;s responses based on different requests.</p>
<p>In the past I have used <a href="http://fakeweb.rubyforge.org/">FakeWeb</a>, however it becomes a little hairy when you need to stub a response based on request body. I came across a couple of alternatives, firstly <a href="https://github.com/bblimke/webmock">WebMock</a> which looks promising but then <a href="https://github.com/wycats/artifice">Artifice</a> from the mighty <a href="http://yehudakatz.com/">Yehuda Katz</a> caught my eye&#8230;</p>
<p>Artifice lets you &#8220;replace the Net::HTTP subsystem of Ruby with an equivalent that routes all requests to a Rack application&#8221;. I like the simplicity of this solution as you can in essence use a <a href="https://github.com/rack/rack">Rack</a> application to replace the responses of the service you are testing.</p>
<h3>An Example</h3>
<p>First we create a simple Rack application to stand in for the server we are interacting with.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">app = <span style="color:#CC0066; font-weight:bold;">proc</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>env<span style="color:#006600; font-weight:bold;">|</span>
  <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">200</span>, <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;Content-Type&quot;</span>  <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;text/html&quot;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>,
    <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;Hello world: #{env.inspect}&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
  <span style="color:#006600; font-weight:bold;">&#93;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Then we simply use Artifice&#8217;s &#8220;activate_with&#8221; method to wrap any requests.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">Artifice.<span style="color:#9900CC;">activate_with</span><span style="color:#006600; font-weight:bold;">&#40;</span>app<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  response = <span style="color:#6666ff; font-weight:bold;">Net::HTTP</span>.<span style="color:#9900CC;">start</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;google.com&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>http<span style="color:#006600; font-weight:bold;">|</span>
    http.<span style="color:#9900CC;">post</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;/the_url&quot;</span>, <span style="color:#996600;">&quot;foo=bar&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> response.<span style="color:#9900CC;">body</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>This allows for a Rack app to be used as a stand in for a complete API, it could be a Sinatra app for example allowing for easy route handling. We could go so far as to have a series of Rack apps that can be used as stand-ins for common API&#8217;s.</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2011/01/04/using-artifice-to-stub-server-responses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I stopped using Pickle with Cucumber</title>
		<link>http://thelucid.com/2010/02/07/why-i-stopped-using-pickle-with-cucumber/</link>
		<comments>http://thelucid.com/2010/02/07/why-i-stopped-using-pickle-with-cucumber/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 02:12:48 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Cucumber]]></category>
		<category><![CDATA[pickle]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://thelucid.com/?p=558</guid>
		<description><![CDATA[&#8230;no, not because it leaves a bitter aftertaste, I&#8217;m talking about the Pickle step definitions for Cucumber. I have lately been using Pickle when writing Cucumber features, however I have come to the conclusion that this is a bad idea. The reason being that when using Pickle, you create entries directly, whereas the whole point [...]]]></description>
			<content:encoded><![CDATA[<p>&#8230;no, not because it leaves a bitter aftertaste, I&#8217;m talking about the <a href="http://github.com/ianwhite/pickle">Pickle</a> step definitions for <a href="http://github.com/aslakhellesoy/cucumber/">Cucumber</a>.</p>
<p>I have lately been using <a href="http://github.com/ianwhite/pickle">Pickle</a> when writing <a href="http://github.com/aslakhellesoy/cucumber/">Cucumber</a> features, however I have come to the conclusion that this is a bad idea. The reason being that when using Pickle, you create entries directly, whereas the whole point of Cucumber is that it is for high level integration testing.</p>
<p>What I do now, is to create any entries by filling out and submitting the relevant forms with a step definition, for example I may have the following:</p>
<pre>
Given an admin has created the following products
  | Name    | Variants                                  | Featured |
  | T-Shirt | Small: 10.99, Medium: 12.99, Large: 14.99 | Yes      |
  | Keyring | Default: 2.99                             | Yes      |
</pre>
<p>I would then write a step definition for this that would log in as the admin user, break this table appart and fill in the relevant forms.</p>
<p>I would go so far as to say that using factories at all in features is a bad idea and instead everything should happen via the user interface for better coverage. For any data that is known to exist when the app is deployed via &#8216;rake db:seed&#8217;, this can be loaded in the &#8216;env.rb&#8217; file e.g.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">load</span> <span style="color:#996600;">'seeds.rb'</span></pre></div></div>

<p><strong>Update 11/2/2010:</strong> Sometimes this is simply not practical due to slowdown which is a shame, as noted by Amos in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2010/02/07/why-i-stopped-using-pickle-with-cucumber/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Devise Rails Authentication Gem Rocks!</title>
		<link>http://thelucid.com/2010/02/06/devise-rails-authentication-gem-rocks/</link>
		<comments>http://thelucid.com/2010/02/06/devise-rails-authentication-gem-rocks/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 21:36:28 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[authentication]]></category>

		<guid isPermaLink="false">http://thelucid.com/?p=555</guid>
		<description><![CDATA[I&#8217;ve had a set of rather bespoke requirements for authentication on a recent project and thought I&#8217;d give Devise a go. Devise uses Warden, which is an authentication solution build on Rack making it extremely flexible and usable across multiple frameworks e.g. Rails/Sinatra. Also, Devise is extremely modular meaning to can easily write custom &#8220;strategies&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had a set of rather bespoke requirements for authentication on a recent project and thought I&#8217;d give <a href="http://github.com/plataformatec/devise">Devise</a> a go.</p>
<p>Devise uses <a href="http://github.com/hassox/warden/">Warden</a>, which is an authentication solution build on <a href="http://github.com/rack/rack">Rack</a> making it extremely flexible and usable across multiple frameworks e.g. Rails/Sinatra. Also, Devise is extremely modular meaning to can easily write custom &#8220;strategies&#8221; for specific behaviour.</p>
<p>I have used <a href="http://github.com/thoughtbot/clearance/">Clearance</a> in the past which is great if you want an engine that will just work. Devise however is by far the most flexible and extensible solution that I have come across with the same ease of use as Clearance. The only thing that you don&#8217;t get with devise that you do with Clearance is the signup stage, however as this is normally custom on a per-app basis I can live with this.</p>
<p>One more thing to note is that Devise lets you have multiple auth systems in play e.g. one for users and one for admins.</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2010/02/06/devise-rails-authentication-gem-rocks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rails: Using Autotest with UnitRecord</title>
		<link>http://thelucid.com/2007/09/05/rails-using-autotest-with-unitrecord/</link>
		<comments>http://thelucid.com/2007/09/05/rails-using-autotest-with-unitrecord/#comments</comments>
		<pubDate>Thu, 06 Sep 2007 00:17:00 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[autotest]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[unit_record]]></category>

		<guid isPermaLink="false">http://d3754554-5787-434b-8741-474c805c4a4e</guid>
		<description><![CDATA[Myself and a colleague have just managed to waste away a good couple of hours trying to figure out Autotests strange &#8216;style&#8217; mechanism to add the ability to &#8220;test in the way Jay Fields explains&#8221;:http://blog.jayfields.com/2007/09/rails-how-we-test.html using &#8220;UnitRecord&#8221;:http://unit-test-ar.rubyforge.org/. You can grab our plugin to enable &#8220;UnitRecord&#8221;:http://unit-test-ar.rubyforge.org/ when using &#8220;Autotest&#8221;:http://rubyforge.org/projects/zentest below: &#8220;http://svn.soniciq.com/public/rails/plugins/iq_autotest&#8221;:http://svn.soniciq.com/public/rails/plugins/iq_autotest By default, running autotest in [...]]]></description>
			<content:encoded><![CDATA[<p>Myself and a colleague have just managed to waste away a good couple of hours trying to figure out Autotests strange &#8216;style&#8217; mechanism to add the ability to &#8220;test in the way Jay Fields explains&#8221;:http://blog.jayfields.com/2007/09/rails-how-we-test.html using &#8220;UnitRecord&#8221;:http://unit-test-ar.rubyforge.org/.</p>
<p>You can grab our plugin to enable &#8220;UnitRecord&#8221;:http://unit-test-ar.rubyforge.org/ when using &#8220;Autotest&#8221;:http://rubyforge.org/projects/zentest below:</p>
<p>&#8220;http://svn.soniciq.com/public/rails/plugins/iq_autotest&#8221;:http://svn.soniciq.com/public/rails/plugins/iq_autotest</p>
<p>By default, running <code>autotest</code> in the Rails directory will run the unit tests. To run the functional tests, do: <code>AUTOTEST='functional' autotest</code></p>
<p>I hope this saves some people some time!!</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2007/09/05/rails-using-autotest-with-unitrecord/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SonicIQ Hiring! &#8211; UK, Ruby on Rails Developer Required</title>
		<link>http://thelucid.com/2007/08/28/soniciq-hiring-uk-ruby-on-rails-developer-required/</link>
		<comments>http://thelucid.com/2007/08/28/soniciq-hiring-uk-ruby-on-rails-developer-required/#comments</comments>
		<pubDate>Tue, 28 Aug 2007 04:49:00 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[SonicIQ]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://c7aaa47a-1bb0-428e-99ac-5852f8dc1bdf</guid>
		<description><![CDATA[We are looking for a Ruby on Rails, XHTML &#038; CSS Developer to join our team at &#8220;SonicIQ&#8221;:http://soniciq.com. Head over to &#8220;43folders job board to view our ad&#8221;:http://jobs.43folders.com/job/6a5255713e8351a5eb2efef7805b7629/?d=1. These are exiting times with projects like &#8220;Propel&#8217;r&#8221;:http://propelr.com in the pipeline, along with the ever-growing opportunities for new and interesting client projects. If you are a highly [...]]]></description>
			<content:encoded><![CDATA[<p>We are looking for a Ruby on Rails, XHTML &#038; CSS Developer to join our team at &#8220;SonicIQ&#8221;:http://soniciq.com. Head over to &#8220;43folders job board to view our ad&#8221;:http://jobs.43folders.com/job/6a5255713e8351a5eb2efef7805b7629/?d=1.</p>
<p>These are exiting times with projects like &#8220;Propel&#8217;r&#8221;:http://propelr.com in the pipeline, along with the ever-growing opportunities for new and interesting client projects.</p>
<p>If you are a highly motivated developer and can see yourself in a Ruby on Rails position in sunny (sometimes) Bournemouth, UK then &#8220;apply at 43folders&#8221;:http://jobs.43folders.com/job/6a5255713e8351a5eb2efef7805b7629/?d=1.</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2007/08/28/soniciq-hiring-uk-ruby-on-rails-developer-required/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Rcov to measure the test coverage of Rails plugins</title>
		<link>http://thelucid.com/2007/08/24/using-rcov-to-measure-the-test-coverage-of-rails-plugins/</link>
		<comments>http://thelucid.com/2007/08/24/using-rcov-to-measure-the-test-coverage-of-rails-plugins/#comments</comments>
		<pubDate>Fri, 24 Aug 2007 23:43:00 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Rake]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[coverage]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[rcov]]></category>
		<category><![CDATA[tests]]></category>

		<guid isPermaLink="false">http://c533fc04-524b-4de6-bd09-fe3ed45a3a0f</guid>
		<description><![CDATA[To view the coverage of your plugins using Rcov, first install the rcov gem with sudo gem install rcov, then copy and paste the following onto the end of the Rakefile inside your plugin directory: require 'rcov/rcovtask' &#160; desc 'Measures test coverage using rcov' namespace :rcov do desc 'Output unit test coverage of plugin.' Rcov::RcovTask.new&#40;:unit&#41; [...]]]></description>
			<content:encoded><![CDATA[<p>To view the coverage of your plugins using Rcov, first install the <code>rcov</code> gem with <code>sudo gem install rcov</code>, then copy and paste the following onto the end of the <code>Rakefile</code> inside your plugin directory:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rcov/rcovtask'</span>
&nbsp;
desc <span style="color:#996600;">'Measures test coverage using rcov'</span>
namespace <span style="color:#ff3333; font-weight:bold;">:rcov</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  desc <span style="color:#996600;">'Output unit test coverage of plugin.'</span>
  <span style="color:#6666ff; font-weight:bold;">Rcov::RcovTask</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:unit</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>rcov<span style="color:#006600; font-weight:bold;">|</span>
    rcov.<span style="color:#9900CC;">pattern</span>    = <span style="color:#996600;">'test/unit/**/*_test.rb'</span>
    rcov.<span style="color:#9900CC;">output_dir</span> = <span style="color:#996600;">'rcov'</span>
    rcov.<span style="color:#9900CC;">verbose</span>    = <span style="color:#0000FF; font-weight:bold;">true</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  desc <span style="color:#996600;">'Output functional test coverage of plugin.'</span>
  <span style="color:#6666ff; font-weight:bold;">Rcov::RcovTask</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:functional</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>rcov<span style="color:#006600; font-weight:bold;">|</span>
    rcov.<span style="color:#9900CC;">pattern</span>    = <span style="color:#996600;">'test/functional/**/*_test.rb'</span>
    rcov.<span style="color:#9900CC;">output_dir</span> = <span style="color:#996600;">'rcov'</span>
    rcov.<span style="color:#9900CC;">verbose</span>    = <span style="color:#0000FF; font-weight:bold;">true</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>You can now simply run <code>rake rcov</code> from inside your plugin directory which will generate an <code>rcov</code> directory with the results. Open <code>rcov/index.html</code> (if you are on OSX this will open automatically) in a browser to view the results.</p>
<p>Thanks to &#8220;Mike Clark&#8221;:http://clarkware.com/cgi/blosxom for his &#8220;Rcov rake task for Rails&#8221;:http://clarkware.com/cgi/blosxom/2007/01/05#RcovRakeTask which this task is based on.</p>
<p>*Update (11-11-08):* Changed code to use the RcovTask class.</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2007/08/24/using-rcov-to-measure-the-test-coverage-of-rails-plugins/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

