Sha256: 847e3bf0987091b9227e4a4f1dd7bbed824f12069b7e2b65fa71cef39a7585b9
Contents?: true
Size: 931 Bytes
Versions: 2
Compression:
Stored size: 931 Bytes
Contents
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={} ENV['position'] = options[:position] = Annotate.fallback(ENV['position'], 'before') options[:position_in_routes] = Annotate.fallback(ENV['position_in_routes'], ENV['position']) options[:ignore_routes] = Annotate.fallback(ENV['ignore_routes'], nil) options[:require] = ENV['require'] ? ENV['require'].split(',') : [] AnnotateRoutes.do_annotations(options) end desc "Removes the route map from routes.rb" task :remove_routes => :environment do annotate_lib = File.expand_path(File.dirname(File.dirname(__FILE__))) require "#{annotate_lib}/annotate/annotate_routes" options={} options[:require] = ENV['require'] ? ENV['require'].split(',') : [] AnnotateRoutes.remove_annotations(options) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
annotate-2.7.2 | lib/tasks/annotate_routes.rake |
annotate-2.7.1 | lib/tasks/annotate_routes.rake |