README.rdoc in annotate-2.7.0 vs README.rdoc in annotate-2.7.1

- old
+ new

@@ -1,9 +1,12 @@ == Annotate (aka AnnotateModels) {<img src="https://badge.fury.io/rb/annotate.svg" alt="Gem Version" />}[http://badge.fury.io/rb/annotate] +{<img src="https://img.shields.io/gem/dt/annotate.svg?style=flat" />}[https://rubygems.org/gems/annotate] {<img src="https://travis-ci.org/ctran/annotate_models.png" />}[https://travis-ci.org/ctran/annotate_models] +{<img src="https://coveralls.io/repos/ctran/annotate_models/badge.svg?branch=develop" />}[https://coveralls.io/r/ctran/annotate_models?branch=develop] +{<img src="https://codeclimate.com/github/ctran/annotate_models/badges/gpa.svg" />}[https://codeclimate.com/github/ctran/annotate_models] {<img src="https://gemnasium.com/ctran/annotate_models.png" />}[https://gemnasium.com/ctran/annotate_models] Add a comment summarizing the current schema to the top or bottom of each of your... @@ -42,11 +45,11 @@ # # local :geometry point, 4326 # path :geometry line_string, 4326 Also, if you pass the -r option, it'll annotate routes.rb with the output of -+rake routes+. +<code>rake routes</code>. == Install Into Gemfile from rubygems.org: @@ -69,11 +72,11 @@ gem install pkg/annotate-*.gem == Usage -(If you used the Gemfile install, prefix the below commands with +bundle exec+.) +(If you used the Gemfile install, prefix the below commands with <code>bundle exec</code>.) === Usage in Rails To annotate all your models, tests, fixtures, and factories: @@ -98,11 +101,11 @@ To remove routes.rb annotations: annotate --routes --delete -To automatically annotate every time you run +db:migrate+, either run +rails g annotate:install+ or add +Annotate.load_tasks+ to your `Rakefile`. See the [configuration in Rails](#configuration-in-rails) section for more info. +To automatically annotate every time you run <code>db:migrate</code>, either run <code>rails g annotate:install</code> or add +Annotate.load_tasks+ to your `Rakefile`. See the {configuration in Rails}[link:README.rdoc#configuration-in-rails] section for more info. === Usage Outside of Rails Everything above applies, except that +--routes+ is not meaningful, and you will probably need to explicitly set one or more +--require+ option(s), and/or one @@ -134,21 +137,21 @@ rake annotate_models # Add schema information (as comments) to model and fixture files rake annotate_routes # Adds the route map to routes.rb rake remove_annotation # Remove schema information from model and fixture files By default, once you've generated a configuration file, annotate will be -executed whenever you run +rake db:migrate+ (but only in development mode). +executed whenever you run <code>rake db:migrate</code> (but only in development mode). If you want to disable this behavior permanently, edit the +.rake+ file and change: 'skip_on_db_migrate' => 'false', To: 'skip_on_db_migrate' => 'true', -If you want to run +rake db:migrate+ as a one-off without running annotate, +If you want to run <code>rake db:migrate</code> as a one-off without running annotate, you can do so with a simple environment variable, instead of editing the +.rake+ file: skip_on_db_migrate=1 rake db:migrate @@ -173,9 +176,10 @@ --w, --wrapper STR Wrap annotation with the text passed as parameter. If --w option is used, the same text will be used as opening and closing --wo, --wrapper-open STR Annotation wrapper opening. --wc, --wrapper-close STR Annotation wrapper closing -r, --routes Annotate routes.rb with the output of 'rake routes' + -aa, --active-admin Annotate all activeadmin models -v, --version Show the current version of this gem -m, --show-migration Include the migration version number in the annotation -i, --show-indexes List the table's database indexes in the annotation -k, --show-foreign-keys List the table's foreign key constraints in the annotation -s, --simple-indexes Concat the column's related indexes in the annotation