From 014db24aae36370f4468db3fe282bc9add1c81fd Mon Sep 17 00:00:00 2001 From: James Lopez Date: Mon, 6 Feb 2017 10:28:03 +0100 Subject: [PATCH 1/2] update Grape routes to work with current version of Grape --- lib/tasks/grape.rake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 From a130dc6fd8fe498dd9c64110524dcc3210803c2f Mon Sep 17 00:00:00 2001 From: James Lopez Date: Tue, 7 Feb 2017 11:00:47 +0100 Subject: [PATCH 2/2] added missed commit in rebase --- lib/tasks/grape.rake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/tasks/grape.rake b/lib/tasks/grape.rake index f13812cec92..ea2698da606 100644 --- a/lib/tasks/grape.rake +++ b/lib/tasks/grape.rake @@ -7,8 +7,6 @@ namespace :grape do end def route_description(options) - if options[:settings][:description] - options[:settings][:description][:description] - end || '' + options[:settings][:description][:description] if options[:settings][:description] end end