<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
  <title>chrisblunt.com</title>
  
  <link href="http://chrisblunt.com/blog" />
  <updated>2010-07-27T07:49:03+01:00</updated>
  <id>http://chrisblunt.com/blog</id>
  <author>
    <name>Chris Blunt</name>
    <uri>http://chrisblunt.com/</uri>
    <email>chris@chrisblunt.com</email>
  </author>
  
  
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/chrisblunt" /><feedburner:info uri="chrisblunt" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/chrisblunt" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsalloy.com/?rss=http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://www.newsalloy.com/subrss3.gif">Subscribe with NewsAlloy</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://download.attensa.com/app/get_attensa.html?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://www.attensa.com/blogs/attensa/WindowsLiveWriter/BadgeredintoBadges_10C02/attensa_feed_button5.gif">Subscribe with Attensa for Outlook</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.flurry.com/pushRssFeed.do?r=fb&amp;url=http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://www.flurry.com/images/flurry_rss_logo2.gif">Subscribe with Flurry</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2Fchrisblunt" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site.</feedburner:browserFriendly><entry>
    <author><name>Chris</name></author>
    <title>Business Startup Week 1: Plymouth Software</title>
    <id>http://chrisblunt.com/blog/2010/07/26/business-startup-week-1-plymouth-software</id>
    <link href="http://feedproxy.google.com/~r/chrisblunt/~3/ak4epRDRbiU/" />
    <published>2010-07-26T00:00:00+01:00</published>
    <updated>2010-07-26T00:00:00+01:00</updated>
    <content type="html">&lt;p&gt;Last week, after &lt;a href="/2010/07/22/short-notes-on-a-long-trip/"&gt;nearly 4 months travelling&lt;/a&gt;, I got back home and started up my new business. After a few years away from self-employment, I was pretty excited, but still felt the nerves that go hand-in-hand with setting up by yourself.&lt;/p&gt;

&lt;p&gt;Things were made easier, though, as Claire has also spent the week setting up her first business, &lt;a href="http://expressvaservices.co.uk"&gt;ExpressVA Services&lt;/a&gt;, so we're working through the process together. Unsurprisingly to those who know her, Claire is a lot better organised than me!&lt;/p&gt;

&lt;h3&gt;Does what it says...&lt;/h3&gt;

&lt;p&gt;To get started, I set off in search of a name. I spent ages working through all the crazy/funky/web/tech/company names I could think of, before deciding just to keep it simple. After a couple of clicks to register a domain, I knocked up a quick logo and website, and &lt;a href="http://plymouthsoftware.com"&gt;Plymouth Software&lt;/a&gt; was born.&lt;/p&gt;

&lt;p&gt;&lt;img src="/images/2010/07/plymouth-software-shot.jpg" alt="Plymouth Software Screenshot" /&gt;&lt;/p&gt;

&lt;h3&gt;Meeting the bank manager&lt;/h3&gt;

&lt;p&gt;Next up was a business bank account. Although not strictly necessary, but I found it made accounting and tax returns much simpler last time. Whatsmore, HSBC still offered their excellent &lt;a href="http://www.business.hsbc.co.uk/1/2/business-banking/business-bank-accounts/business-direct-account;jsessionid=0000GGEU9ddKU6R4f6P1ShS0GYG:12c5gt82o"&gt;Business Direct&lt;/a&gt; account, which is as good as free to businesses that don't handle much cash.&lt;/p&gt;

&lt;p&gt;I had a great experience with HSBC during my freelance days, so didn't hesitate in walking into my local branch and stepping out an hour or so later with a shiny new account. I was beginning to wonder if things were going a little to smoothly!&lt;/p&gt;

&lt;p&gt;The main reason I needed a business account was so I could setup &lt;a href="https://www.paypal-business.co.uk/"&gt;PayPal Pro&lt;/a&gt;, the gateway I'll be using to take &lt;a href="http://bit.ly/5C5iL9"&gt;Amberleaf&lt;/a&gt; subscription payments. Again, I setup the account online - with a &lt;a href="http://twitter.com/cblunt/status/19081909322"&gt;minor hiccup&lt;/a&gt;, which was easily corrected - and waited to get approved.&lt;/p&gt;

&lt;h3&gt;Switching on Amberleaf&lt;/h3&gt;

&lt;p&gt;In the meantime, I've been tidying up &lt;a href="http://bit.ly/5C5iL9"&gt;Amberleaf&lt;/a&gt;, fixing little bugs and niggles that had surfaced. All in all, though, it seems to have stood up pretty well during my absence. It continued to get a steady stream of subscribers to try out the beta, and the feedback has been very positive.&lt;/p&gt;

&lt;p&gt;Yesterday, my PayPal Pro approval came through, so I've been working away to implement a live &lt;a href="http://spreedly.com"&gt;Spreedly&lt;/a&gt; account. Over the coming days, I'll be switching off the beta plan and making Amberleaf live! Existing users will just need to subscribe to the new plan when they log in. I'll be sending out an email giving detailed instructions. Everyone gets a 30 day free trial.&lt;/p&gt;

&lt;p&gt;I'm really looking forward to finally launching Amberleaf, and developing its features. In the pipeline are big improvements to some of the UI, and mobile device integration.&lt;/p&gt;

&lt;p&gt;If you're a web developer, domain reseller, hosting provider, or do anything remotely domain-related, why not check out &lt;a href="http://bit.ly/5C5iL9"&gt;Amberleaf&lt;/a&gt; to see how it can help your business.  I'd love to hear your feedback and experiences with the software. You can &lt;a href="http://twitter.com/cblunt"&gt;tweet me&lt;/a&gt;, or you can send through Amberleaf itself.&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=ak4epRDRbiU:axuNF4s-_Wo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=ak4epRDRbiU:axuNF4s-_Wo:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=ak4epRDRbiU:axuNF4s-_Wo:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=ak4epRDRbiU:axuNF4s-_Wo:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
  <feedburner:origLink>http://chrisblunt.com/blog/2010/07/26/business-startup-week-1-plymouth-software/</feedburner:origLink></entry>
  
  <entry>
    <author><name>Chris</name></author>
    <title>Short notes on a Long Trip</title>
    <id>http://chrisblunt.com/blog/2010/07/22/short-notes-on-a-long-trip</id>
    <link href="http://feedproxy.google.com/~r/chrisblunt/~3/MQgGBcZHSfs/" />
    <published>2010-07-22T00:00:00+01:00</published>
    <updated>2010-07-22T00:00:00+01:00</updated>
    <content type="html">&lt;p&gt;Arriving into London Heathrow Terminal 5 after nearly 4 months away, everything started to feel a bit strange. Our flight from New York had done nothing for my nerves, turbulent from start to finish. We both got no sleep on the overnight flight, so were set for a pretty long day. As we walked into the arrivals hall - somewhat light, as our bags were following us on the next flight - the past several months suddenly seemed a lifetime ago.&lt;/p&gt;

&lt;h3&gt;The Trip&lt;/h3&gt;

&lt;p&gt;After leaving &lt;a href="/2010/04/21/short-notes-on-hong-kong/"&gt;Hong Kong&lt;/a&gt;, Claire and I had endured another sleepless flight down to Sydney, several hours wait, and then a final flight back up to Cairns where we would start our tour of the East Coast.&lt;/p&gt;

&lt;h4&gt;Australia&lt;/h4&gt;

&lt;p&gt;We both loved Cairns; warm sunshine, and the friendly, laid-back attitude hit us the moment we landed - as did the heat! After a couple of day tours to explore up to Cape Tribulation, and Kuranda (where we were pleasantly surprised to see Devonshire Cream Teas on offer!), we spent the next 5 weeks travelling down the coast on the Greyhound.&lt;/p&gt;

&lt;p&gt;Every stop was memorable - from the quiet eeriness of Magnetic Island; the calm tranquility of &lt;a href="http://www.coolbananas.net.au/"&gt;Cool Bananas&lt;/a&gt; in Agnes Water; and the stunning city of Brisbane right through to Australia Zoo (we stopped at Caloundra); our 11 mile walk around Port Macquarie; and our visit to the
&lt;a href="http://www.koalahospital.org.au/"&gt;Koala Hospital&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.flickr.com/photos/cblunt/4637941044/"&gt;&lt;img src="http://farm5.static.flickr.com/4026/4637941044_14beb39178_m.jpg" title="Joey in tree" alt="Joey at Koala Hospital" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's not until you see the distinctive sails of Sydney Opera House that it feels like you're truly in Australia, though. We spent a few days in the city, and took an awesome trip out to the Blue Mountains with Jimmy at the &lt;a href="http://www.happycoach.net.au/"&gt;Happy Coach Company&lt;/a&gt;. This was a hilarious day, and I'd highly recommend their tours.&lt;/p&gt;

&lt;p&gt;We stopped off at Canberra for a night, and then travelled through to Melbourne. We both loved Melbourne's very different, European style that set it apart from the other Australian cities we'd visited.&lt;/p&gt;

&lt;h4&gt;New Zealand&lt;/h4&gt;

&lt;p&gt;From Melbourne, we flew across to Christchurch, New Zealand. Hiring a car for just NZ$1 a day, we travelled the South Island for a couple of weeks, our jaws dropping at the incredible scenery. Thankfully there was barely a car on the road, as our little DollarMobile struggled its away across vast mountains, up to Milford Sound, across the Cardrona Range (with a cheeky stop at the &lt;a href="http://www.cardronahotel.co.nz/"&gt;Cardrona&lt;/a&gt; hotel for a fantastic cream tea!) and down to Wanaka and Hawea.&lt;/p&gt;

&lt;p&gt;Travelling the West Coast, we stopped at the powder-blue Fox and Franz Josef glaciers, and also one of my favourite spots - &lt;a href="http://maps.google.co.uk/maps?client=ubuntu&amp;amp;channel=cs&amp;amp;q=Punakaiki,+West+Coast,+New+Zealand&amp;amp;ie=UTF8&amp;amp;ei=7VlMTPv6CoKQjAe4y-DXDA&amp;amp;ved=0CBMQ_AU&amp;amp;hl=en&amp;amp;cd=1&amp;amp;geocode=FdF5ff0drGE2Cg&amp;amp;split=0&amp;amp;sll=53.800651,-4.064941&amp;amp;sspn=6.881357,14.941406&amp;amp;hq=&amp;amp;hnear=Punakaiki,+West+Coast,+New+Zealand&amp;amp;t=h&amp;amp;z=12"&gt;Punakaiki&lt;/a&gt;. There's plenty of trails here, as well as the mysterious Pancake rocks and blow holes. It was the &lt;a href="http://www.tenikauretreat.co.nz"&gt;Te Nikau accommodation&lt;/a&gt;, though, that made the stay. A friendly and homely cottage atmosphere; a log fire burning away in the corner of the lounge area; free fresh-leaf tea; and freshly baked muffins and bread every day. Like so many others who had written in the guest book, I was sad to have only stayed one night.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.flickr.com/photos/cblunt/4640882045"&gt;&lt;img src="http://farm5.static.flickr.com/4042/4640882045_de45b0b11d_m.jpg" alt="Lakeside" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We headed up to Nelson and Picton (&lt;a href="http://www.sequoialodge.co.nz/"&gt;Sequoia Lodge&lt;/a&gt; does great, fresh and free chocolate pudding every night!) before catching the stomach-churning ferry across to the North Island. Crossing the Cook Strait is renowned as one of the most picturesque sailings in the world, but the weather was against us and we had high swells and low visibility.&lt;/p&gt;

