← Kartar.Net

Mafia


One of the things that I use a lot of lately is Sinatra. However I find the native application layout a tad annoying and I find myself wanting the same basics from every Sinatra application I create:

I was going to create a tool to generate my own Sinatra application templates but then I saw a Tweet from RubyGems about a Sinatra application generator called Mafia.

Naturally being a proper Rubyist I examined it disdainfully and then proceeded to write my own anyway because there can never be enough Ruby-based tools that do the same thing. Oh wait. No I didn’t.

I did, however, add some new code:

I’ll also add basic RSpec testing to the template when I get a chance. I struggle with testing for Sinatra still. I’m still learning RSpec and am not sure yet what the best framework is to test simple Sinatra applications with. If anyone has recommendations or suggests alternatives to RSpec or has some good examples of how to test applications (especially DataMapper) I’d welcome the input. Every example I’ve seen online is subtly and annoyingly different.



blog comments powered by Disqus

«« Tally »»