rake routes command on grape gem

At April 2013 I write a small article in Portuguese about rails rake routes command on grape gem. I will translate here:

First create a Rakefile:

desc "API Routes"
task :routes do
  MyProject::API.routes.each do |api|
    method = api.route_method.ljust(10)
    path = api.route_path
    puts "     #{method} #{path}"
  end
end

Don’t forget change MyProject::API to your class, não run:

$ rake routes
     GET        /resourceX(.:format)
     GET        /resourceX/:id(.:format)
     POST       /resourceX
     ...
 
121
Kudos
 
121
Kudos

Now read this

Manage golang dependencies

Using golang in these 2 months I think the most hard thing is manage dependencies, when I use golang only to test or have fun, normally, I don’t worries with dependencies problems. On Ruby, Java, Python and Nodejs ecosystem have (good)... Continue →