&lt;p&gt;A short and painfully cold stopover in Wellington started our trip around the North Island, where we would head to Napier, Taupo, Rotorua and Hamilton, resuming our Australian-trait of walking miles around the towns, and discovering more strange natural phenomena - the &lt;a href="http://www.waiotapu.co.nz/"&gt;Wai-O-Tapu geothermal parks&lt;/a&gt; are like something from a science fiction movie.&lt;/p&gt;

&lt;h4&gt;Fiji &amp;amp; The USA&lt;/h4&gt;

&lt;p&gt;After 5 weeks in New Zealand, and exploring Auckland and a few stops in the Northland, we flew out to Fiji's Coral Coast. Our stay here was perfect. During our week here, Claire would finally try eating fish - and liked it! - thanks to the awesome chef at the Hideaway Resort. Amongst lots of relaxing, I decided to give SCUBA diving a go with &lt;a href="http://diveaway-fiji.com"&gt;Diveaway Fiji&lt;/a&gt;, and instantly regretted leaving it until the last day. If you go there, make sure you leave enough time to book a second dive - it's incredible!&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.flickr.com/photos/cblunt/4823585728"&gt;&lt;img src="http://farm5.static.flickr.com/4119/4823585728_2fb7de10ba_m.jpg" alt="Fiji Sunset" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After a full week of serene relaxation in Fiji, we flew up to Waikiki, Hawaii with a stopover in Christmas Island. Crossing the dateline was very strange - we experienced two Tuesday 23rd Junes. Claire summed up the craziness when she pointed out we'd landed in Christmas Island (for a stopover) tomorrow. It was easy to see where inspiration for &lt;em&gt;Lost&lt;/em&gt; might have come from (I've still not seen the finale, though!).&lt;/p&gt;

&lt;p&gt;Hawaii was great, and although Claire spent the first day suffering from extremely bad insect bites, they were soon sorted out and we enjoyed a few days exploring the city and visiting Pearl Harbour.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.flickr.com/photos/cblunt/4823598814"&gt;&lt;img src="http://farm5.static.flickr.com/4136/4823598814_4504f6287e_m.jpg" alt="Hawaii Night" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As our trip's end grew closer, we stopped for a few nights in San Francisco, which was like walking around a movie set! It all looked strangely familiar, and we loved the Bay area spending every day walking and exploring new parts. We were also lucky enough to be there for July 4th, and watched the fireworks display from Ghirardelli Square.&lt;/p&gt;

&lt;p&gt;We caught a short flight to Las Vegas, where we finally picked up our marriage certificate from Christmas; and then travelled on to New York to arrive in the middle of a heatwave. Unfortunately, the air conditioning in our room had packed up, but the guys at &lt;a href="http://www.starhotelny.com/"&gt;Chelsea Star&lt;/a&gt; were quick to fix it though, and New York was as incredible as expected. On our final night, Claire fulfilled her dream of going to the top of the Empire State Building, from where the sunset views across the city were truly stunning.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.flickr.com/photos/cblunt/4823631376"&gt;&lt;img src="http://farm5.static.flickr.com/4074/4823631376_dfc0f5b1c4_m.jpg" alt="Cabs in Times Square" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;What's Next&lt;/h3&gt;

&lt;p&gt;So it was with a bump we came back to reality, and two weeks on I'm not sure being home has sunk in yet. We're both starting up businesses, Claire racing ahead with &lt;a href="http://expressvaservices.co.uk"&gt;ExpressVA Services&lt;/a&gt;, and me frantically remembering &lt;a href="http://rubyonrails.org"&gt;Rails&lt;/a&gt; code to develop &lt;a href="https://amberleafapp.com"&gt;Amberleaf&lt;/a&gt;. I'm also setting up &lt;a href="http://bit.ly/bNggyV"&gt;Plymouth Software&lt;/a&gt; to carry Amberleaf and Android app ideas I've been thinking about.&lt;/p&gt;

&lt;p&gt;To squeeze our experience this short post is impossible. We learned so much and met great people who we'd love to &lt;a href="http://twitter.com/cblunt"&gt;stay in&lt;/a&gt; &lt;a href="http://facebook.com/cbluntuk"&gt;touch with&lt;/a&gt;. We've seen and experienced things that we couldn't even have imagined.&lt;/p&gt;

&lt;p&gt;Claire and I both kept daily journals, which we'll be typing up and publishing as EBooks shortly. We've also jotted down the places we stayed, the sights we've seen and places we would recommend - but you'll have to check out the ebook to find the best rated tea!&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=MQgGBcZHSfs:uqI0gqk9WZk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=MQgGBcZHSfs:uqI0gqk9WZk:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=MQgGBcZHSfs:uqI0gqk9WZk:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=MQgGBcZHSfs:uqI0gqk9WZk:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
  <feedburner:origLink>http://chrisblunt.com/blog/2010/07/22/short-notes-on-a-long-trip/</feedburner:origLink></entry>
  
  <entry>
    <author><name>Chris</name></author>
    <title>Short notes on Hong Kong</title>
    <id>http://chrisblunt.com/blog/2010/04/21/short-notes-on-hong-kong</id>
    <link href="http://feedproxy.google.com/~r/chrisblunt/~3/YL7ZF_VZ2QY/" />
    <published>2010-04-21T00:00:00+01:00</published>
    <updated>2010-04-21T00:00:00+01:00</updated>
    <content type="html">&lt;p&gt;After 3 weeks of travel, I'm finally finding time to write something for
this blog! Although such a short amount of time, a lot has happened since we
left Heathrow on our 12 hour flight to Hong Kong.&lt;/p&gt;

&lt;p&gt;When Claire and I landed, the rain was pouring! We managed to get a bus into
the city, but with no idea where to get off, we relied on photos from
Google! Thankfully, it  paid off, and we were soon at the Oriental Lander, a
compact hotel in the north of Kowloon.&lt;/p&gt;

&lt;p&gt;We strolled down Nathan Road, something we would do a lot over the next few
days as we bounced between Kowloon and Hong Kong aboard the Star Ferry.
Excellent value at just HK$2.40 (about 24p) each!&lt;/p&gt;

&lt;p&gt;The city is an amazing clash of eastern and western cultures - whilst
Starbucks and Burger King straddle one side of the road, traditional Chinese
medicine stalls and dried fish cover the opposite streets. Language wasn't
too much of an issue either, which was a relief, as almost everything was
written in English...&lt;/p&gt;

&lt;p&gt;We sampled some tradional Chinese food, and whilst still unsure of some of
the things we were eating, it all tasted very nice!&lt;/p&gt;

&lt;p&gt;We headed up to the Peak for views across the harbour, but although the rain
had long gone, cloud still hung heavy in the air, so we could barely make
out any buildings. Undeterred, we walked around some of the tracks across
the Peak, and got some good photos!&lt;/p&gt;

&lt;p&gt;At night, the view across to Hong Kong harbour from Kowloon is incredible,
and we made sure to get plenty of pics. The buildings here are on a scale
you have to see to believe-we were both very impressed!&lt;/p&gt;

&lt;p&gt;On our last full day in Hong Kong, we travelled to Lantau island to see the
famed 'Big Buddah'. He is indeed big, and the surrounding countryside is
breathtaking. After climbing the steps and exploring the neighbouring
monastery, we hopped on a bus to the fishing village of Tai O.&lt;/p&gt;

&lt;p&gt;Here, we walked through the bustling fish markets and through the village
houses to a lookout across the ocean where we could see Chinese White
dolphins breaking the waves. Again, the landscape was like something out of
a book, with lush green mountains surrounding us, and the Big Buddah
emerging every so often through the mists that passed over their peaks.&lt;/p&gt;

&lt;p&gt;Our final day in Hong Kong was spent exploring more of the city and Hong
Kong island. As recommended by our travel guide, we seeked out the Luk Yu
tea house (along Stanley Street) for a well deserved brew.&lt;/p&gt;

&lt;p&gt;Whilst Claire was initially concerned we might be spending a fortune on Dim
Sum, her fears were alleieved by the lovely green tea, and - more
importantly - endless refills of the teapot on offer.&lt;/p&gt;

&lt;p&gt;Hong Kong is a truly amazing place, and we both enjoyed our short stay
there. We sampled plenty of tea and famed Hong Kong cakes, and were very
surprised by the seemingly slow pace of the main streets.&lt;/p&gt;

&lt;p&gt;Being a huge financial and business centre, we'd expected streets rammed
like London's Oxford street, but instead everyone along Nathan Road seemed
to stroll along at a pleasant and relaxed pace.&lt;/p&gt;

&lt;p&gt;We left Hong Kong for the next leg of our journey to Australia, happy to
have finally seen that world-famous skyline and sampled some very new foods.&lt;/p&gt;

&lt;p&gt;During our travels, we are keeping journals that we'll eventually write up
on our return. It would also be great to get some photos up, but finding
free (or even cheap!) Internet in Australia, and somewhere that can read
SDHC cards, is proving nearly impossible.&lt;/p&gt;

&lt;p&gt;Hopefully we'll be able to find somewhere as we travel down the East Coast.
In the meantime, you can follow us on &lt;a href="http://facebook.com/"&gt;Facebook&lt;/a&gt; and &lt;a href="http://twitter.com/cblunt"&gt;Twitter&lt;/a&gt;.&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=YL7ZF_VZ2QY:_VOXz4N1akI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=YL7ZF_VZ2QY:_VOXz4N1akI:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=YL7ZF_VZ2QY:_VOXz4N1akI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=YL7ZF_VZ2QY:_VOXz4N1akI:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
  <feedburner:origLink>http://chrisblunt.com/blog/2010/04/21/short-notes-on-hong-kong/</feedburner:origLink></entry>
  
  <entry>
    <author><name>Chris</name></author>
    <title>Lanyon: An Email and Web Interface to Jekyll</title>
    <id>http://chrisblunt.com/blog/2010/04/01/lanyon-an-email-and-web-interface-to-jekyll</id>
    <link href="http://feedproxy.google.com/~r/chrisblunt/~3/tVS9fpRW3BE/" />
    <published>2010-04-01T00:00:00+01:00</published>
    <updated>2010-04-01T00:00:00+01:00</updated>
    <content type="html">&lt;p&gt;I really like the idea of sites like
&lt;a href="http://posterous.com"&gt;posterous&lt;/a&gt; which use email as an interface for
publishing content. However, I just moved this site to use static content built by Jekyll, and didn't want to maintain multiple blogs.&lt;/p&gt;

&lt;p&gt;So I created &lt;a href="http://github.com/cblunt/lanyon"&gt;Lanyon&lt;/a&gt;, a quick Rails 3 app I built in an attempt to bridge the simplicity of
Jekyll with the accessibility of email/web publishing systems like
Wordpress. Lanyon polls an email account for posts and, when detected,
automatically publishes them. It can also automatically commit and
deploy your blog using Jekyll, so posts appear without the need for
manual intervention.&lt;/p&gt;

&lt;p&gt;Lanyon also provides a rudimentary web interface to your blog, so you
can create, edit and delete posts.&lt;/p&gt;

&lt;p&gt;Lanyon gives you the advantage of being able to publish from anywhere,
but still maintain the simplicity of static content created by Jekyll.&lt;/p&gt;

&lt;p&gt;I wrote Lanyon to allow me to post to this site as I'm travelling (we
leave for Hong Kong tomorrow!). If all goes to plan, I should be able
to post entries without the awkwardness of vim and SSH on a mobile
phone.&lt;/p&gt;

