Rails 3.2 Released – The upgrade story

Posted by Kevin McKelvin on January 23, 2012 in Ruby

Rails 3.2 was released on Friday 20 January.  So as any good developer would, I started playing around with it on an app I'm building.It was a breeze getting the bundle updated, just add these lines to the Gemfile and run bundle updateOnce the updated gems had installed, firing up the rails server spat a few errors out. It turns out ActiveAdmin v0.3.4 doesn't work with Rails 3.2. Within a few hours of the Rails release there was already a fix for this which has been pulled into the activeadmin Github repo.Bundling against the edge release is risky, but it works and all m

Continue ReadingLeave a Comment

OSX Lion Reverse Scrolling

Posted by Kevin McKelvin on September 21, 2011 in Mac

The subject of mouse movement in OS X has been debated for years now. Personally I despise the default movement settings in OS X and have a whole array of tweaks in place. But that's a debate for another day.Today I'm looking at the new "natural" reversed scrolling feature in Lion. Having used it for a couple of days now I found that I like having the reverse scrolling on the trackpad, but whenever I reach for my mouse I prefer the classic scrolling method that we've been using for years.I dug around and couldn't find any way inside OS X of decoupling them, but I came across a cool

Continue ReadingLeave a Comment

FakeWeb

Posted by Kevin McKelvin on September 20, 2011 in Ruby, Testing

I was testing a client I wrote to a server API recently.  Being relatively new to testing with RSpec and Ruby, I initially took the naive approach of building a node.js application to behave as a dummy test server.Originally when I wrote the code I knew there had to be a better way, but I only found that better way today.I was revisiting some of that code and discovered FakeWeb.  It's a Ruby framework that makes it simple to test code that involves HTTP requests.  It intercepts HTTP calls made through Net::HTTP and makes it dead simple to create predictable responses for

Continue ReadingLeave a Comment

Slim Templates

Posted by Kevin McKelvin on September 18, 2011 in Open Source, Ruby

The Slim template engine seems to have gained a lot of popularity in the Rails community recently. Their site describes it as 'A lightweight templating engine.' For a long time I've loved Haml, taking the approach that I'd rather describe my intent than hard code HTML tags all over the place.However, in hindsight having used Slim for a while it appears Haml might have stepped a bit too far away from HTML, including some cryptic syntax like '%' signs to declare tags.  Slim takes a step back towards HTML.  It still uses the significant whitespace element of Haml and removes the annoying

Continue ReadingLeave a Comment