Created
June 18, 2014 12:22
-
-
Save sue445/2c6d0d7ddce9fdb64632 to your computer and use it in GitHub Desktop.
Auto annotate on Padrino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
# Add to Raketask after PadrinoTasks.init | |
require "padrino-core" | |
if Padrino.env == :development | |
Rake::Task['ar:migrate'].enhance do | |
Rake::Task['annotate'].invoke | |
end | |
Rake::Task['ar:rollback'].enhance do | |
Rake::Task['annotate'].invoke | |
end | |
end | |
=end | |
desc "annotate models" | |
task :annotate => :environment do | |
require 'annotate/annotate_models' | |
AnnotateModels.do_annotations( | |
model_dir: "#{__dir__}/../../models/", | |
exclude_fixtures: true, | |
exclude_factories: true, | |
exclude_tests: true, | |
show_indexes: true, | |
format_markdown: false | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment