Add this line to your application's Gemfile:
gem 'brocat', github: "thejchap/brocat"
And then execute:
$ bundle
THE MOST BADASS DSL FOR MAKING WEB APPS
IF YOU MAKE A FILE CALLED, FOR EXAMPLE sup.rb
WITH THIS STUFF IN IT:
require 'rubygems'
require 'bundler/setup'
require 'brocat'
root { "Sup" } # http://localhost:1234
api do
get(:sup) { "Whatup" } # http://localhost:1234/sup
delete(:sup) { "Damnit" } # DELETE http://localhost:1234/sup
namespace :cats do
get(:all) { "Sup here too" } # http://localhost:1234/api/cats/all
namespace :bro do
get(:cat) { "Yeah I have my own URL" } # http://localhost:1234/api/cats/bro/cat
end
end
end
THEN RUN: ruby sup.rb
YOU WILL WIN
- Fork it ( http://github.com/thejchap/brocat/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request