&lt;p&gt;So here's the first test...&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=tVS9fpRW3BE:C7yzP5tWE6g:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=tVS9fpRW3BE:C7yzP5tWE6g:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=tVS9fpRW3BE:C7yzP5tWE6g:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=tVS9fpRW3BE:C7yzP5tWE6g:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
  <feedburner:origLink>http://chrisblunt.com/blog/2010/04/01/lanyon-an-email-and-web-interface-to-jekyll/</feedburner:origLink></entry>
  
  <entry>
    <author><name>Chris</name></author>
    <title>Amberleaf: Pricing Announced</title>
    <id>http://chrisblunt.com/blog/2010/03/17/amberleaf-pricing-announced</id>
    <link href="http://feedproxy.google.com/~r/chrisblunt/~3/y4Xpdw2ZuIk/" />
    <published>2010-03-17T00:00:00+00:00</published>
    <updated>2010-03-17T00:00:00+00:00</updated>
    <content type="html">&lt;p&gt;&lt;a href="http://bit.ly/5C5iL9" title="Amberleaf"&gt;&lt;img src="/images/2010/03/amberleaf_plans.jpg" title="Amberleaf Price Plans Screenshot" alt="Amberleaf Price Plan" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today I released a small update to &lt;a href="http://bit.ly/5C5iL9"&gt;Amberleaf&lt;/a&gt; that includes details of the pricing and subscription plan. To keep things simple, Amberleaf only has one price plan, at just &amp;pound;4.95 per month. That gets you everything the software has to offer - there are no artificial limits in place.&lt;/p&gt;

&lt;p&gt;I'm happy to say, though, that for the duration of the public beta test, all accounts are &lt;strong&gt;still completely free!&lt;/strong&gt; &lt;a href="http://bit.ly/6rfiOQ"&gt;Sign up now&lt;/a&gt; and try out Amberleaf's &lt;a href="http://chrisblunt.com/2010/03/11/amberleaf-update-bill-tracking-for-domains-and-hosting/"&gt;new billing features&lt;/a&gt;! By taking part in the beta, you'll also have the opportunity to help shape Amberleaf's development to meet your needs.&lt;/p&gt;

&lt;p&gt;Amberleaf manages domains and hosting accounts for you and your customers. &lt;a href="http://bit.ly/6rfiOQ"&gt;Sign up now&lt;/a&gt; for an account, or &lt;a href="http://bit.ly/5C5iL9" title="Amberleaf"&gt;find out more&lt;/a&gt;.&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=y4Xpdw2ZuIk:5ElA9DB5vPM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=y4Xpdw2ZuIk:5ElA9DB5vPM:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=y4Xpdw2ZuIk:5ElA9DB5vPM:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=y4Xpdw2ZuIk:5ElA9DB5vPM:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
  <feedburner:origLink>http://chrisblunt.com/blog/2010/03/17/amberleaf-pricing-announced/</feedburner:origLink></entry>
  
  <entry>
    <author><name>Chris</name></author>
    <title>Amberleaf Update: Bill Tracking for Domains and Hosting</title>
    <id>http://chrisblunt.com/blog/2010/03/11/amberleaf-update-bill-tracking-for-domains-and-hosting</id>
    <link href="http://feedproxy.google.com/~r/chrisblunt/~3/nZN7LnDAbns/" />
    <published>2010-03-11T00:00:00+00:00</published>
    <updated>2010-03-11T00:00:00+00:00</updated>
    <content type="html">&lt;p&gt;&lt;a href="http://bit.ly/5C5iL9" title="Amberleaf"&gt;&lt;img src="/images/2010/03/amberleaf_bills.jpg" title="Billing in Amberleaf" alt="Amberleaf Billing" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's been a long time coming, but today finally saw the launch of &lt;a href="http://bit.ly/5C5iL9"&gt;Amberleaf's&lt;/a&gt; bill tracking for domains and hosting accounts. How to implement billing had been troubling me for a while, but I finally decided to &lt;strong&gt;keep it simple&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So, I spun a branch in &lt;em&gt;git&lt;/em&gt; and started coding. I gave myself a time limit of 3 days to get something built and released. This proved a useful tool in keeping me focussed. Despite the inevitable "if only it just did this..." going through my mind, &lt;a href="http://twitter.com/cblunt/status/10314004217"&gt;pledging my deadline in public&lt;/a&gt; helped me to stick to it!&lt;/p&gt;

&lt;p&gt;I designed the billing system to simply track income and bills that were due to be paid. No complex invoice generation or sending invoices to clients - that's better left to specialist tools like &lt;a href="http://www.freshbooks.com"&gt;Freshbooks&lt;/a&gt; or &lt;a href="http://invoicemachine.com/"&gt;Invoice Machine&lt;/a&gt;. The plan is to eventually let Amberleaf interact with these services to generate invoices.&lt;/p&gt;

&lt;p&gt;If you've got an Amberleaf account, just &lt;a href="http://bit.ly/5C5iL9"&gt;sign in&lt;/a&gt; to see the new billing functionality. If you've not yet signed up, Amberleaf is completely free during the beta, so why not &lt;a href="http://bit.ly/6rfiOQ"&gt;register an account&lt;/a&gt; to check out the new features? There'll also be a limited free account once Amberleaf goes live!&lt;/p&gt;

&lt;p&gt;I'd love to hear your feedback if you're using Amberleaf to manage your domains and hosting accounts - you can send feedback directly from Amberleaf using the Send Feedback tab, or &lt;a href="http://twitter.com/cblunt"&gt;tweet @cblunt&lt;/a&gt;.&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=nZN7LnDAbns:Ronw2Ul35Eo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=nZN7LnDAbns:Ronw2Ul35Eo:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=nZN7LnDAbns:Ronw2Ul35Eo:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=nZN7LnDAbns:Ronw2Ul35Eo:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
  <feedburner:origLink>http://chrisblunt.com/blog/2010/03/11/amberleaf-update-bill-tracking-for-domains-and-hosting/</feedburner:origLink></entry>
  
  <entry>
    <author><name>Chris</name></author>
    <title>Run Rails 3 Apps on Passenger</title>
    <id>http://chrisblunt.com/blog/2010/03/05/run-rails-3-apps-on-passenger</id>
    <link href="http://feedproxy.google.com/~r/chrisblunt/~3/0J-12ZrVfr4/" />
    <published>2010-03-05T00:00:00+00:00</published>
    <updated>2010-03-05T00:00:00+00:00</updated>
    <content type="html">

&lt;p class="notice"&gt;
  &lt;strong&gt;Update&lt;/strong&gt;: Make sure you update Rubygems using &lt;em&gt;sudo gem update --system&lt;/em&gt;.
&lt;/p&gt;


&lt;p&gt;Whilst I've been &lt;a href="http://chrisblunt.com/2010/03/03/building-apps-with-rails-3-rspec-factorygirl-and-mocha/"&gt;learning more about Rails 3&lt;/a&gt;, I've been using the built in &lt;span class="code"&gt;rails server&lt;/span&gt; to run my code. Today I tried to run my Rails 3 app through &lt;a href="http://modrails.com"&gt;Passenger&lt;/a&gt; on Apache, and immediately hit an error page:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;uninitialized constant Rack::Runtime
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;It &lt;a href="http://cakebaker.42dh.com/2010/01/17/rails-3-and-passenger/"&gt;turns out&lt;/a&gt; that Passenger notices Rails' new &lt;em&gt;config.ru&lt;/em&gt; file, causing it to run as a &lt;em&gt;Rack&lt;/em&gt; application. This requires a slight change in the app's &lt;em&gt;VirtualHost&lt;/em&gt; entry. The &lt;span class="code"&gt;RailsEnv&lt;/span&gt; setting now becomes &lt;span class="code"&gt;RackEnv&lt;/span&gt;:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="c"&gt;# /etc/apache2/apache2.conf&lt;/span&gt;
&lt;span class="c"&gt;# RailsEnv development&lt;/span&gt;
&lt;span class="nb"&gt;RackEnv&lt;/span&gt; development
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;But that wasn't all. My development machine was still running Passenger 2.2.7, which wouldn't support Rails 3. To ensure a clean slate, I removed the old versions of Passenger and installed the latest build (2.2.11 at the time of writing). Once installed, I ran the standard Passenger installation script and updated &lt;em&gt;apache2.conf&lt;/em&gt;:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;sudo gem update --system
&lt;span class="nv"&gt;$ &lt;/span&gt;sudo gem uninstall passenger
  &lt;span class="c"&gt;# Remove all versions of Passenger&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;sudo gem install passenger
&lt;span class="nv"&gt;$ &lt;/span&gt;sudo passenger-install-apache2-module
&lt;/pre&gt;
&lt;/div&gt;




&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="c"&gt;# /etc/apache2/apache2.conf&lt;/span&gt;
&lt;span class="c"&gt;# Passenger mod_rails &lt;/span&gt;
&lt;span class="c"&gt;# NOTE: Your paths may be different. Use the config generated by Passenger&amp;#39;s install script)&lt;/span&gt;
&lt;span class="nb"&gt;LoadModule&lt;/span&gt; passenger_module &lt;span class="sx"&gt;/usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so&lt;/span&gt;
&lt;span class="nb"&gt;PassengerRoot&lt;/span&gt; &lt;span class="sx"&gt;/usr/lib/ruby/gems/1.8/gems/passenger-2.2.11&lt;/span&gt;
&lt;span class="nb"&gt;PassengerRuby&lt;/span&gt; &lt;span class="sx"&gt;/usr/bin/ruby1.8&lt;/span&gt;

&lt;span class="nb"&gt;RailsEnv&lt;/span&gt; development
&lt;span class="nb"&gt;RackEnv&lt;/span&gt; development
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;After a quick restart of Apache, Passenger kicked in and my new Rails 3 app was up and running!&lt;/p&gt;

&lt;h3&gt;References&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://cakebaker.42dh.com/2010/01/17/rails-3-and-passenger/"&gt;Rails 3 and Passenger&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://rails.lighthouseapp.com/projects/8994/tickets/3917-uninitialized-constant-rackruntime-error"&gt;Rails Lighthouse Ticket&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=0J-12ZrVfr4:Gg4Qyv6EJEw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=0J-12ZrVfr4:Gg4Qyv6EJEw:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=0J-12ZrVfr4:Gg4Qyv6EJEw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=0J-12ZrVfr4:Gg4Qyv6EJEw:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
  <feedburner:origLink>http://chrisblunt.com/blog/2010/03/05/run-rails-3-apps-on-passenger/</feedburner:origLink></entry>
  
  <entry>
    <author><name>Chris</name></author>
    <title>Building apps with Rails 3, RSpec, FactoryGirl and Mocha.</title>
    <id>http://chrisblunt.com/blog/2010/03/03/building-apps-with-rails-3-rspec-factorygirl-and-mocha</id>
    <link href="http://feedproxy.google.com/~r/chrisblunt/~3/21NjSp9zHl0/" />
    <published>2010-03-03T00:00:00+00:00</published>
    <updated>2010-03-03T00:00:00+00:00</updated>
    <content type="html">

&lt;p class="sourcecode_notice"&gt;
&lt;a href="http://github.com/cblunt/rails3_project_template"&gt;Clone the source code&lt;/a&gt; from &lt;a href="http://github.com/cblunt"&gt;github&lt;/a&gt;.
&lt;/p&gt;


