README.rdoc in annotate-2.5.0.pre1 vs README.rdoc in annotate-2.5.0.pre2
- old
+ new
@@ -39,49 +39,53 @@
Also, if you pass the -r option, it'll annotate routes.rb with the output of "rake routes".
== INSTALL
+Into Gemfile from rubygems.org:
+
+ gem 'annotate', ">=2.5.0.pre1"
+
Into Gemfile from Github:
- gem 'annotate', :git => 'git://github.com/MrJoy/annotate_models.git'
+ gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git'
Into environment gems From rubygems.org:
gem install annotate
Into environment gems from Github checkout:
- git clone git://github.com/MrJoy/annotate_models.git annotate_models
- cd annotate_models
- rake build
- gem install pkg/annotate-*.gem
+ git clone git://github.com/ctran/annotate_models.git annotate_models
+ cd annotate_models
+ rake build
+ gem install pkg/annotate-*.gem
== USAGE
(If you used the Gemfile install, prefix the below commands with `bundle exec`.)
To annotate all your models, tests, fixtures, etc.:
cd /path/to/app
- annotate_models
+ annotate
To annotate your models and tests:
- annotate_models --exclude fixtures
+ annotate --exclude fixtures
To annotate just your models:
- annotate_models --exclude tests,fixtures
+ annotate --exclude tests,fixtures
To annotate routes.rb:
- annotate_models -r
+ annotate -r
To remove annotations:
- annotate_models -d
+ annotate -d
To automatically annotate after running 'rake db:migrate', ensure you've added
annotate_models to your Rails project's Gemfile, and run this:
rails g annotate_models:install
@@ -101,25 +105,28 @@
-d, --delete Remove annotations from all model files
-p, --position [before|after] Place the annotations at the top (before) or the bottom (after) of the model file
-r, --routes Annotate routes.rb with the output of 'rake routes'
-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 indexes for the table in the annotation
- -s, --simple-indexes Include information about indexes inline with the relevant column
+ -i, --show-indexes List the table's database indexes in the annotation
+ -s, --simple-indexes Concat the column's related indexes in the annotation
--model-dir dir Annotate model files stored in dir rather than app/models
- --ignore-model-subdirs Ignore sub-directories of the models directory.
+ --ignore-model-subdirects Ignore subdirectories of the models directory
+ --sort Sort columns alphabetically, rather than in creation order
-R, --require path Additional files to require before loading models
- -e [tests,fixtures] Skip annotation of fixtures/factories/test files
- --exclude
- -n --no-sort Sort by column creation order rather than alphabetical order
+ -e, --exclude [tests,fixtures] Do not annotate fixtures, test files, or both
+ -f [bare|rdoc|markdown], Render Schema Infomation as plain/RDoc/Markdown
+ --format
+ --force Force new annotations even if there are no changes.
+
== SORTING
-By default, columns will be sorted alphabetically so that the results of
-annotation are consistent regardless of what order migrations are executed in.
+By default, columns will be sorted in database order (i.e. the order in which migrations were run).
-If you prefer the old behavior, use --no-sort.
+If you prefer to sort alphabetically so that the results of
+annotation are consistent regardless of what order migrations are executed in, use --sort.
== WARNING
Note that this code will blow away the initial/final comment
block in your models if it looks like it was previously added
@@ -163,7 +170,14 @@
- Gavin Montague - http://github.com/govan
- Alexander Semyonov - http://github.com/rotuka
- Nathan Brazil - http://github.com/bitaxis
- Ian Duggan http://github.com/ijcd
- Jon Frisby http://github.com/mrjoy
+- Tsutomu Kuroda
+- Kevin Moore
+- Philip Hallstrom
+- Brent Greeff
+- Paul Alexander
+- Dmitry Lihachev
+- qichunren
and many others that I may have missed to add.