gitlab-org--gitlab-foss/lib/tasks/grape.rake
2017-02-07 11:00:47 +01:00

12 lines
360 B
Ruby

namespace :grape do
desc 'Print compiled grape routes'
task routes: :environment do
API::API.routes.each do |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