ANN: Roda, the routing tree web framework

I’m proud to announce the initial release of Roda, a new ruby web
framework based on the following ideas:

  1. Use a routing tree, similar to Cuba and Rum
  2. Make it easy to use like Sinatra
  3. Make it extensible like Sequel
  4. Avoid namespace pollution

Here’s some sample code to get a flavor:

cat config.ru

require “roda”

class App < Roda
use Rack::Session::Cookie, secret: ENV[‘SECRET’]

route do |r|

  # matches any GET request
  r.get do

    # matches GET /
    r.is "" do
      r.redirect "/hello"
    end

    # matches GET /hello or GET /hello/.*
    r.on "hello" do

      # matches GET /hello/world
      r.is "world" do
        "Hello world!"
      end

      # matches GET /hello
      r.is do
        "Hello!"
      end
    end
  end
end

end

run App.app

Find out more about why Roda was created at
http://roda.jeremyevans.net/why.html

Thanks,
Jeremy