Sha256: 430a78c93590a893bd8f678dae91dc8d88f1e1a0bd876c128506d20f8c7f1f4d

Contents?: true

Size: 882 Bytes

Versions: 4

Compression:

Stored size: 882 Bytes

Contents

desc "Add schema information (as comments) to model and fixture files"
task :annotate_models => :environment do
  require 'annotate/annotate_models'
  options={}
  options[:position_in_class] = ENV['position_in_class'] || ENV['position'] || :before
  options[:position_in_fixture] = ENV['position_in_fixture'] || ENV['position']  || :before
  options[:show_indexes] = ENV['show_indexes']
  options[:simple_indexes] = ENV['simple_indexes']
  options[:model_dir] = ENV['model_dir']
  options[:include_version] = ENV['include_version']
  options[:require] = ENV['require'].split(',') rescue []
  AnnotateModels.do_annotations(options)
end

desc "Remove schema information from model and fixture files"
task :remove_annotation => :environment do
  require 'annotate/annotate_models'
  options={}
  options[:model_dir] = ENV['model_dir']
  AnnotateModels.remove_annotations(options)
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
nofxx-annotate-2.3.2 lib/tasks/annotate_models.rake
nofxx-annotate-3.0.1 lib/tasks/annotate_models.rake
nofxx-annotate-3.0.0 lib/tasks/annotate_models.rake
selleo-annotate-2.3.2 lib/tasks/annotate_models.rake