Sha256: 4fd264ffb23ecf5f535c963116bb802cb93d3076d1898c16a262e9f4d530b8e3

Contents?: true

Size: 894 Bytes

Versions: 6

Compression:

Stored size: 894 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'] ? ENV['require'].split(',') : []
  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

6 entries across 6 versions & 4 rubygems

Version Path
netsign-annotate-2.4.5 lib/tasks/annotate_models.rake
netsign-annotate-2.4.4 lib/tasks/annotate_models.rake
doubledrones-annotate-2.4.0.2 lib/tasks/annotate_models.rake
doubledrones-annotate-2.4.0.1 lib/tasks/annotate_models.rake
masa-iwasaki-annotate-2.4.2 lib/tasks/annotate_models.rake
annotate-2.4.0 lib/tasks/annotate_models.rake