&lt;p&gt;It's no secret that &lt;a href="http://weblog.rubyonrails.org/2010/2/5/rails-3-0-beta-release"&gt;Rails 3 has been released in beta&lt;/a&gt; for a little while now. Like most Rails developers, I was keen to try out some of the new functionality, not least the redesigned &lt;a href="http://m.onkey.org/2010/1/22/active-record-query-interface"&gt;Active Record API&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Some heavy duty googling turned up little information on how to get an app started and configured with all the associated goodies we've come to expect: &lt;a href="http://github.com/rspec/rspec"&gt;rspec&lt;/a&gt;, &lt;a href="http://mocha.rubyforge.org/"&gt;mocha&lt;/a&gt; and &lt;a href="http://github.com/thoughtbot/factory_girl/tree/rails3"&gt;factory_girl&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is probably because most of these plugins are in a state of development to bring full compatability with Rails 3. So until that happens, I thought I'd document how I've got a skeleton app up and running on Ubuntu using the current development branches.&lt;/p&gt;

&lt;p&gt;You can find the latest versions of the code behind on my &lt;a href="http://github.com/cblunt/rails3_project_template"&gt;github&lt;/a&gt;. I'll continue to revise this template as I figure out more about Rails 3, and the plugins.&lt;/p&gt;

&lt;h3&gt;Installing Rails 3&lt;/h3&gt;

&lt;p&gt;There's plenty of posts detailing how to get Rails 3 on your machine. Favouring gems, I followed the &lt;a href="http://weblog.rubyonrails.org/2010/2/5/rails-3-0-beta-release/"&gt;official advice&lt;/a&gt;:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gem install tzinfo builder memcache-client rack rack-test rack-mount 
&lt;span class="nv"&gt;$ &lt;/span&gt;gem install erubis mail text-format thor bundler i18n
&lt;span class="nv"&gt;$ &lt;/span&gt;gem install rails --pre
&lt;span class="nv"&gt;$ &lt;/span&gt;rails -v
Rails 3.0.0.beta 
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;With everything set, we can spin a new app using:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;rails myapp
&lt;span class="c"&gt;# Lots of output&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;myapp
&lt;/pre&gt;
&lt;/div&gt;


&lt;h3&gt;Bundling Gems&lt;/h3&gt;

&lt;p&gt;Rails 3 uses the &lt;a href="http://github.com/carlhuda/bundler"&gt;Bundler&lt;/a&gt; gem to configure its environment. Bundler brings a lot of benefits, including dependency resolution and ensures that an app's gem requirements are met.&lt;/p&gt;

&lt;p&gt;Your app's required gems are declared in a &lt;em&gt;Gemfile&lt;/em&gt; in your project root. A default Gemfile is provided to load Rails 3 and SQLite. For our project, we'll update it to require some additional gems:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="c1"&gt;# Gemfile&lt;/span&gt;
&lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;http://gemcutter.org&amp;#39;&lt;/span&gt;

&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;rails&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;3.0.0.beta&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;sqlite3-ruby&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:require&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;sqlite3&amp;quot;&lt;/span&gt;

&lt;span class="c1"&gt;# Require the haml gem for rendering HAML templates and SASS stylesheets&lt;/span&gt;
&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;haml&amp;quot;&lt;/span&gt;

&lt;span class="c1"&gt;# FactoryGirl and Shoulda Rails 3 development branches from github&lt;/span&gt;
&lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="ss"&gt;:thoughtbot&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="c1"&gt;# I&amp;#39;ve included shoulda here in case you use TestUnit. Shoulda macros for RSpec 2 don&amp;#39;t &lt;/span&gt;
  &lt;span class="c1"&gt;# work yet though.&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;shoulda&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:git&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;git://github.com/sinefunc/shoulda.git&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="ss"&gt;:branch&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;rails3&amp;quot;&lt;/span&gt;

  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;factory_girl&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:git&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;git://github.com/thoughtbot/factory_girl.git&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                      &lt;span class="ss"&gt;:branch&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;rails3&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                      &lt;span class="ss"&gt;:require&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;factory_girl&amp;quot;&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="ss"&gt;:test&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="c1"&gt;# Install development release of rspec (includes rspec-rails)&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;rspec-rails&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&amp;gt;= 2.0.0.a9&amp;quot;&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;webrat&amp;quot;&lt;/span&gt;
  &lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;mocha&amp;quot;&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Now you can install the bundled gems with:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;bundle install
&lt;/pre&gt;
&lt;/div&gt;


&lt;h3&gt;Configuring RSpec and FactoryGirl&lt;/h3&gt;

&lt;p&gt;One of the first tools I felt lost without in Rails 3 was RSpec. Although I tried going back &lt;em&gt;TestUnit&lt;/em&gt;, I missed the clarity of RSpec. With RSpec 2 installed by Bundler, the app can be prepared for specs with:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;rails generate rspec:install 
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;This creates the appropriate &lt;em&gt;spec&lt;/em&gt; folder and configuration files. I configured RSpec to use FactoryGirl and Mocha. Notice that in the &lt;em&gt;Gemfile&lt;/em&gt; above, Shoulda and FactoryGirl are declared in a group &lt;span class="code"&gt;:thoughtbot&lt;/span&gt;. Bundler loads the default gems before Rails has initialised environment constants such as &lt;span class="code"&gt;Rails.root&lt;/span&gt;. By declaring these gems within a group, they can be defered until Rails has setup the environment (&lt;a href="http://www.pipetodevnull.com/past/2010/2/22/our_first_app_in_rails_3/"&gt;Reference&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;For RSpec to use FactoryGirl, we ask Bundler to load the &lt;em&gt;:thoughtbot&lt;/em&gt; gems in &lt;em&gt;spec_helper.rb&lt;/em&gt;:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="c1"&gt;# specs/spec_helper.rb&lt;/span&gt;
&lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;RAILS_ENV&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;||=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;test&amp;#39;&lt;/span&gt;
&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="no"&gt;File&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dirname&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;__FILE__&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/../config/environment&amp;quot;&lt;/span&gt; &lt;span class="k"&gt;unless&lt;/span&gt; &lt;span class="n"&gt;defined?&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;RAILS_ROOT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;rspec/rails&amp;#39;&lt;/span&gt;

&lt;span class="c1"&gt;# Load in RSpec and Shoulda&lt;/span&gt;
&lt;span class="c1"&gt;# Shoulda macros don&amp;#39;t seem to work with RSpec 2. When they do, this is where to require them.&lt;/span&gt;
&lt;span class="c1"&gt;# require &amp;#39;shoulda&amp;#39;&lt;/span&gt;
&lt;span class="c1"&gt;# require &amp;#39;shoulda/rspec&amp;#39;&lt;/span&gt;

&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;factory_girl&amp;#39;&lt;/span&gt;

&lt;span class="c1"&gt;# Autoloading of Factories seems to be broken, so manually require the &amp;lt;tt&amp;gt;factories.rb&amp;lt;/tt&amp;gt; file&lt;/span&gt;
&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="no"&gt;File&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dirname&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;__FILE__&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/../spec/factories.rb&amp;quot;&lt;/span&gt;

&lt;span class="c1"&gt;# Requires supporting files with custom matchers and macros, etc,&lt;/span&gt;
&lt;span class="c1"&gt;# in ./support/ and its subdirectories.&lt;/span&gt;
&lt;span class="no"&gt;Dir&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="no"&gt;File&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dirname&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;__FILE__&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/support/**/*.rb&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;].&lt;/span&gt;&lt;span class="n"&gt;each&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;For now I've left &lt;em&gt;shoulda&lt;/em&gt; out of the configuration as the Shoulda macros don't yet work with RSpec 2. I also manually required &lt;em&gt;spec/factories.rb&lt;/em&gt; as FactoryGirl's autoloader also seemed not to be working yet. Before running a spec, you'll need to declare your factories in &lt;em&gt;spec/factories.rb&lt;/em&gt;:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;touch spec/factories.rb
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Finally, switch RSpec to use &lt;em&gt;mocha&lt;/em&gt; for mocking objects:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="c1"&gt;# spec/spec_helper.rb&lt;/span&gt;
&lt;span class="c1"&gt;# == Mock Framework&lt;/span&gt;
&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mock_with&lt;/span&gt; &lt;span class="ss"&gt;:mocha&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;h3&gt;Writing specs&lt;/h3&gt;

&lt;p&gt;With everything setup, it's time to write the first spec. As a simple example, I'll create a &lt;span class="code"&gt;User&lt;/span&gt; model and its associated spec. With RSpec installed, the standard rails model generator will automatically create an associated spec file:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;rails generate model user email_address:string password_hash:string password_salt:string
&lt;span class="nv"&gt;$ &lt;/span&gt;rake db:migrate
&lt;span class="o"&gt;==&lt;/span&gt;  CreateUsers: &lt;span class="nv"&gt;migrating&lt;/span&gt; &lt;span class="o"&gt;====================================================&lt;/span&gt;
-- create_table&lt;span class="o"&gt;(&lt;/span&gt;:users&lt;span class="o"&gt;)&lt;/span&gt;
   -&amp;gt; 0.0041s
