Galago
Galago is an API micro framework for Ruby. I am building it to gain more appreciation for existing tools.
Installation
Add this line to your application's Gemfile:
gem 'galago'
And then execute:
$ bundle
Or install it yourself as:
$ gem install galago
Usage
module GitHub::Application < Galago::Application
routes do
get '/users' do
users = User.all
end
post '/users' do
user = User.create! params['user']
end
patch '/users/:name' do
user = User.find_by_name params['name']
user.update! params['user']
end
put '/users/:name' do
user = User.find_by_name params['name']
user.update! params['user']
end
delete '/users/:name' do
user = User.find_by_name params['name']
user.destroy!
end
end
end
run GitHub::Application
Contributing
- Fork it
- 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