debian-mirror-gitlab/lib/tasks/grape.rake
2021-03-11 19:13:27 +05:30

14 lines
391 B
Ruby

# frozen_string_literal: true
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