&lt;span class="o"&gt;==&lt;/span&gt;  CreateUsers: migrated &lt;span class="o"&gt;(&lt;/span&gt;0.0043s&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;===========================================&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;The spec for the &lt;span class="code"&gt;User&lt;/span&gt; model can now be written using the familiar RSpec dialect:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="c1"&gt;# spec/models/user_spec.rb&lt;/span&gt;
&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;spec_helper&amp;#39;&lt;/span&gt;

&lt;span class="n"&gt;describe&lt;/span&gt; &lt;span class="no"&gt;User&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;should be valid&amp;quot;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
    &lt;span class="vi"&gt;@user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Factory&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="vi"&gt;@user&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="n"&gt;be_valid&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;I've also used &lt;span class="code"&gt;Factory.create&lt;/span&gt; to build a user, so as before, you'll need to declare your user factory in &lt;em&gt;spec/factories.rb&lt;/em&gt;:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="c1"&gt;# spec/factories.rb&lt;/span&gt;
&lt;span class="no"&gt;Factory&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;define&lt;/span&gt; &lt;span class="ss"&gt;:user&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
  &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;email_address&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;joe.user@example.com&amp;#39;&lt;/span&gt;
  &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;password&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;secret&amp;#39;&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Finally, to run your specs, you use &lt;em&gt;rake&lt;/em&gt;:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;rake spec
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;All being well, RSpec should now load up and run your specs. In this example, the spec fails trying to set &lt;span class="code"&gt;User#password&lt;/span&gt;. To fix this, we'll add a virtual attribute, &lt;span class="code"&gt;password&lt;/span&gt;, to the &lt;span class="code"&gt;User&lt;/span&gt; model that sets a salted, hashed password:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="c1"&gt;# app/models/user.rb&lt;/span&gt;
&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;digest/sha2&amp;#39;&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ActiveRecord&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Base&lt;/span&gt;
  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pass&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="vi"&gt;@password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;  &lt;span class="n"&gt;pass&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="vi"&gt;@password&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;blank?&lt;/span&gt; 

    &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;password_salt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Digest&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;SHA2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hexdigest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;Time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to_s&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;rand&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;32000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to_s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;password_hash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Digest&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;SHA2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hexdigest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="vi"&gt;@password&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;password_salt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="kp"&gt;protected&lt;/span&gt;
  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;password&lt;/span&gt;
    &lt;span class="vi"&gt;@password&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;With that, another call to &lt;em&gt;rake&lt;/em&gt; should report your passing spec:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;rake spec
.
Finished in 0.062692 seconds
1 example, 0 failures
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;With this, you can now start to build your Rails 3 app, complete with specs and factories. I'll continue to update the &lt;a href="http://github.com/cblunt/rails3_project_template"&gt;code on github&lt;/a&gt; as I figure out more, and as more plugins become compatible with Rails 3.&lt;/p&gt;

&lt;h3&gt;References&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.railsplugins.org"&gt;railsplugins.org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.pipetodevnull.com/past/2010/2/22/our_first_app_in_rails_3/"&gt;pipetodevnull.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/rspec/rspec"&gt;rspec&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/thoughtbot/factory_girl/tree/rails3"&gt;thoughtbot's factory_girl for rails3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/thoughtbot/shoulda/tree/rails3"&gt;thoughtbot's shoulda for rails3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=21NjSp9zHl0:GD_vNTnaqO0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=21NjSp9zHl0:GD_vNTnaqO0:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=21NjSp9zHl0:GD_vNTnaqO0:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=21NjSp9zHl0:GD_vNTnaqO0:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
  <feedburner:origLink>http://chrisblunt.com/blog/2010/03/03/building-apps-with-rails-3-rspec-factorygirl-and-mocha/</feedburner:origLink></entry>
  
  <entry>
    <author><name>Chris</name></author>
    <title>Changed Permalinks and More Blog Tweaks</title>
    <id>http://chrisblunt.com/blog/2010/02/16/changed-permalinks-and-more-blog-tweaks</id>
    <link href="http://feedproxy.google.com/~r/chrisblunt/~3/pweKpjXmcfU/" />
    <published>2010-02-16T00:00:00+00:00</published>
    <updated>2010-02-16T00:00:00+00:00</updated>
    <content type="html">&lt;p&gt;I'm really liking Jekyll as a blog engine, and have been tweaking a few things on the site. One big change is permalinks. To follow Jekyll's preferred convention, I've switched my post's permalinks from &lt;span class="filename"&gt;/blog/YYYY/MM/DD&lt;/span&gt; to just &lt;span class="filename"&gt;/YYYY/MM/DD&lt;/span&gt;. Thanks to Apache's mod_rewrite, old links will still work, but I find mod_rewrite rules a bit of a dark art. So, for convenience and future reference, here are the rules I've used:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="c"&gt;# .htaccess&lt;/span&gt;
&lt;span class="nb"&gt;RewriteBase&lt;/span&gt; /
&lt;span class="c"&gt;# Don&amp;#39;t redirect if URL is a real file&lt;/span&gt;
&lt;span class="nb"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !-f
&lt;span class="c"&gt;# Redirect requests for /blog/some/page.html to /some/page.html&lt;/span&gt;
&lt;span class="nb"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI}% ^/blog(.*)
&lt;span class="nb"&gt;RewriteRule&lt;/span&gt; blog/(.*) http://chrisblunt.com/$1 [R=301,NC,L]

&lt;span class="c"&gt;# Redirect requests for /feed to Feedburner&lt;/span&gt;
&lt;span class="nb"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI}% ^/feed/?(.*)
&lt;span class="nb"&gt;RewriteRule&lt;/span&gt; ^(.*) http://feeds.feedburner.com/chrisblunt [R=301,NC,L]
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;For now, the changed permalink structure means that &lt;a href="(http://disqus.com/"&gt;Disqus&lt;/a&gt; comments are not available. I've contacted &lt;a href="http://disqus.com/overview/"&gt;Disqus&lt;/a&gt; about this though, and hope to move those comments to the new format soon.&lt;/p&gt;

&lt;p&gt;In the meantime, everything else seems to be running smoothly on Jekyll. I've tweaked my site's design back to a fairly minimal theme - &lt;a href="http://tom.preston-werner.com/"&gt;influenced&lt;/a&gt; by &lt;a href="http://alexyoung.org/"&gt;other&lt;/a&gt; Jekyll &lt;a href="http://wiki.github.com/mojombo/jekyll/sites"&gt;sites&lt;/a&gt; that I've seen.&lt;/p&gt;

&lt;p&gt;I've kept deployments simple too; rather than using git hooks, I use a Rakefile and rsync combination based on &lt;a href="http://tatey.com/2009/10/29/simpler-deployment-for-jekyll-using-a-rakefile-and-rsync/"&gt;this post&lt;/a&gt;. The Rakefile lets me use &lt;a href="http://github.com/cblunt/jekyll"&gt;a fork of Jekyll&lt;/a&gt; to compile and upload the site with a simple call to &lt;span class="code"&gt;rake deploy&lt;/span&gt;:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="c1"&gt;# /Rakefile&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;jekyll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;opts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;../jekyll/bin/&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;rm -rf _site&amp;quot;&lt;/span&gt;
  &lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;jekyll &amp;quot;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;opts&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
  
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;rsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{})&lt;/span&gt;
  &lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="ss"&gt;:domain&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;servername&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
    &lt;span class="ss"&gt;:deploy_to&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;filesystem path&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="ss"&gt;:port&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;ssh_port&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="ss"&gt;:user&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;ssh_username&amp;#39;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;rsync -rtz -e &amp;#39;ssh -p &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:port&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#39; _site/ &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:user&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;@&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:domain&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:deploy_to&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/&amp;quot;&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;desc&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;Perform a jekyll rebuild of the site&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="ss"&gt;:build&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="n"&gt;jekyll&lt;/span&gt; 
  &lt;span class="no"&gt;Rake&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Task&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;sitemap:build&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;].&lt;/span&gt;&lt;span class="n"&gt;invoke&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;desc&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;Serve on Localhost with port 4000&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="ss"&gt;:local&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="n"&gt;jekyll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;--server --auto --limit-posts 5&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;desc&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;Rebuild and Deploy to Live&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="ss"&gt;:deploy&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="ss"&gt;:build&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="n"&gt;rsync&lt;/span&gt;
  &lt;span class="no"&gt;Rake&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Task&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;sitemap:ping&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;].&lt;/span&gt;&lt;span class="n"&gt;invoke&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;desc&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;Deploy the currently cached build to Live&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="ss"&gt;:cached&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="n"&gt;rsync&lt;/span&gt;
  &lt;span class="no"&gt;Rake&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Task&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;sitemap:ping&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;].&lt;/span&gt;&lt;span class="n"&gt;invoke&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;namespace&lt;/span&gt; &lt;span class="ss"&gt;:sitemap&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="n"&gt;desc&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;Rebuild the sitemap.xml using gen_sitemap.rb&amp;quot;&lt;/span&gt;
  &lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="ss"&gt;:build&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
    &lt;span class="n"&gt;generate_sitemap_bin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;File&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dirname&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;__FILE__&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/_tools/gen_sitemap.rb&amp;quot;&lt;/span&gt;
    &lt;span class="n"&gt;cmd&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;cd _site &amp;amp;&amp;amp; ruby &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;generate_sitemap_bin&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &amp;#39;.&amp;#39; &amp;gt; sitemap.xml&amp;quot;&lt;/span&gt;
    &lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;

  &lt;span class="n"&gt;desc&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Notify Google of the new sitemap&amp;#39;&lt;/span&gt;
  &lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="ss"&gt;:ping&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
    &lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;net/http&amp;#39;&lt;/span&gt;
    &lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;uri&amp;#39;&lt;/span&gt;
    &lt;span class="no"&gt;Net&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;HTTP&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="s1"&gt;&amp;#39;www.google.com&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s1"&gt;&amp;#39;/webmasters/tools/ping?sitemap=&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
        &lt;span class="no"&gt;URI&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;escape&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;http://chrisblunt.com/sitemap.xml&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Overall everything feels a lot lighter and easier to manage, and vim now sits at the heart of my blog workflow. This is great as I find it hard work to use any other text editor since learning vim. Static HTML means the site is served quickly as well, and I feel safe in the knowledge that my data is stored in a &lt;span class="filename"&gt;git&lt;/span&gt; repository rather than a single database.&lt;/p&gt;

&lt;p&gt;One caveat is that the site can't include external dynamic content; at least not without some Javascript. I figure, though, that there are plenty of ways to follow &lt;a href="http://twitter.com/cblunt"&gt;my Twitter ramblings&lt;/a&gt; or &lt;a href="http://flickr.com/photos/cbl2001"&gt;photostreams&lt;/a&gt; and so on without adding distraction to the site.&lt;/p&gt;

&lt;p&gt;So hopefully the transition is complete. Once the Disqus comments are linked, I'll be able to get back to writing some content to fill the blog! There's plenty to write about, with the recent release of &lt;a href="http://weblog.rubyonrails.org/2010/2/5/rails-3-0-beta-release/"&gt;Rails 3 beta&lt;/a&gt;, and my upcoming travels. I'll also document more about &lt;a href="http://bit.ly/5C5iL9" title="Amberleaf"&gt;Amberleaf&lt;/a&gt;'s development, post more Rails tips as I learn, and discuss a new mobile app for Android I'm starting.&lt;/p&gt;

&lt;p&gt;Are you using &lt;a href="http://github.com/mojombo/jekyll"&gt;Jekyll&lt;/a&gt; or something similar to power your site? How have you found the transition if you've switched from bigger engines like Wordpress or Mephisto?&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=pweKpjXmcfU:WzjKAlLs8HU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=pweKpjXmcfU:WzjKAlLs8HU:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=pweKpjXmcfU:WzjKAlLs8HU:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=pweKpjXmcfU:WzjKAlLs8HU:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
  <feedburner:origLink>http://chrisblunt.com/blog/2010/02/16/changed-permalinks-and-more-blog-tweaks/</feedburner:origLink></entry>
  
  <entry>
    <author><name>Chris</name></author>
    <title>Switching to Jekyll</title>
    <id>http://chrisblunt.com/blog/2010/02/07/switching-to-jekyll</id>
    <link href="http://feedproxy.google.com/~r/chrisblunt/~3/kS3qt_BIWAU/" />
    <published>2010-02-07T00:00:00+00:00</published>
    <updated>2010-02-07T00:00:00+00:00</updated>
    <content type="html">&lt;p&gt;For several years now, I've used Wordpress to power this site. As I've learned to use new tools for coding (&lt;a href="http://vim.org"&gt;vim&lt;/a&gt;, &lt;a href="http://git-scm.com"&gt;git&lt;/a&gt; and so on), Wordpress has started to seem a little too heavy, especially for just writing posts. A &amp;lt;textarea&amp;gt; editor just can't cut it when you've been using vim for a couple of years.&lt;/p&gt;

&lt;p&gt;So I started looking for alternative blogging engines. After trying out a few Rails-powered engines, I eventually stumbled across &lt;a href="http://github.com/mojombo/jekyll"&gt;Jekyll&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Jekyll is described as a "blog-aware static site generator", and I set about giving it a try. After a few minutes, I knew that Jekyll was what I'd been looking for. It lets me edit my site in a text editor of my choosing, generates static HTML files (no more heavy server-side tech), and sits perfectly in a Rails-esque &lt;span class="code"&gt;git push; rake deploy&lt;/span&gt; workflow.&lt;/p&gt;

&lt;p&gt;So after a few days migrating from Wordpress, this site is now 100% Jekyll powered: there is no back-end PHP; no database connection to worry about; and everything is versioned and backed-up through git. I've used a &lt;a href="http://github.com/henrik/jekyll"&gt;fork of Jekyll&lt;/a&gt; that lets me write templates in &lt;a href="http://haml-lang.com"&gt;Haml&lt;/a&gt; rather than stock HTML.&lt;/p&gt;

