Commit 9ed9a56d by Alex Chaffee

update readme

parent 4bc53974
...@@ -41,9 +41,13 @@ Also, if you pass the -r option, it'll annotate routes.rb with the output of "ra ...@@ -41,9 +41,13 @@ Also, if you pass the -r option, it'll annotate routes.rb with the output of "ra
== INSTALL == INSTALL
Into Gemfile from rubygems.org:
gem 'annotate', ">=2.5.0.pre1"
Into Gemfile from Github: 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: Into environment gems From rubygems.org:
...@@ -51,10 +55,10 @@ Into environment gems From rubygems.org: ...@@ -51,10 +55,10 @@ Into environment gems From rubygems.org:
Into environment gems from Github checkout: Into environment gems from Github checkout:
git clone git://github.com/MrJoy/annotate_models.git annotate_models git clone git://github.com/ctran/annotate_models.git annotate_models
cd annotate_models cd annotate_models
rake build rake build
gem install pkg/annotate-*.gem gem install pkg/annotate-*.gem
== USAGE == USAGE
...@@ -63,23 +67,23 @@ Into environment gems from Github checkout: ...@@ -63,23 +67,23 @@ Into environment gems from Github checkout:
To annotate all your models, tests, fixtures, etc.: To annotate all your models, tests, fixtures, etc.:
cd /path/to/app cd /path/to/app
annotate_models annotate
To annotate your models and tests: To annotate your models and tests:
annotate_models --exclude fixtures annotate --exclude fixtures
To annotate just your models: To annotate just your models:
annotate_models --exclude tests,fixtures annotate --exclude tests,fixtures
To annotate routes.rb: To annotate routes.rb:
annotate_models -r annotate -r
To remove annotations: To remove annotations:
annotate_models -d annotate -d
To automatically annotate after running 'rake db:migrate', ensure you've added To automatically annotate after running 'rake db:migrate', ensure you've added
annotate_models to your Rails project's Gemfile, and run this: annotate_models to your Rails project's Gemfile, and run this:
...@@ -110,14 +114,15 @@ anywhere in the file: ...@@ -110,14 +114,15 @@ anywhere in the file:
-R, --require path Additional files to require before loading models -R, --require path Additional files to require before loading models
-e [tests,fixtures] Skip annotation of fixtures/factories/test files -e [tests,fixtures] Skip annotation of fixtures/factories/test files
--exclude --exclude
-n --no-sort Sort by column creation order rather than alphabetical order --sort Sort by alphabetical order rather than column creation order
== SORTING == SORTING
By default, columns will be sorted alphabetically so that the results of By default, columns will be sorted in database order (i.e. the order in which migrations were run).
annotation are consistent regardless of what order migrations are executed in.
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 == WARNING
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment