summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-02-06 10:28:03 +0100
committerJames Lopez <james@jameslopez.es>2017-02-07 10:52:01 +0100
commit014db24aae36370f4468db3fe282bc9add1c81fd (patch)
tree99fd3926b6cddb46b1d81d306c6e98afbc5a55c7 /lib
parent1bbc99f1c83b29f3ec8626ecebe773e7a46b1952 (diff)
downloadgitlab-ce-014db24aae36370f4468db3fe282bc9add1c81fd.tar.gz
update Grape routes to work with current version of Grape
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/grape.rake8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/tasks/grape.rake b/lib/tasks/grape.rake
index 9980e0b7984..f13812cec92 100644
--- a/lib/tasks/grape.rake
+++ b/lib/tasks/grape.rake
@@ -2,7 +2,13 @@ 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)
+ if options[:settings][:description]
+ options[:settings][:description][:description]
+ end || ''
+ end
end