About

Want to build Web services in the Resource Oriented Architecture style? With resource_sinatra, success is all but guaranteed, provided that you are using a Sinatra + MongoMapper stack.

Installation

It might not be a bad idea to make sure you are running the latest RubyGems:

sudo gem update --system

You will need gemcutter if you don't have it already:

gem install gemcutter
gem tumble

I recommend a user-level install:

gem install resource_sinatra

Note: in general, beware of sudo gem install <project_name> -- it gives elevated privileges. Do you trust <project name>? Better to be safe and use a local install to ~/.gem.

Usage

For a basic example of what this looks like when integrated into a real-world Sinatra app, see /examples/datacatalog.

History

This code was extracted from the National Data Catalog, a project of the Sunlight Labs.