Commit c9ee6a41 by Alex Chaffee

improving README

parent 49e5fce3
== Fork of AnnotateModels
== Annotate (aka AnnotateModels)
I forked AnnotateModels to fix what I'm guessing is a bug - options (including position) were not being passed when annotating spec, test, or exemplar files. This resulted in my models having annotations at the bottom of my models but at the top of my specs, which was frustrating.
Add a comment summarizing the relevant portion of the current schema to the top or bottom of your...
This version of AnnotateModels will pass all options to the method annotate_one_file when annotating models and specs (or tests, or exemplars, whatever you use). Otherwise this version is exactly the same as the original!
* ActiveRecord models
* Fixture files
* Tests and Specs
* Object Daddy exemplars
== AnnotateModels
Add a comment summarizing the current schema to the bottom of each
ActiveRecord model, fixture file.
If you are using Object Daddy, it`ll annotate your example files too.
The schema comment looks like this:
# == Schema Info
#
......@@ -26,7 +24,7 @@ If you are using Object Daddy, it`ll annotate your example files too.
belongs_to :product
. . .
Annotates geometrical columns, geom type and srid, when using SpatialAdapter or PostgisAdapter:
It also annotates geometrical columns, geom type and srid, when using SpatialAdapter or PostgisAdapter:
# == Schema Info
#
......@@ -35,6 +33,8 @@ Annotates geometrical columns, geom type and srid, when using SpatialAdapter or
# 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".
== Warning
Note that this code will blow away the initial/final comment
......@@ -52,12 +52,14 @@ From rubyforge:
From github:
gem sources -a http://gems.github.com
sudo gem install ctran-annotate
git clone git://github.com/ctran/annotate_models.git annotate
cd annotate
rake gem
sudo gem install pkg/annotate-*.gem
== Usage
To annotate all your models, tests, and fixtures:
To annotate all your models, tests, fixtures, etc.:
cd /path/to/app
annotate
......
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