Sha256: 483d9bf2a92b4bac0d4a6158db41307f2d48cb1e110828409a0ca26aec8c8018
Contents?: true
Size: 1.12 KB
Versions: 2
Compression:
Stored size: 1.12 KB
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::Helpers.fallback(ENV['position'], 'before') options[:position_in_routes] = Annotate::Helpers.fallback(ENV['position_in_routes'], ENV['position']) options[:ignore_routes] = Annotate::Helpers.fallback(ENV['ignore_routes'], nil) options[:require] = ENV['require'] ? ENV['require'].split(',') : [] options[:wrapper_open] = Annotate::Helpers.fallback(ENV['wrapper_open'], ENV['wrapper']) options[:wrapper_close] = Annotate::Helpers.fallback(ENV['wrapper_close'], ENV['wrapper']) 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-3.1.1 | lib/tasks/annotate_routes.rake |
annotate-3.1.0 | lib/tasks/annotate_routes.rake |