Sha256: 002e8a9c5087a3d970cafa4fb4bdc72d4686372ec32a423fd20c1c64eb2fa0e7

Contents?: true

Size: 857 Bytes

Versions: 13

Compression:

Stored size: 857 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[: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

13 entries across 13 versions & 2 rubygems

Version Path
annotate-2.7.0 lib/tasks/annotate_routes.rake
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/annotate-2.6.10/lib/tasks/annotate_routes.rake
annotate-2.6.10 lib/tasks/annotate_routes.rake
annotate-2.6.9 lib/tasks/annotate_routes.rake
annotate-2.6.8 lib/tasks/annotate_routes.rake
annotate-2.6.7 lib/tasks/annotate_routes.rake
annotate-2.6.6 lib/tasks/annotate_routes.rake
annotate-2.6.5 lib/tasks/annotate_routes.rake
annotate-2.6.3 lib/tasks/annotate_routes.rake
annotate-2.6.2 lib/tasks/annotate_routes.rake
annotate-2.6.1 lib/tasks/annotate_routes.rake
annotate-2.6.0 lib/tasks/annotate_routes.rake
annotate-2.6.0.beta2 lib/tasks/annotate_routes.rake