
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
_
/_| _/__/_
( |/)/)()/(//(-
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.
class LineItem < ActiveRecord::Base belongs_to :product . . .
Annotates geometrical columns, geom type and srid, when using SpatialAdapter or PostgisAdapter:
== INSTALL
sudo gem install nofxx-annotate
== Warning
Note that this code will blow away the initial/final comment block in your models if it looks like it was previously added by annotate models, so you don't want to add additional text to an automatically created comment block.
* * Back up your model files before using... * *
== Install
From rubyforge:
sudo gem install annotate
From github:
gem sources -a http://gems.github.com sudo gem install ctran-annotate
== Usage
To annotate all your models:
cd /path/to/app annotate
To annotate routes.rb:
annotate -r
More:
annotate -h
To migrate & annotate (TODO):
Options:
Annotate on the head of the file:
annotate -p [before|after]
== WARNING
Note that this code will blow away the initial/final comment block in your models if it looks like it was previously added by annotate models, so you don't want to add additional text to an automatically created comment block.
* * Back up your model files before using... * *
== LINKS
Factory Girl => http://github.com/thoughtbot/factory_girl (NOT IMPLEMENTED)
Object Daddy => http://github.com/flogic/object_daddy
SpatialAdapter => http://github.com/pdeffendol/spatial_adapter
PostgisAdapter => http://github.com/nofxx/postgis_adapter
== TODO
More options:
Usage: annotate [options] -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 table's database indexes in the annotation --model-dir dir Annotate model files stored in dir rather than app/models
== LICENSE:
Released under the same license as Ruby. No Support. No Warranty.
== Author:
Original code by:
Dave Thomas -- Pragmatic Programmers, LLC
AnnotateModels mods by:
Alexander Semyonov ( http://github.com/rotuka/annotate_models )
AnnotateRoutes originally by:
Gavin Montague ( http://github.com/govan/annotate-routes )
== Forked from:
http://github.com/ctran/annotate_models
== Modifications
alex@pivotallabs.com ======= Modifications by:
Alex Chaffee - http://github.com/alexch - alex@pivotallabs.com
Cuong Tran - http://github.com/ctran
Jack Danger - http://github.com/JackDanger
Michael Bumann - http://github.com/bumi
Henrik Nyh - http://github.com/henrik
Marcos Piccinini - http://github.com/nofxx
and many others that I may have missed to add.
== This fork
Marcos Piccinini ( http://github.com/nofxx/annotate )
FAQs
Unknown package
We found that nofxx-annotate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.