gitlab-org--gitlab-foss/lib/tasks/grape.rake

13 lines
360 B
Ruby
Raw Normal View History

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)
2017-02-07 05:00:47 -05:00
options[:settings][:description][:description] if options[:settings][:description]
end
end