<?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>Pivotal Labs &#187; Colin Shield</title>
	<atom:link href="http://pivotallabs.com/author/colin/feed/" rel="self" type="application/rss+xml" />
	<link>http://pivotallabs.com</link>
	<description>Agility Developed</description>
	<lastBuildDate>Wed, 22 May 2013 22:49:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Database.yml files using Chef Server</title>
		<link>http://pivotallabs.com/database-yml-files-using-chef-server/</link>
		<comments>http://pivotallabs.com/database-yml-files-using-chef-server/#comments</comments>
		<pubDate>Sun, 24 Feb 2013 22:19:34 +0000</pubDate>
		<dc:creator>Colin Shield</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[chef server]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/?p=15571</guid>
		<description><![CDATA[<p>I&#8217;ve been spending an awful lot of time lately deploying rails applications using chef server. I&#8217;ll be blogging some of the more interesting ways we&#8217;re using chef server. One of the most useful features of chef server is search. This allows you to write recipes that reference nodes in your stack that match particular roles. In this post I&#8217;ll describe how we use search to generate a rails database.yml. This becomes particularly useful when creating and deploying the same rails application to multiple stacks. First of all we added a simple file read in our database.yml file in place of the connection details. &#60;% if File.exist?('/opt/apps/fbfcats/shared/database_include.yml') %&#62; &#60;%= File.read('/opt/apps/fbfcats/shared/database_include.yml') %&#62; &#60;% end %&#62; In our chef project we have a recipe that searches for the database server node and writes out the database_include.yml file using a template resource. master = search(:node, "role:db_master AND chef_environment:#{node.chef_environment}").first template "/opt/apps/ms/#{app_name}/shared/database_include.yml" do owner "gemini" group "gemini"&#8230;</p><p>The post <a href="http://pivotallabs.com/database-yml-files-using-chef-server/">Database.yml files using Chef Server</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been spending an awful lot of time lately deploying rails applications using chef server. I&#8217;ll be blogging some of the more interesting ways we&#8217;re using chef server. One of the most useful features of chef server is search. This allows you to write recipes that reference nodes in your stack that match particular roles. In this post I&#8217;ll describe how we use search to generate a rails database.yml. This becomes particularly useful when creating and deploying the same rails application to multiple stacks.</p>
<p>First of all we added a simple file read in our database.yml file in place of the connection details.</p>
<pre><code>
&lt;% if File.exist?('/opt/apps/fbfcats/shared/database_include.yml') %&gt;
&lt;%= File.read('/opt/apps/fbfcats/shared/database_include.yml') %&gt;
&lt;% end %&gt;
</code></pre>
<p>In our chef project we have a recipe that searches for the database server node and writes out the database_include.yml file using a template resource.</p>
<pre><code>
master = search(:node, "role:db_master AND chef_environment:#{node.chef_environment}").first
template "/opt/apps/ms/#{app_name}/shared/database_include.yml" do
  owner "gemini"
  group "gemini"
  source "database_include.yml.erb"
  mode "0600"
  variables(:hostname =&gt; master,
  :database_name =&gt; "fbfcats" + "_" + node[:rails_env],
  :user =&gt; 'fbfcats',
  :password =&gt; 'mittens',
  :rails_env =&gt; node[:rails_env])
end
</code></pre>
<p>Finally the template.</p>
<pre><code>
&lt;%= @rails_env %&gt;:
  host: &lt;%= @hostname %&gt;
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: &lt;%= @database_name %&gt;
  pool: 5
  username: &lt;%= @user %&gt;
  password: &lt;%= @password %&gt;

&nbsp;

</code></pre>
<p>The post <a href="http://pivotallabs.com/database-yml-files-using-chef-server/">Database.yml files using Chef Server</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/database-yml-files-using-chef-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Standup Oct/19/2010: Cedar, a BDD Testing Framework for Objective C</title>
		<link>http://pivotallabs.com/standup-oct-19-2010-cedar-a-bdd-testing-framework-for-objective-c/</link>
		<comments>http://pivotallabs.com/standup-oct-19-2010-cedar-a-bdd-testing-framework-for-objective-c/#comments</comments>
		<pubDate>Thu, 21 Oct 2010 04:45:00 +0000</pubDate>
		<dc:creator>Colin Shield</dc:creator>
				<category><![CDATA[Labs]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/standup-oct-19-2010-cedar-a-bdd-testing-framework-for-objective-c/</guid>
		<description><![CDATA[<p><h2>Interesting Things</h2>

<p><a href="http://www.meetup.com/SF-App-Creators-Anonymous/calendar/14993705/?a=cv1c_grp&#38;rv=cv1c">Cedar, a BDD Testing Framework for Rails", Saturday, October 23, 2010 11:00 AM!</a> </p> <a href="http://pivotallabs.com/standup-oct-19-2010-cedar-a-bdd-testing-framework-for-objective-c/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/standup-oct-19-2010-cedar-a-bdd-testing-framework-for-objective-c/">Standup Oct/19/2010: Cedar, a BDD Testing Framework for Objective C</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Interesting Things</h2>
<p><a href="http://www.meetup.com/SF-App-Creators-Anonymous/calendar/14993705/?a=cv1c_grp&amp;rv=cv1c">Cedar, a BDD Testing Framework for Rails&#8221;, Saturday, October 23, 2010 11:00 AM!</a> </p>
<p>The post <a href="http://pivotallabs.com/standup-oct-19-2010-cedar-a-bdd-testing-framework-for-objective-c/">Standup Oct/19/2010: Cedar, a BDD Testing Framework for Objective C</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-oct-19-2010-cedar-a-bdd-testing-framework-for-objective-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Donkey &amp; Goat Open House</title>
		<link>http://pivotallabs.com/donkey-goat-open-house/</link>
		<comments>http://pivotallabs.com/donkey-goat-open-house/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 00:46:00 +0000</pubDate>
		<dc:creator>Colin Shield</dc:creator>
				<category><![CDATA[Labs]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/donkey-goat-open-house/</guid>
		<description><![CDATA[<p><p><a href="http://www.adonkeyandgoat.com/Index.html">Donkey &#38; Goat Winery</a> in Berkeley is having an <a href="http://www.adonkeyandgoat.com/openhouse.html">open house Saturday March 20 2010</a>. I'm personally a big fan of their wine. I'm enjoying a glass of their 2006 Syrah, The Recluse right now. Jared, one of the owners, has been kind enough to let us at Pivotal sample his wines on a few occasions. I'd heartily recommend going along to sample their wine, eat some food and learn about their wine making.</p>

<p>DONKEY &#38; GOAT SPRING OPEN HOUSE PARTY SAT 3/20 1-5PM, AT THE WINERY IN BERKELEY
7 NEW WINES, EATS FROM BERKELEY'S SOON TO OPEN LOCANDA DA EVA AND THE MICHAEL LAMACCHIO TRIO, OUR FAVORITE BRAZILIAN JAZZ TRIO IS BACK!
<a href="http://www.adonkeyandgoat.com/openhouse.html">SAVE $10 WITH ADVANCE TICKETS</a></p> <a href="http://pivotallabs.com/donkey-goat-open-house/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/donkey-goat-open-house/">Donkey &amp; Goat Open House</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.adonkeyandgoat.com/Index.html">Donkey &amp; Goat Winery</a> in Berkeley is having an <a href="http://www.adonkeyandgoat.com/openhouse.html">open house Saturday March 20 2010</a>. I&#8217;m personally a big fan of their wine. I&#8217;m enjoying a glass of their 2006 Syrah, The Recluse right now. Jared, one of the owners, has been kind enough to let us at Pivotal sample his wines on a few occasions. I&#8217;d heartily recommend going along to sample their wine, eat some food and learn about their wine making.</p>
<p>DONKEY &amp; GOAT SPRING OPEN HOUSE PARTY SAT 3/20 1-5PM, AT THE WINERY IN BERKELEY<br />
7 NEW WINES, EATS FROM BERKELEY&#8217;S SOON TO OPEN LOCANDA DA EVA AND THE MICHAEL LAMACCHIO TRIO, OUR FAVORITE BRAZILIAN JAZZ TRIO IS BACK!<br />
<a href="http://www.adonkeyandgoat.com/openhouse.html">SAVE $10 WITH ADVANCE TICKETS</a></p>
<p>The post <a href="http://pivotallabs.com/donkey-goat-open-house/">Donkey &amp; Goat Open House</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/donkey-goat-open-house/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Standup 1/14 actionmailer content type issue</title>
		<link>http://pivotallabs.com/standup-1-14-actionmailer-content-type-issue/</link>
		<comments>http://pivotallabs.com/standup-1-14-actionmailer-content-type-issue/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 18:21:00 +0000</pubDate>
		<dc:creator>Colin Shield</dc:creator>
				<category><![CDATA[Labs]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/standup-1-14-actionmailer-content-type-issue/</guid>
		<description><![CDATA[<p><p>We were bitten by a Rails 2.3 bug related to ActionMailer today.  It took us a good part of the day to hunt down due to the fact that it only happened in production and even then only occasionally.
Basically ActionMailer occasionally sends your multipart emails as text/plain with html content.</p>

<p><a href="https://rails.lighthouseapp.com/projects/8994/tickets/2338-actionmailer-mailer-views-and-content-type">Here's the ticket we found:</a></p> <a href="http://pivotallabs.com/standup-1-14-actionmailer-content-type-issue/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/standup-1-14-actionmailer-content-type-issue/">Standup 1/14 actionmailer content type issue</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>We were bitten by a Rails 2.3 bug related to ActionMailer today.  It took us a good part of the day to hunt down due to the fact that it only happened in production and even then only occasionally.<br />
Basically ActionMailer occasionally sends your multipart emails as text/plain with html content.</p>
<p><a href="https://rails.lighthouseapp.com/projects/8994/tickets/2338-actionmailer-mailer-views-and-content-type">Here&#8217;s the ticket we found:</a></p>
<p>The post <a href="http://pivotallabs.com/standup-1-14-actionmailer-content-type-issue/">Standup 1/14 actionmailer content type issue</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-1-14-actionmailer-content-type-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Standup 1/13 Successful completion with SQS Internal Error</title>
		<link>http://pivotallabs.com/standup-1-13-successful-completion-with-sqs-internal-error/</link>
		<comments>http://pivotallabs.com/standup-1-13-successful-completion-with-sqs-internal-error/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 06:28:00 +0000</pubDate>
		<dc:creator>Colin Shield</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[agile standup]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/standup-1-13-successful-completion-with-sqs-internal-error/</guid>
		<description><![CDATA[<p><p>The RightScale SQS gem returned an exception from SQS multiple times, including retries. Not an unusual event. This could have been caused by the SQS service being unavailable. However, the team noticed that despite the failure the message was actually successfully added to the queue and processed as normal.</p>

<p>ActiveSupport logger appears to open the default ruby logger and remove everything except the basic log message passed through. This is done for all subsequent uses of the logger. Perhaps this is done so that the log message could be passed to a syslog service which will add timestamps.</p> <a href="http://pivotallabs.com/standup-1-13-successful-completion-with-sqs-internal-error/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/standup-1-13-successful-completion-with-sqs-internal-error/">Standup 1/13 Successful completion with SQS Internal Error</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>The RightScale SQS gem returned an exception from SQS multiple times, including retries. Not an unusual event. This could have been caused by the SQS service being unavailable. However, the team noticed that despite the failure the message was actually successfully added to the queue and processed as normal.</p>
<p>ActiveSupport logger appears to open the default ruby logger and remove everything except the basic log message passed through. This is done for all subsequent uses of the logger. Perhaps this is done so that the log message could be passed to a syslog service which will add timestamps.</p>
<p>The post <a href="http://pivotallabs.com/standup-1-13-successful-completion-with-sqs-internal-error/">Standup 1/13 Successful completion with SQS Internal Error</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-1-13-successful-completion-with-sqs-internal-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Standup Jan 12 2010 DateJS timestring parsing</title>
		<link>http://pivotallabs.com/standup-1-13-datejs-timestring-parsing/</link>
		<comments>http://pivotallabs.com/standup-1-13-datejs-timestring-parsing/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 17:26:00 +0000</pubDate>
		<dc:creator>Colin Shield</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[agile standup]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/standup-1-13-datejs-timestring-parsing/</guid>
		<description><![CDATA[<p><p>Whilst trying to parse differently formatted date strings from rss feeds a pivot found that date.now is overridden by DateJS to return a new date.
There was a suggestion, that later proved useful, to use google's rss reader to first clean up the different rss feeds to ensure that they all can be parsed in much the same way.</p> <a href="http://pivotallabs.com/standup-1-13-datejs-timestring-parsing/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/standup-1-13-datejs-timestring-parsing/">Standup Jan 12 2010 DateJS timestring parsing</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Whilst trying to parse differently formatted date strings from rss feeds a pivot found that date.now is overridden by DateJS to return a new date.<br />
There was a suggestion, that later proved useful, to use google&#8217;s rss reader to first clean up the different rss feeds to ensure that they all can be parsed in much the same way.</p>
<p>The post <a href="http://pivotallabs.com/standup-1-13-datejs-timestring-parsing/">Standup Jan 12 2010 DateJS timestring parsing</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-1-13-datejs-timestring-parsing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Marshal.dump vs YAML::dump</title>
		<link>http://pivotallabs.com/marshal-dump-vs-yaml-dump/</link>
		<comments>http://pivotallabs.com/marshal-dump-vs-yaml-dump/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 22:24:00 +0000</pubDate>
		<dc:creator>Colin Shield</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/marshal-dump-vs-yaml-dump/</guid>
		<description><![CDATA[<p><p>We find ourselves with a project with a very large dataset, more than 2 million items. This dataset changes frequently. The changes need to be transported to their respective servers ready to be served out to clients.
We decided to use a queuing architecture to distribute data. Objects are serialized and pushed to a queue.  The large size of the dataset requires us to optimize as much as possible. There are only so many hours in a day and there is a lot of data to transport.
A question was raised in standup as to what was the fastest serialization method: YAML::dump or Marshal.dump. It seemed appropriate to write a quick script and work out which would be appropriate for our particular situation.
The objects we are serializing are simple hashes. I thought I'd write something that was representative of our situation in order to present a nice clear decision.
Here's some code:</p>

<pre>
require 'yaml'
obj = {:a =&#62; &#34;hello&#34;, :b =&#62; &#34;goodbye&#34;, :c =&#62; &#34;new string&#34;, :d =&#62; {:da =&#62; 1, :db =&#62; 2}, :e =&#62; 1}
start = Time.now
&#40;0..10000&#41;.each do
  ser_obj = YAML::dump&#40;obj&#41;
  new_obj = YAML::load&#40;ser_obj&#41;
end
puts &#34;YAML::dump time&#34;
puts Time.now - start
start = Time.now
&#40;0..10000&#41;.each do
  ser_obj = Marshal.dump&#40;obj&#41;
  new_obj = Marshal.load&#40;ser_obj&#41;
end
puts &#34;Marshal.dump time&#34;
p Time.now - start</pre>
I think we all knew how the results would look. It was nice to see that for our particular case there was a clear winner.
<pre>
YAML::dump time
5.397909
Marshal.dump time
0.280292
</pre>

<p>Seems fairly cut and dried to me.
I personally prefer YAML for test result comparison. Maybe we'll put something in our spec_helper to use YAML for testing and Marshal for production.</p> <a href="http://pivotallabs.com/marshal-dump-vs-yaml-dump/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/marshal-dump-vs-yaml-dump/">Marshal.dump vs YAML::dump</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>We find ourselves with a project with a very large dataset, more than 2 million items. This dataset changes frequently. The changes need to be transported to their respective servers ready to be served out to clients.<br />
We decided to use a queuing architecture to distribute data. Objects are serialized and pushed to a queue.  The large size of the dataset requires us to optimize as much as possible. There are only so many hours in a day and there is a lot of data to transport.<br />
A question was raised in standup as to what was the fastest serialization method: YAML::dump or Marshal.dump. It seemed appropriate to write a quick script and work out which would be appropriate for our particular situation.<br />
The objects we are serializing are simple hashes. I thought I&#8217;d write something that was representative of our situation in order to present a nice clear decision.<br />
Here&#8217;s some code:</p>
<pre>
require 'yaml'
obj = {:a =&gt; &quot;hello&quot;, :b =&gt; &quot;goodbye&quot;, :c =&gt; &quot;new string&quot;, :d =&gt; {:da =&gt; 1, :db =&gt; 2}, :e =&gt; 1}
start = Time.now
&#40;0..10000&#41;.each do
  ser_obj = YAML::dump&#40;obj&#41;
  new_obj = YAML::load&#40;ser_obj&#41;
end
puts &quot;YAML::dump time&quot;
puts Time.now - start
start = Time.now
&#40;0..10000&#41;.each do
  ser_obj = Marshal.dump&#40;obj&#41;
  new_obj = Marshal.load&#40;ser_obj&#41;
end
puts &quot;Marshal.dump time&quot;
p Time.now - start</pre>
<p>I think we all knew how the results would look. It was nice to see that for our particular case there was a clear winner.</p>
<pre>
YAML::dump time
5.397909
Marshal.dump time
0.280292
</pre>
<p>Seems fairly cut and dried to me.<br />
I personally prefer YAML for test result comparison. Maybe we&#8217;ll put something in our spec_helper to use YAML for testing and Marshal for production.</p>
<p>The post <a href="http://pivotallabs.com/marshal-dump-vs-yaml-dump/">Marshal.dump vs YAML::dump</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/marshal-dump-vs-yaml-dump/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Standup 6/9/2009 Spring Cleaning.  rspec should == useless</title>
		<link>http://pivotallabs.com/standup-6-9-2009-spring-cleaning-rspec-should-useless/</link>
		<comments>http://pivotallabs.com/standup-6-9-2009-spring-cleaning-rspec-should-useless/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 23:20:00 +0000</pubDate>
		<dc:creator>Colin Shield</dc:creator>
				<category><![CDATA[Labs]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/standup-6-9-2009-spring-cleaning-rspec-should-useless/</guid>
		<description><![CDATA[<p><h1>Ask for help</h1>

<p>Using Rspec 1.2.6 and an expression of some desired behavior such as this:</p>

<pre>it &#34;should score 0&#34; do
  score = 0
  score.should == 0
end</pre>

<p>Will sometimes result in a ruby warning:</p>

<pre>warning: useless use of == in void context</pre>

<p>There was a little confusion as to why this warning was sometimes appearing.
It turns out that the warning appears when the command ruby -w is used to run the spec rather than spec.
This seems to be the case when rake is run for a non rails project, say a plugin.</p> <a href="http://pivotallabs.com/standup-6-9-2009-spring-cleaning-rspec-should-useless/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/standup-6-9-2009-spring-cleaning-rspec-should-useless/">Standup 6/9/2009 Spring Cleaning.  rspec should == useless</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h1>Ask for help</h1>
<p>Using Rspec 1.2.6 and an expression of some desired behavior such as this:</p>
<pre>it &quot;should score 0&quot; do
  score = 0
  score.should == 0
end</pre>
<p>Will sometimes result in a ruby warning:</p>
<pre>warning: useless use of == in void context</pre>
<p>There was a little confusion as to why this warning was sometimes appearing.<br />
It turns out that the warning appears when the command ruby -w is used to run the spec rather than spec.<br />
This seems to be the case when rake is run for a non rails project, say a plugin.</p>
<p>The post <a href="http://pivotallabs.com/standup-6-9-2009-spring-cleaning-rspec-should-useless/">Standup 6/9/2009 Spring Cleaning.  rspec should == useless</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-6-9-2009-spring-cleaning-rspec-should-useless/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KCachegrind OS X 10.5.6</title>
		<link>http://pivotallabs.com/kcachegrind-os-x-10-5-6/</link>
		<comments>http://pivotallabs.com/kcachegrind-os-x-10-5-6/#comments</comments>
		<pubDate>Fri, 08 May 2009 02:23:00 +0000</pubDate>
		<dc:creator>Colin Shield</dc:creator>
				<category><![CDATA[Labs]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/kcachegrind-os-x-10-5-6/</guid>
		<description><![CDATA[<p><p>Installing <a href="http://kcachegrind.sourceforge.net/html/Home.html">KCachegrind</a> in order to profile output from <a href="http://ruby-prof.rubyforge.org/">ruby-prof</a> turned out to be quite a time consuming task.
This was all performed on an iMac with a 2.16 GHz Intel Core 2 Duo CPU and 4GB 667 MHz DDR2 SDRAM.
The initial command:</p>

<pre>sudo port install kcachegrind</pre>

<p>ran for several hours only to fail with :</p>

<pre>checking for XPROTO... configure: error: Package requirements &#40;xproto &#62;= 7.0.13&#41; were not met:

Requested 'xproto &#62;= 7.0.13' but version of Xproto is 7.0.11</pre>

<p>I manually installed the correct version of xorg-xproto:</p>

<pre>sudo port deactivate xorg-xproto # deactivates version 7.0.11_1
sudo port install xorg-xproto # installs version 7.0.14_1
</pre>Restarted the KCachegrind install:
<pre>sudo port install kcachegrind</pre>

<p>Then waited again.
The next error encountered:</p>

<pre>---&#62;  Activating xorg-renderproto @0.9.3_0
Error: Target org.macports.activate returned: Image error: /opt/local/include/X11/extensions/render.h is being used by the active render port.  Please deactivate this port first, or use the -f flag to force the activation.</pre>

<p>I did what the error message suggested:</p>

<pre>sudo port -f activate xorg-renderproto</pre>

<p>It looks as though some other install had installed files</p>

<pre>/opt/local/include/X11/extensions/render.h
/opt/local/include/X11/extensions/renderproto.h</pre>

<p>the install process copied the old files to a tmp directory. A quick diff of the files showed that the installed files were the newer files.
Restarted the install of kcachegrind:</p>

<pre>sudo port install kcachegrind</pre>

<p>The install continued for several more hours. kdelibs3 taking 2 hours.
When everything was finally installed I do have a working version of kcachegrind running.
In total the install ran for approximately 8 hours.</p> <a href="http://pivotallabs.com/kcachegrind-os-x-10-5-6/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/kcachegrind-os-x-10-5-6/">KCachegrind OS X 10.5.6</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Installing <a href="http://kcachegrind.sourceforge.net/html/Home.html">KCachegrind</a> in order to profile output from <a href="http://ruby-prof.rubyforge.org/">ruby-prof</a> turned out to be quite a time consuming task.<br />
This was all performed on an iMac with a 2.16 GHz Intel Core 2 Duo CPU and 4GB 667 MHz DDR2 SDRAM.<br />
The initial command:</p>
<pre>sudo port install kcachegrind</pre>
<p>ran for several hours only to fail with :</p>
<pre>checking for XPROTO... configure: error: Package requirements &#40;xproto &gt;= 7.0.13&#41; were not met:

Requested 'xproto &gt;= 7.0.13' but version of Xproto is 7.0.11</pre>
<p>I manually installed the correct version of xorg-xproto:</p>
<pre>sudo port deactivate xorg-xproto # deactivates version 7.0.11_1
sudo port install xorg-xproto # installs version 7.0.14_1
</pre>
<p>Restarted the KCachegrind install:</p>
<pre>sudo port install kcachegrind</pre>
<p>Then waited again.<br />
The next error encountered:</p>
<pre>---&gt;  Activating xorg-renderproto @0.9.3_0
Error: Target org.macports.activate returned: Image error: /opt/local/include/X11/extensions/render.h is being used by the active render port.  Please deactivate this port first, or use the -f flag to force the activation.</pre>
<p>I did what the error message suggested:</p>
<pre>sudo port -f activate xorg-renderproto</pre>
<p>It looks as though some other install had installed files</p>
<pre>/opt/local/include/X11/extensions/render.h
/opt/local/include/X11/extensions/renderproto.h</pre>
<p>the install process copied the old files to a tmp directory. A quick diff of the files showed that the installed files were the newer files.<br />
Restarted the install of kcachegrind:</p>
<pre>sudo port install kcachegrind</pre>
<p>The install continued for several more hours. kdelibs3 taking 2 hours.<br />
When everything was finally installed I do have a working version of kcachegrind running.<br />
In total the install ran for approximately 8 hours.</p>
<p>The post <a href="http://pivotallabs.com/kcachegrind-os-x-10-5-6/">KCachegrind OS X 10.5.6</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/kcachegrind-os-x-10-5-6/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Standup 12/19/2008 Enumeration mixin and Rails 2.2</title>
		<link>http://pivotallabs.com/standup-12-19-2008-enumeration-mixin-and-rails-2-2/</link>
		<comments>http://pivotallabs.com/standup-12-19-2008-enumeration-mixin-and-rails-2-2/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 06:33:00 +0000</pubDate>
		<dc:creator>Colin Shield</dc:creator>
				<category><![CDATA[Labs]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/standup-12-19-2008-enumeration-mixin-and-rails-2-2/</guid>
		<description><![CDATA[<p><p>One project reported a problem with the enumeration mixin when upgrading to Rails 2.2. The problem was with the all method.</p>

<p>The <a href="http://www.railslodge.com/plugins/887-enumerations-mixin">enumerations mixin</a> allows you to treat instances of your ActiveRecord models as though they were an enumeration of values.</p>

<p>The proposed solution is to switch to in memory enumeration instead of using ActiveRecord.</p> <a href="http://pivotallabs.com/standup-12-19-2008-enumeration-mixin-and-rails-2-2/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/standup-12-19-2008-enumeration-mixin-and-rails-2-2/">Standup 12/19/2008 Enumeration mixin and Rails 2.2</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>One project reported a problem with the enumeration mixin when upgrading to Rails 2.2. The problem was with the all method.</p>
<p>The <a href="http://www.railslodge.com/plugins/887-enumerations-mixin">enumerations mixin</a> allows you to treat instances of your ActiveRecord models as though they were an enumeration of values.</p>
<p>The proposed solution is to switch to in memory enumeration instead of using ActiveRecord.</p>
<p>The post <a href="http://pivotallabs.com/standup-12-19-2008-enumeration-mixin-and-rails-2-2/">Standup 12/19/2008 Enumeration mixin and Rails 2.2</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-12-19-2008-enumeration-mixin-and-rails-2-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using apc
Database Caching using apc
Object Caching 1111/1203 objects using apc

 Served from: pivotallabs.com @ 2013-05-23 14:40:51 by W3 Total Cache -->