summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@gitlab.com>2017-02-07 11:24:56 +0000
committerJames Lopez <james@gitlab.com>2017-02-07 11:24:56 +0000
commita965edb89d3c260394ffc987832a469e7740415d (patch)
tree73e4b36ccfa3e1fda2a98f53e687d76282e1f39f
parent55d55e3854e5e955e96b131c1350218a36e68b7b (diff)
parenta130dc6fd8fe498dd9c64110524dcc3210803c2f (diff)
downloadgitlab-ce-a965edb89d3c260394ffc987832a469e7740415d.tar.gz
Merge branch 'fix/grape-routes' into 'master'
Update Grape routes to work with current version of Grape See merge request !8992
-rw-r--r--lib/tasks/grape.rake6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/tasks/grape.rake b/lib/tasks/grape.rake
index 9980e0b7984..ea2698da606 100644
--- a/lib/tasks/grape.rake
+++ b/lib/tasks/grape.rake
@@ -2,7 +2,11 @@ namespace :grape do
desc 'Print compiled grape routes'
task routes: :environment do
API::API.routes.each do |route|
- puts route
+ puts "#{route.options[:method]} #{route.path} - #{route_description(route.options)}"
end
end
+
+ def route_description(options)
+ options[:settings][:description][:description] if options[:settings][:description]
+ end
end