&lt;p&gt;There have been a few bumps along the way, but thanks to the growing Jekyll community and &lt;a href="http://wiki.github.com/mojombo/jekyll/"&gt;wiki&lt;/a&gt;, there are plenty of helpful guides and tricks available to solve any problems I've had. Here's a quick overview of how I've switched to Jekyll.&lt;/p&gt;

&lt;h3&gt;Pure Text&lt;/h3&gt;

&lt;p&gt;Jekyll uses plain text for everything. Plain text is great - it's small and portable; can be edited using your editor of choice, and is easily versionable using tools like &lt;a href="http://git-scm.com"&gt;git&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Deploying&lt;/h3&gt;

&lt;p&gt;With a suitable &lt;a href="http://github.com/tatey/tatey.com/blob/master/Rakefile"&gt;Rakefile&lt;/a&gt;, managing my site is as simple as writing a post and running &lt;span class="code"&gt;rake deploy&lt;/span&gt;. Rather that git post-commit hooks, I've used rsync (as described in &lt;a href="http://tatey.com/2009/10/29/simpler-deployment-for-jekyll-using-a-rakefile-and-rsync/"&gt;this post&lt;/a&gt;) to push files into my server's blog directory.&lt;/p&gt;

&lt;h3&gt;Comments&lt;/h3&gt;

&lt;p&gt;Having no server-side scripting means that Jekyll sites have no way to submit and process comments. The Jekyll sites I've seen either don't use comments, or implement them through a hosted service such as &lt;a href="http://www.disqus.com"&gt;Disqus&lt;/a&gt; or &lt;a href="http://intensedebate.com"&gt;IntenseDebate&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I like the conversation that comments bring, so I went with Disqus to manage this site's comments. The process was fairly simple, and just involved adding a couple of &amp;lt;script&amp;gt; tags to my &lt;span class="code"&gt;_layouts/post.haml&lt;/span&gt; file.&lt;/p&gt;

&lt;p&gt;As an added bonus, using a hosted service lets you keep track of your conversations across the web, and listen for replies across a number of sites more easily.&lt;/p&gt;

&lt;h3&gt;Migrating Posts&lt;/h3&gt;

&lt;p&gt;Jekyll comes with a set of converters for getting your posts out of other blog engines. You can find them in the &lt;span class="filename"&gt;lib/jekyll/converters/&lt;/span&gt; folder of the Jekyll repository.&lt;/p&gt;

&lt;p&gt;I had 6 years worth of posts stored in Wordpress, and used the built-in converter to extract them. This was fine, but I found the default converter didn't migrate tags and categories.&lt;/p&gt;

&lt;p&gt;After taking a quick look at the Wordpress database structure, I &lt;a href="http://github.com/cblunt/jekyll"&gt;forked Jekyll&lt;/a&gt; and added a snippet of code to pull out each posts' tags and categories. The tags and categories are inserted into each post's YAML front matter.&lt;/p&gt;

&lt;p&gt;You can find my fork of Jekyll on &lt;a href="http://github.com/cblunt/jekyll"&gt;Github&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Code highlighting&lt;/h3&gt;

&lt;p&gt;Jekyll uses &lt;a href="http://pygments.org/"&gt;pygments&lt;/a&gt; to as its source highlighting engine. As a lot of my posts include code snippets, I've come to rely heavily on the wp-syntax plugin. Jekyll uses a different markup delimiter though, so I've not yet managed to migrate highlighted source code. I'm hoping to find some way to patch this, probably using regex. I'll update my fork of Jekyll with any changes.&lt;/p&gt;

&lt;p&gt;An alternative approach that I'm thinking of is to use &lt;a href="http://gist.github.com"&gt;github gists&lt;/a&gt;. This would allow code to be embedded into each post, and would keep all my code in one place.&lt;/p&gt;

&lt;h3&gt;Google Sitemaps and Pings&lt;/h3&gt;

&lt;p&gt;My Wordpress site used a plugin to generate a &lt;span class="filename"&gt;sitemap.xml&lt;/span&gt; file every time a post was published. Again, the Jekyll community had already developed a script to replicate this functionality, and my &lt;span class="filename"&gt;sitemap.xml&lt;/span&gt; is now built and submitted to Google every time with every update.&lt;/p&gt;

&lt;h3&gt;RSS/Atom Feeds&lt;/h3&gt;

&lt;p&gt;My site's feed is handled through &lt;a href="http://feeds.feedburner.com/chrisblunt"&gt;Feedburner&lt;/a&gt;. For the few users that were directly subscribed to my site's raw XML feed (&lt;span class="filename"&gt;http://chrisblunt.com/blog/feed&lt;/span&gt;), I've used Apache mod_rewrite to redirect requests to &lt;a href="http://feeds.feedburner.com/chrisblunt"&gt;Feedburner&lt;/a&gt;. This should be transparent to those subscribers, but please let me know if you find otherwise.&lt;/p&gt;

&lt;p&gt;So that's my site switched over to Jekyll, and I'm glad to say that everything seems to have gone smoothly. Thanks to the magic of &lt;span class="code"&gt;mod_rewrite&lt;/span&gt; all previous links should still work.&lt;/p&gt;

&lt;p&gt;The only problem so far is that code snippets haven't migrated properly, so you'll find that they aren't syntax highlighted. I'll work on switching those manually once I decide whether to go with gist or pygments.&lt;/p&gt;

&lt;p&gt;There are likely to be a few more tweaks to the site's layout and theme. I'll also be posting more as I get to grips with Rails 3 and Android, and Claire and I start on our travels in March...&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=kS3qt_BIWAU:hlwb2k7QSqQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=kS3qt_BIWAU:hlwb2k7QSqQ:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=kS3qt_BIWAU:hlwb2k7QSqQ:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=kS3qt_BIWAU:hlwb2k7QSqQ:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
  <feedburner:origLink>http://chrisblunt.com/blog/2010/02/07/switching-to-jekyll/</feedburner:origLink></entry>
  
  <entry>
    <author><name>Chris</name></author>
    <title>Amberleaf: Manage Your Domains &amp; Hosting - Public Beta Now Open.</title>
    <id>http://chrisblunt.com/blog/2010/01/04/amberleaf-manage-your-domains-hosting-public-beta-now-open</id>
    <link href="http://feedproxy.google.com/~r/chrisblunt/~3/37xSI5VT154/" />
    <published>2010-01-04T00:00:00+00:00</published>
    <updated>2010-01-04T00:00:00+00:00</updated>
    <content type="html">&lt;p&gt;&lt;a href="http://bit.ly/5C5iL9" title="Amberleaf"&gt;&lt;img src="/images/2010/01/Screenshot-1.png" title="Amberleaf Front Page" alt="Amberleaf Front Page" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After several months of evening development and jumping into Rails at the deep-end, I'm happy to jump into 2010 by opening public beta accounts for &lt;a href="http://bit.ly/5C5iL9" title="Amberleaf"&gt;Amberleaf&lt;/a&gt; - and every account is &lt;strong&gt;free for the duration of the beta&lt;/strong&gt;!&lt;/p&gt;

&lt;p&gt;Amberleaf is built to remind you of upcoming renewals for domains and SSL certificate expiries, and hosting account renewals, and simply to remind you when to bill your customers. It is the evolution of HostManager, an OS X app I wrote back in my university days.&lt;/p&gt;

&lt;h3&gt;Who uses Amberleaf?&lt;/h3&gt;

&lt;p&gt;Anybody who has a domain! Whether you own or manage a single domain, or several hundred hosting accounts on behalf of your clients, Amberleaf is designed to make your life easier, by providing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatic WHOIS lookup for domains, with more TLDs being added.&lt;/li&gt;
&lt;li&gt;Email notification of upcoming expiries and renewals.&lt;/li&gt;
&lt;li&gt;Private RSS feed of your upcoming notifications.&lt;/li&gt;
&lt;li&gt;Simple client management, with the ability to import your existing clients' vCards.&lt;/li&gt;
&lt;li&gt;Keep a history of notes for your domains and clients, such as when special discounts are due to end.&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;What do you think?&lt;/h3&gt;

&lt;p&gt;Amberleaf is completely free for the duration of the beta, and signup only takes a couple of minutes; I'd love to hear your feedback and comments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="http://bit.ly/6rfiOQ" title="Sign up for Amberleaf"&gt;Sign up for Amberleaf now&lt;/a&gt;&lt;/strong&gt; or &lt;a href="http://bit.ly/5C5iL9" title="Amberleaf"&gt;find out more&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you've already signed up, you can email comments to &lt;strong&gt;chris&lt;/strong&gt; at &lt;strong&gt;chrisblunt&lt;/strong&gt; dot &lt;strong&gt;com&lt;/strong&gt;; ping me on &lt;a href="http://twitter.com/cblunt" title="Twitter @cblunt"&gt;twitter&lt;/a&gt; (@cblunt), or send feedback directly from Amberleaf using the feedback tab at the bottom of every page.&lt;/p&gt;

&lt;p&gt;If you'd like to see what's coming in future releases, and get involved in Amberleaf's development, check out the public tracker at &lt;a href="http://trac.chrisblunt.com"&gt;trac.chrisblunt.com&lt;/a&gt;.&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=37xSI5VT154:Zyt2Mxbnwnw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=37xSI5VT154:Zyt2Mxbnwnw:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=37xSI5VT154:Zyt2Mxbnwnw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=37xSI5VT154:Zyt2Mxbnwnw:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
  <feedburner:origLink>http://chrisblunt.com/blog/2010/01/04/amberleaf-manage-your-domains-hosting-public-beta-now-open/</feedburner:origLink></entry>
  
  <entry>
    <author><name>Chris</name></author>
    <title>Just Married</title>
    <id>http://chrisblunt.com/blog/2010/01/03/just-married</id>
    <link href="http://feedproxy.google.com/~r/chrisblunt/~3/-PJx62k7NEc/" />
    <published>2010-01-03T00:00:00+00:00</published>
    <updated>2010-01-03T00:00:00+00:00</updated>
    <content type="html">&lt;p&gt;Over Christmas, Claire and I travelled to Las Vegas to finally tie the knot. After a few relatively easy months of planning, several hours delay in London and very little sleep; the wedding day was perfect.&lt;/p&gt;

&lt;p&gt;&lt;img src="/images/2010/01/DSC_0153.jpg" title="Treasure Island" alt="Treasure Island" /&gt;
&lt;img src="/images/2010/01/DSC_0373.jpg" title="Venetian" alt="Venetian" /&gt;&lt;/p&gt;

&lt;p&gt;We were married at the Treasure Island, and had a small reception meal across the road in the Venetian hotel, before taking a tour of the strip, and obligatory photos at 'the sign', in a stretch.&lt;/p&gt;

&lt;p&gt;&lt;img src="/images/2010/01/PC280118.jpg" title="Flight over Grand Canyon" alt="Flight over Grand Canyon" /&gt;&lt;/p&gt;

&lt;p&gt;The trip was complete with a helicopter tour of the strip and neighbouring Grand Canyon valleys.&lt;/p&gt;

&lt;p&gt;Needless to say it was one of the most exciting and unusual Christmas' I've ever experienced, and a great start to married life in 2010!&lt;/p&gt;

&lt;p&gt;&lt;a href="http://bit.ly/5dbPkN" title="Photostream on Flickr"&gt;More photos on Flickr...&lt;/a&gt;&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=-PJx62k7NEc:clodu1RT8CI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=-PJx62k7NEc:clodu1RT8CI:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=-PJx62k7NEc:clodu1RT8CI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=-PJx62k7NEc:clodu1RT8CI:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
  <feedburner:origLink>http://chrisblunt.com/blog/2010/01/03/just-married/</feedburner:origLink></entry>
  
  <entry>
    <author><name>Chris</name></author>
    <title>Introducing Molehill: Simple Issue Tracking</title>
    <id>http://chrisblunt.com/blog/2009/12/15/introducing-molehill-simple-issue-tracking</id>
    <link href="http://feedproxy.google.com/~r/chrisblunt/~3/DSKwWa7UaTc/" />
    <published>2009-12-15T00:00:00+00:00</published>
    <updated>2009-12-15T00:00:00+00:00</updated>
    <content type="html">&lt;p&gt;&lt;img src="/images/2009/12/molehill-01.jpg" title="Molehill Homepage" alt="Molehill Homepage Screenshot" /&gt;&lt;/p&gt;

&lt;p&gt;In my &lt;a href="http://chrisblunt.com/blog/2009/12/11/rails-first-steps-with-cucumber/" title="Rails: First Steps with Cucumber"&gt;previous post&lt;/a&gt;, I wrote how I've recently been getting to grips with &lt;a href="http://cukes.info/" title="Cucumber"&gt;Cucumber&lt;/a&gt; and &lt;a href="http://github.com/ianwhite/pickle" title="Pickle"&gt;Pickle&lt;/a&gt;. To do this, rather than trying to retro-fit Cucumber stories into another app, I decided to start with a fresh new Rails app: &lt;a href="http://molehill.chrisblunt.com/" title="Molehill"&gt;Molehill&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://molehill.chrisblunt.com/" title="Molehill"&gt;Molehill&lt;/a&gt; is an experiment, both in learning behaviour driven design (BDD), and also trying out some ideas for a simplified issue tracker.&lt;/p&gt;

&lt;p&gt;Molehill is open-source, and can be downloaded from &lt;a href="http://github.com/cblunt/molehill" title="Molehill"&gt;github&lt;/a&gt;. See the end of this post for more details.&lt;/p&gt;

&lt;h3&gt;Post. Fix. Close.&lt;/h3&gt;

&lt;p&gt;Molehill is designed to avoid the problem I've found with other issue trackers I've used - they do too much. They require so much overhead setting up and managing versions, milestones, time estimates, shipping forecasts, gantt charts, and so on - that it's as much work posting a case as actually fixing it.&lt;/p&gt;

&lt;p&gt;Molehill takes a much simpler approach, purposefully avoiding all that which makes other issue trackers so heavy. Instead, Molehill is based on the idea that tracking bugs and features should be as simple as &lt;strong&gt;post, fix, close.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;Posting and Promoting Cases&lt;/h3&gt;

&lt;p&gt;Taking cues from Twitter and the micro-blog format, cases are written as simple posts which are dropped into a timeline.&lt;/p&gt;

&lt;p&gt;If a case is posted that you think is important, you can promote it. The more promotions a case has, the higher it appears in the timeline.&lt;/p&gt;

&lt;p&gt;&lt;img src="/images/2009/12/molehill-02.jpg" title="Molehill Promoting Posts" alt="Molehill Promoting Posts Screenshot" /&gt;&lt;/p&gt;

&lt;p&gt;For developers, this means that your users' most desired bugfixes or features are always sitting at the top of the timeline. Instead of spending hours building roadmaps, and scheduling cases for release in 6 weeks (if you're lucky), just work on whatever case is next at the top of the list and release it.&lt;/p&gt;

