April 2009
11 posts
Internbot Chronicles #3
Now that testing is a normal part of my daily workflow, I think it’s a great time to go over some of the testing tools that I use here at thoughtbot. Shoulda Typing too much makes testing no fun at all. I’m actually coming from the RSpec world, and thankfully it was pretty easy to switch over to Shoulda from it. Here’s what I like best about it: context and setup blocks makes testing...
Apr 24th
Tips for writing your own Rails engine
While converting Clearance to a Rails engine was easy, once we were there, we found it wasn’t Valhalla. We fixed the bugs while using the engine internally on a few apps. Here are the lessons we learned. Keep them in mind if you’re thinking of writing your own engine. Routes precedence As developers, we want routes in our app to take precedence over routes in the engine. That is not...
Apr 23rd
5 notes
5 tags
Clearance is a Rails engine
Clearance is now a Rails engine… BLAOW! Why Clearance has served us well for many months. Our only complaints were shared by others: lots of includes too much generated code too many tests to maintain sometimes awkward to override functionality With the re-institution of Rails engines in Rails 2.3, we decided to convert Clearance to engine. The process was relatively...
Apr 22nd
2 tags
Klang & Strongbox
We’ve been running Ruby on Rails training classes since September. Classes are running monthly: Beginning Ruby on Rails Advanced Ruby on Rails Since graduating, our alumni have been building some great stuff. Here’s a selection of their public work. Klang Klang is a small record label. Alumni Mark Cornick built their Rails app. From Mark: It combines a blog-style news...
Apr 17th
Rails 2.3.2 upgrade gotchas
With the latest stable release of rails out the door for about a month, we’ve had a chance to upgrade the bulk of the applications we maintain to 2.3.2.1. The rails 2.3 release notes were a HUGE help during this upgrade. Thanks to the Mike Gunderloy for compiling that document. Here are some “gotchas”, aka issues, aka roadblocks to Strategic Enterprise Adoption that we discovered while...
Apr 15th
Nosy models
Ruby’s “mixins” provide a simple, middle-ground option to developers that wish to include reusable functionality in several classes. When using C++-style multiple inheritence, class hierarchies quickly become muddy, and it becomes necessary to look in several places to find the “core” behavior of a class. Mixins allow you to move reusable methods into modules. These methods can provide an...
Apr 10th
Common markup & style mistakes
Here are three common mistakes we’ve made in the past. Nothing earth-shattering but they’ve now become rules of thumb to avoid when developing markup & style for our Rails apps. Paragraph tags around form fields Forgetting blank option in selects Styling elements globally Paragraph tags around form fields You’re marking up a form. Don’t do this: <p> <%= form.label...
Apr 9th
Hoptoad now supports GitHub integration!
In the last installment of the Hoptoad Chronicles, we introduced the deploy tracking feature. We also mentioned that this feature paved the way for a bunch of great improvements we’d be able to roll out. Like most of the community, we use GitHub for all of our projects. We figured out that we can use the information gleamed from Capistrano during the deploy process to integrate GitHub into...
Apr 8th
9 tags
Integrating vim into your life
More tips from thoughtbot about using vim, but this time with an emphasis on fitting it into your life. Copy and paste To copy and paste from your PRIMARY (on OS X, your clipboard) you use the register. For example, to paste from something you’ve copied elsewhere use "p and to copy the current line into your system-wide buffer use "*yy . For those of us with both a PRIMARY and a CLIPBOARD,...
Apr 8th
7 notes
Deploy Tracking Added to Hoptoad
First, while Hoptoad was not affected by the Engine Yard outage last week, lots of rails applications and web services were, and it was unclear at first what the situation was with Hoptoad. If you ever have questions about hoptoad status or anything else Hoptoad related, you can a) create a support ticket in the hoptoad tender, b) follow @hoptoadapp on twitter. Now on to the good...
Apr 3rd
Success Driven Development
Are you following the Ruby Maturity Model, fully leveraging Agile methodologies, enjoying the benefits of outside-in test-driven development, but STILL not getting the velocity you need? Studies show that, in software development practices that utilize a test-driven approach, the top blocker to project velocity is automated test failure. Now, you can completely eliminate automated...
Apr 1st