From c1bebd4c4670ce1d5eae712eaba0153774cb37c8 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Tue, 10 Nov 2015 19:40:44 -0200 Subject: [PATCH] Move grape_routes task to its own file --- Rakefile | 12 ------------ lib/tasks/grape_routes.rb | 10 ++++++++++ 2 files changed, 10 insertions(+), 12 deletions(-) create mode 100644 lib/tasks/grape_routes.rb diff --git a/Rakefile b/Rakefile index 5d8df4a..0bd1e97 100644 --- a/Rakefile +++ b/Rakefile @@ -21,15 +21,3 @@ end plugins_tasks = Dir.glob("config/plugins/*/{tasks,lib/tasks,rails/tasks}/**/*.rake").sort + Dir.glob("config/plugins/*/vendor/plugins/*/{tasks,lib/tasks,rails/tasks}/**/*.rake").sort plugins_tasks.each{ |ext| load ext } - - -desc "Print out grape routes" -task :grape_routes => :environment do - #require 'api/api.rb' - Noosfero::API::API.routes.each do |route| - puts route - method = route.route_method - path = route.route_path - puts " #{method} #{path}" - end -end diff --git a/lib/tasks/grape_routes.rb b/lib/tasks/grape_routes.rb new file mode 100644 index 0000000..262b25d --- /dev/null +++ b/lib/tasks/grape_routes.rb @@ -0,0 +1,10 @@ +desc "Print out grape routes" +task :grape_routes => :environment do + #require 'api/api.rb' + Noosfero::API::API.routes.each do |route| + puts route + method = route.route_method + path = route.route_path + puts " #{method} #{path}" + end +end -- libgit2 0.21.2