Rails 3 & freezing gems

I learned an important lesson today. The quick summary is “bundler makes freezing gems unnecessary, use ‘bundle install –deployment‘”. But for those who like a good, geeky story: I’ve been updating/upgrading/refactoring a Rails 2 project as a Rails 3 project. We’d used the method described here to ensure that developer, testing & production environments would [...]

ActiveResource, FakeWeb & Regex Mojo (authenticated edition)

Have a web service which needs requires authentication, but you’re testing a completely different part of the application?  Again, FakeWeb & Regex help you out here.  If you’re testing a model extended from ActiveResource by using FakeWeb, the url will look something like this:  1http://user:pass@example.com/someService To mock the request, use a regular expression like so: [...]

More FakeWeb & RegExp mojo (anchors edition)

I’ve been using a lot of FakeWeb + Rspec for creating ActiveResource models BDD-style without hitting my RESTful source.  I keep on figuring out little things with FakeWeb that I feel like I should share. When you register uri’s with FakeWeb, and you’re using regular expressions, you might be building layers of access like this: [...]

HAML/SASS and the Holy Grail

I’ve been using HAML and SASS a lot lately because it’s kind of the best thing since sliced bread and ZenCode.  I’ve also been using Mathew James Taylor‘s no-quirks-mode 3 column holy grail layout because: why re-invent the wheel (or in this case the Rube Goldberg Machine that is column layout in CSS). Matthew’s code [...]