January 24th 2009

Ruby / Rails related links

Sinatra app template

Nick Plante has released a nice application template for Sinatra, with a reasonable initial directory structure and a Rackup script for easy use with Passenger. Haml, DataMapper, RSpec and such are also included, so this is pretty biased, but you’re free to fork it and adjust to your needs on github

I gave it a spin and had no problem to run it with Passenger by just pointing the Apache vhost configuration to the public folder of the app, so this is also great when you’d like to have an example on using Rack apps with Passenger.

Rails templates

Application templates seem to be up and coming currently, with the best thing obviously being the Rails templates feature in Edge Rails a.k.a. the upcoming Rails 2.3. Core member Pratik Naik posted a nice summary of the available methods in December, and Peter Cooper from Rails Inside posted more on the topic yesterday, with links to example scripts.

Basically this allows for scripting of the Rails application generator, giving you a DSL with methods to pull in plugins, executing rake tasks and so on. The template can be pulled in remotely, for example from a gist. Peter “Super Daring App Template” can be used with rails [whatever] -m http://gist.github.com/33337.txt, and you are free to fork it and roll your own.

Some kind of template database would be nice though, listing all public templates and their features, so you can pick your favorite and use it.

Zebra – One line tests for shoulda, context and matchy

I really like Shoulda. James Golick has released a gem that enhances it further, called Zebra.

The functionality can be summed up with this example from James’ initial post:

should "be editable by its author" do
  assert @post.editable_by?(@author)


expect { @post.to be_editable_by(@author) }

Roll your own Pastebin with NavySnip

NavySnip is a pastie pastebin Rails application, but intended for localhost use. Check out the screenshot or have a look at the github repository.

Currently, it does not have syntax highlighting, but with a little help from Coderay or a similar Ruby gem, it should be easy to bring that into the app.

Free Lighthouse/Basecamp-inspired web app theme

Andrea Franz released a nice-looking web app theme that looks very familiar if you have been to sites like Lighthouse or Basecamp. Go check it out at Github and make a great app with it!

Little Known Ways to Ruby Mastery by Ryan Bates

To finish things up, there is a nice interview with Ryan Bates over at Rubylearning

Written by Christoph Olszowka
blog comments powered by Disqus