0.0
No commit activity in last 3 years
No release in over 3 years
Sinatra extension that helps organize routes in separate files
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.0
 Project Readme

sinatra-routes

sinatra-routes - a Sinatra exentsion for routing. It helps you to place routes in separate files, grouped by their goal.

Installation

gem install sinatra-routes

Usage example

# server.rb

require 'rubygems'
require 'sinatra/base'
require 'sinatra/routes'

Server < Sinatra::Base
  register Sinatra::Routes
end

require 'routes/users.rb'

Server.run!

Now you cal place your routes in separate file.

# routes/users.rb

routes do
  get '/users' do
    # render '/users'
  end
end

Author

Dmitry Maksimov dmtmax@gmail.com