From 014db24aae36370f4468db3fe282bc9add1c81fd Mon Sep 17 00:00:00 2001 From: James Lopez Date: Mon, 6 Feb 2017 10:28:03 +0100 Subject: update Grape routes to work with current version of Grape --- lib/tasks/grape.rake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.1