Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/sinatra
README.md
sinatra-mapper.gemspec

README.md

Sinatra plugin that allows to easily prefix all routes within a scope. Basicall porting back the map functionality from Ramaze

How to get started:

require 'sinatra/base'
require 'sinatra/mapper'

module MyApp < Sinatra::Base
    register Sinatra::Mapper

    map '/api/1.0'

    get '/foo'
        "Bar #{request.path_info}"
    end
end

With such an application going to /api/1.0/foo should display "Bar /api/1.0/foo"

Something went wrong with that request. Please try again.