&lt;h3&gt;Closing Cases&lt;/h3&gt;

&lt;p&gt;Once a case has been fixed or implemented, the original author can mark it as such; or - if it's not going to be implemented - it can be marked declined.&lt;/p&gt;

&lt;p&gt;At the moment, only the original author can close a cace - I've intentionally avoided roles (such as Developers and Reporter) in Molehill, although I may have to make an exception so that developer's can mark any case as completed or declined.&lt;/p&gt;

&lt;p&gt;An alternative approach might be to allow any other use to &lt;em&gt;suggest&lt;/em&gt; a case is complete, or indicate that it won't be implemented. This might be better achieved through a reply system though, like Twitter's &lt;span class="code"&gt;@reply&lt;/span&gt; tag.&lt;/p&gt;

&lt;h3&gt;Categories and Projects&lt;/h3&gt;

&lt;p&gt;Molehill doesn't have a concept of projects, but does allow &lt;span class="code"&gt;#hashtags&lt;/span&gt; within a case. This means cases can easily be tagged and categorised to a project or feature, for example:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;There should be a way for #molehill to categorise or tag #cases. 
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;A quick search from the homepage, or click on the #hashtag, reveals any other cases tagged with the same words.&lt;/p&gt;

&lt;h3&gt;Cucumbers Everywhere&lt;/h3&gt;

&lt;p&gt;I built Molehill primarily to learn Cucumber, and doing so has got me hooked on writing feature-first code. The majority of Molehill was built without once launching Firefox or Chrome; everything was instead written as a feature, and run through Cucumber and Webrat until that feature passed.&lt;/p&gt;

&lt;p&gt;Good Cucumber coverage allows far more confidence when deploying your code that everything works together. Too often I've seen a minor fix in one part of an app have a completely unforeseen effect on some screen assumed to be unrelated. With Cucumber, and a good test suite, these worries can be all but forgotten. Now that it's in public beta, I'm working to retrospectively cover &lt;a href="https://amberleafapp.com" title="Amberleaf"&gt;Amberleaf&lt;/a&gt; in Cucumber stories&lt;/p&gt;

&lt;h3&gt;Getting Molehill&lt;/h3&gt;

&lt;p&gt;Molehill is open sourced under the MIT licence (the same as Rails). You can grab a copy of the code from &lt;a href="http://githuib.com/cblunt/molehill" title="Molehill on Github"&gt;github&lt;/a&gt;, and setup your own local Molehill server using the following steps:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git clone git://github.com/cblunt/molehill.git
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;molehill

&lt;span class="nv"&gt;$ &lt;/span&gt;cp config/database.yml.sample config/database.yml
&lt;span class="c"&gt;# You&amp;#39;ll need to configure your local database in config/database.yml&lt;/span&gt;

&lt;span class="c"&gt;# Molehill has a number of gem dependencies, including Cucumber and Pickle&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;rake gems:install

&lt;span class="nv"&gt;$ &lt;/span&gt;rake db:migrate
&lt;span class="nv"&gt;$ &lt;/span&gt;rake db:migrate &lt;span class="nv"&gt;RAILS_ENV&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;cucumber

&lt;span class="nv"&gt;$ &lt;/span&gt;rake cucumber
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;You can also generate an RCov coverage report (saved in &lt;span class="filename"&gt;features_coverage&lt;/span&gt;) using:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;rake cucumber:rcov
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;There is a live demo of Molehill running at &lt;a href="http://molehill.chrisblunt.com" title="Molehill"&gt;http://molehill.chrisblunt.com&lt;/a&gt;. To begin with, I'll use Molehill to track its own development. However, if it proves to be a workable concept (and requires less management than a full redmine setup), I'll probably use it for Amberleaf's issue tracking as well.&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=DSKwWa7UaTc:NUQmvMf72no:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=DSKwWa7UaTc:NUQmvMf72no:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=DSKwWa7UaTc:NUQmvMf72no:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=DSKwWa7UaTc:NUQmvMf72no:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
  <feedburner:origLink>http://chrisblunt.com/blog/2009/12/15/introducing-molehill-simple-issue-tracking/</feedburner:origLink></entry>
  
  <entry>
    <author><name>Chris</name></author>
    <title>Rails: Building Apps with Cucumber and Pickle</title>
    <id>http://chrisblunt.com/blog/2009/12/11/rails-first-steps-with-cucumber</id>
    <link href="http://feedproxy.google.com/~r/chrisblunt/~3/Z9UBkUlRsLc/" />
    <published>2009-12-11T00:00:00+00:00</published>
    <updated>2009-12-11T00:00:00+00:00</updated>
    <content type="html">&lt;p&gt;I'd often read about &lt;a href="http://cukes.info/" title="Cucumber"&gt;Cucumber&lt;/a&gt;, but had always been put off by the task of learning another abstract domain language to distract me from actually writing code. But as I kept reading more and more about it, curiosity got the better of me and I had to give it a try.&lt;/p&gt;

&lt;p&gt;After a couple of weeks of learning to use Cucumber, I'm completely hooked.&lt;/p&gt;

&lt;h3&gt;What is Cucumber?&lt;/h3&gt;

&lt;p&gt;Cucumber grew out of &lt;a href="http://rspec.info/" title="RSpec"&gt;RSpec&lt;/a&gt; as a language for describing user stories in behaviour driven design (BDD). Cucumber avoids the abstract and often incorrect, functional and technical documenting of the software process, instead encouraging you to write short, specific &lt;em&gt;stories&lt;/em&gt; about an should do.&lt;/p&gt;

&lt;p&gt;In Cucumber, these stories are described through number of individual &lt;em&gt;steps&lt;/em&gt; that describe a situation, set of actions, and conditions to be met. For example, a Cucumber story to test logging out of an application might look something like:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="c1"&gt;# features/logging_in_and_out.feature&lt;/span&gt;
&lt;span class="no"&gt;Scenario&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt; &lt;span class="n"&gt;logged&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="n"&gt;wants&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;log&lt;/span&gt; &lt;span class="n"&gt;out&lt;/span&gt;
  &lt;span class="no"&gt;Given&lt;/span&gt; &lt;span class="n"&gt;I&lt;/span&gt; &lt;span class="n"&gt;am&lt;/span&gt; &lt;span class="n"&gt;logged&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt;
  &lt;span class="no"&gt;And&lt;/span&gt; &lt;span class="n"&gt;I&lt;/span&gt; &lt;span class="n"&gt;click&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;Log out&amp;quot;&lt;/span&gt; &lt;span class="n"&gt;link&lt;/span&gt;
  &lt;span class="no"&gt;Then&lt;/span&gt; &lt;span class="n"&gt;I&lt;/span&gt; &lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;be&lt;/span&gt; &lt;span class="n"&gt;logged&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt;
  &lt;span class="no"&gt;And&lt;/span&gt; &lt;span class="n"&gt;I&lt;/span&gt; &lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="n"&gt;be&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;home&lt;/span&gt; &lt;span class="n"&gt;page&lt;/span&gt;
  &lt;span class="no"&gt;And&lt;/span&gt; &lt;span class="n"&gt;I&lt;/span&gt; &lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="n"&gt;see&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;You have been logged out&amp;quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Stories are designed to be written and read by people, not machines. When you run your story through Cucumber, it applies some funky logic and regular expression matching to run your application code against the story's steps. Each step creates or checks the situation being described.&lt;/p&gt;

&lt;p&gt;For example, the steps for the logging out feature above might be:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="c1"&gt;# features/step_definitions/authentication_steps.rb&lt;/span&gt;
&lt;span class="no"&gt;Given&lt;/span&gt;&lt;span class="sr"&gt; /^I am logged in$/&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;current_user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Factory&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# I&amp;#39;ve used FactoryGirl to create fixtures here&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="no"&gt;Then&lt;/span&gt;&lt;span class="sr"&gt; /^I should not be logged in$/&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;current_user&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="n"&gt;be_nil&lt;/span&gt;
  &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:user_id&lt;/span&gt;&lt;span class="o"&gt;].&lt;/span&gt;&lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="n"&gt;be_nil&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Thankfully, Cucumber comes with a collection of pre-defined steps that cover common situations, such as the  &lt;span class="code"&gt;Then I should see "{something}"&lt;/span&gt; and &lt;span class="code"&gt;When I click "{some link}"&lt;/span&gt; steps in the previous example.&lt;/p&gt;

