From b7c0224fa3836a5521429344a80161349c2cb79d Mon Sep 17 00:00:00 2001 From: Alex Boyd Date: Fri, 8 May 2020 22:26:27 -0600 Subject: [PATCH] load :set_annotation_options before running :annotate_routes --- lib/tasks/annotate_routes.rake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/tasks/annotate_routes.rake b/lib/tasks/annotate_routes.rake index 3f3c7b143..ae6829337 100644 --- a/lib/tasks/annotate_routes.rake +++ b/lib/tasks/annotate_routes.rake @@ -1,6 +1,12 @@ +annotate_lib = File.expand_path(File.dirname(File.dirname(__FILE__))) + +unless ENV['is_cli'] + task :set_annotation_options + task annotate_routes: :set_annotation_options +end + desc "Adds the route map to routes.rb" task :annotate_routes => :environment do - annotate_lib = File.expand_path(File.dirname(File.dirname(__FILE__))) require "#{annotate_lib}/annotate/annotate_routes" options={}