&lt;h3&gt;Cucumber with Pickle&lt;/h3&gt;

&lt;p&gt;Cucumber works well with a number of other gems, but one that you'll definitely want to use is &lt;a href="http://github.com/ianwhite/pickle" title="Pickle"&gt;pickle&lt;/a&gt;. Once installed, pickle gives you a collection of handy step definitions for creating a referring to new models in your stories.&lt;/p&gt;

&lt;p&gt;In the example below, a new Post model is created and assigned the label "the post". The remaining steps can then refer to "the post" directly:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="c1"&gt;# features/publishing_posts.rb&lt;/span&gt;
&lt;span class="no"&gt;Given&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;post&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;the post&amp;quot;&lt;/span&gt; &lt;span class="n"&gt;exists&lt;/span&gt; &lt;span class="n"&gt;with&lt;/span&gt; &lt;span class="n"&gt;published&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kp"&gt;false&lt;/span&gt;
&lt;span class="no"&gt;And&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;the post&amp;quot;&lt;/span&gt; &lt;span class="n"&gt;belongs&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;me&lt;/span&gt;
&lt;span class="no"&gt;When&lt;/span&gt; &lt;span class="n"&gt;I&lt;/span&gt; &lt;span class="n"&gt;am&lt;/span&gt; &lt;span class="n"&gt;editing&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;the post&amp;quot;&lt;/span&gt;
&lt;span class="no"&gt;And&lt;/span&gt; &lt;span class="n"&gt;I&lt;/span&gt; &lt;span class="n"&gt;click&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;Publish Post&amp;quot;&lt;/span&gt;
&lt;span class="no"&gt;Then&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;the post&amp;quot;&lt;/span&gt; &lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="n"&gt;be&lt;/span&gt; &lt;span class="n"&gt;published&lt;/span&gt;
&lt;span class="no"&gt;And&lt;/span&gt; &lt;span class="n"&gt;I&lt;/span&gt; &lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="n"&gt;see&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;Post Published&amp;quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;h3&gt;Why You Should Be Using Cucumber&lt;/h3&gt;

&lt;h4&gt;Confidence&lt;/h4&gt;

&lt;p&gt;The greatest benefit of Cucumber (and most test-driven methodologies) is that you gain an incredible amount of confidence in your code. Before any release, you can quickly and automatically check that your whole application is doing what you'd expect it to do. This makes releases a far less daunting experience.&lt;/p&gt;

&lt;h4&gt;It tests your entire application, from top to bottom&lt;/h4&gt;

&lt;p&gt;I'd always found testing the high-level functionality of a web app tricky with other test tools, including RSpec. Although they were great at checking very specific, model conditions, when it came to testing the working app as a whole, they never seemed to quite cut it.&lt;/p&gt;

&lt;p&gt;Cucumber lets you write tests that drive through every layer of your application: views, controllers, models and other utility classes (such as email handling, see this &lt;a href="http://drnicwilliams.com/2009/03/26/testing-outbound-emails-with-cucumber/" title="Testing Outbound Emails"&gt;great post&lt;/a&gt; on &lt;a href="http://github.com/bmabey/email-spec" title="email_spec at Github"&gt;email_spec&lt;/a&gt;) can all be tested in a much more natural manner.&lt;/p&gt;

&lt;h4&gt;Stories are reusable&lt;/h4&gt;

&lt;p&gt;As you write more stories, you'll quickly build up a library of handy step definitions. You can use more advanced regular expressions to DRY those step definitions, and then re-use them in other parts of your project, or in other projects.&lt;/p&gt;

&lt;h4&gt;Your code is self documenting&lt;/h4&gt;

&lt;p&gt;One of the greatest benefits of Cucumber stories is that they act as effective documentation for your app. Cucumber can output its running descriptions in a number of formats, including HTML. Having this documentation automatically generated can give you even more assurance that your code is doing what you'd expect, and lets you answer those "what's supposed to happen if...?" questions with certainty.&lt;/p&gt;

&lt;h3&gt;Get Started&lt;/h3&gt;

&lt;p&gt;If you haven't tried Cucumber yet, I really recommend you take an hour to follow some of the &lt;a href="http://wiki.github.com/aslakhellesoy/cucumber/tutorials-and-related-blog-posts" title="Cucumber tutorials"&gt;tutorials&lt;/a&gt;. You definitely won't regret it. There's loads more tips and information available on the &lt;a href="http://cukes.info" title="Cucumber"&gt;Cucumber website&lt;/a&gt;, as well as the official &lt;a href="http://pragprog.com/titles/achbd/the-rspec-book" title="RSpec Book"&gt;RSpec Book&lt;/a&gt; from The Pragmatic Bookshelf.&lt;/p&gt;

&lt;p&gt;In the next post, I'll introduce &lt;a href="http://molehill.chrisblunt.com" title="Molehill"&gt;Molehill&lt;/a&gt;, my first attempt at building an app the BDD way. In the meantime, if you'd like to check out the code and take a look at the Cucumber stories, you can find &lt;a href="http://github.com/cblunt/molehill" title="Molehill at Github"&gt;Molehill&lt;/a&gt; on github.&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=Z9UBkUlRsLc:ZDVW4ouAAdc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=Z9UBkUlRsLc:ZDVW4ouAAdc:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=Z9UBkUlRsLc:ZDVW4ouAAdc:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=Z9UBkUlRsLc:ZDVW4ouAAdc:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
  <feedburner:origLink>http://chrisblunt.com/blog/2009/12/11/rails-first-steps-with-cucumber/</feedburner:origLink></entry>
  
  <entry>
    <author><name>Chris</name></author>
    <title>Rails: Multiple default scopes for ActiveRecord</title>
    <id>http://chrisblunt.com/blog/2009/10/22/rails-multiple-default-scopes-for-activerecord</id>
    <link href="http://feedproxy.google.com/~r/chrisblunt/~3/zlicpizeClA/" />
    <published>2009-10-22T00:00:00+01:00</published>
    <updated>2009-10-22T00:00:00+01:00</updated>
    <content type="html">&lt;p&gt;Default scopes were introduced in Rails 2.3 to allow a default set of options to be applied to any find methods. The common example is to always order a set of results by a given column, e.g:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Post&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ActiveRecord&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Base&lt;/span&gt;
  &lt;span class="c1"&gt;# Any calls to Post.find will automatically have the default :order option merged into them&lt;/span&gt;
  &lt;span class="c1"&gt;# Post.find(:all)&lt;/span&gt;
  &lt;span class="c1"&gt;# =&amp;gt; SELECT * FROM &amp;quot;posts&amp;quot; ORDER BY &amp;quot;created_at DESC&amp;quot;;&lt;/span&gt;
  &lt;span class="n"&gt;default_scope&lt;/span&gt; &lt;span class="ss"&gt;:order&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;created_at DESC&amp;quot;&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Unlike &lt;a href="http://chrisblunt.com/blog/2009/10/06/rails-complex-queries-with-named-scopes/"&gt;named_scopes&lt;/a&gt; (which I am finding more and more useful every day), I found that default scopes cannot  be combined when I tried to use the &lt;a href="http://github.com/rich/acts_as_revisable/"&gt;acts_as_revisable&lt;/a&gt; and &lt;a href="http://github.com/semanticart/is_paranoid"&gt;is_paranoid&lt;/a&gt; plugins together:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Post&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ActiveRecord&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Base&lt;/span&gt;
  &lt;span class="n"&gt;acts_as_revisable&lt;/span&gt;
  &lt;span class="n"&gt;is_paranoid&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;It seems the default scope declared in &lt;span class="code"&gt;is_paranoid&lt;/span&gt; overrides that of &lt;span class="code"&gt;acts_as_revisable&lt;/span&gt;. &lt;span class="code"&gt;Post.find(:all)&lt;/span&gt; will therefore return every revision of &lt;span class="code"&gt;Post&lt;/span&gt; rather than just the current revision. You can check this out by reversing the plugin order:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Post&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ActiveRecord&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Base&lt;/span&gt;
  &lt;span class="n"&gt;is_paranoid&lt;/span&gt;
  &lt;span class="n"&gt;acts_as_revisable&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Now, &lt;span class="code"&gt;Post.find(:all)&lt;/span&gt; will return only current revisions, but will include any destroyed posts as the &lt;span class="code"&gt;acts_as_revisable&lt;/span&gt; default scope overrides &lt;span class="code"&gt;is_paranoid&lt;/span&gt;!&lt;/p&gt;

&lt;h3&gt;A Solution&lt;/h3&gt;


&lt;p&gt;&lt;a href="http://joshuaclayton.github.com/code/default_scope/activerecord/is_paranoid/multiple-default-scopes.html"&gt;This post and code snippet&lt;/a&gt; shows a method for declaring multiple default scopes on a model. I've not yet tried out the code, though, as one of the commenter's was kind enough to fork&lt;span class="code"&gt;is_paranoid&lt;/span&gt; and modify it to merge any existing default scopes. With this forked plugin, &lt;span class="code"&gt;Post&lt;/span&gt; can be scoped correctly by both plugins.&lt;/p&gt;

&lt;p&gt;The fork is available at &lt;a href="http://github.com/grioja/is_paranoid/tree/master"&gt;http://github.com/grioja/is_paranoid/tree/master&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;But... is_paranoid is depracated&lt;/h3&gt;


&lt;p&gt;I noticed that the original &lt;a href="http://github.com/semanticart/is_paranoid"&gt;is_paranoid&lt;/a&gt; plugin has ceased development, so I'm not sure if I'll continue to use it, although It's a neat little plugin, and has several forks.&lt;/p&gt;

&lt;p&gt;The underlying problem, though, of ActiveRecord allowing only one &lt;span class="code"&gt;default_scope&lt;/span&gt; to be declared, is something that I'm bound to come up against in the future, so it's handy to know there is a workaround at least until Rails includes the functionality.&lt;/p&gt;

&lt;p&gt;As an aside, &lt;a href="http://withoutscope.com/"&gt;Rich Cavanaugh&lt;/a&gt;, the developer of acts_as_revisable, has pointed out that the plugin includes some basic is_paranoid functionality already (see &lt;a href="http://github.com/rich/acts_as_revisable/issues/#issue/8/comment/63289"&gt;Rich's reply&lt;/a&gt; to my &lt;a href="http://github.com/rich/acts_as_revisable/issues#issue/8"&gt;original ramblings&lt;/a&gt;):&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Post&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ActiveRecord&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Base&lt;/span&gt;
  &lt;span class="n"&gt;acts_as_revisable&lt;/span&gt; &lt;span class="ss"&gt;:on_delete&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="ss"&gt;:revise&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Do you use default_scope? Do you find the single scope a limitation, or do you rely on named scopes? Feel free to discuss in the comments.&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=zlicpizeClA:W3K3-b1v3LQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=zlicpizeClA:W3K3-b1v3LQ:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=zlicpizeClA:W3K3-b1v3LQ:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/chrisblunt?a=zlicpizeClA:W3K3-b1v3LQ:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/chrisblunt?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
  <feedburner:origLink>http://chrisblunt.com/blog/2009/10/22/rails-multiple-default-scopes-for-activerecord/</feedburner:origLink></entry>
  
</feed>
