…e changed since the last time 'annotate' was run. This is huge for those of us who like to run 'annotate' frequently but don't want to update our VCS for all the models in our application each time we do. This required a few small modifications to the annotate_one_file, annotate, and do_annotations methods. Comments have been updated to reflect changes.
= In ruby, on windows = * A text file with CRLF or LF line endings will be opened with UNIX (LF) line endings in ruby. * When writing text to a file, ruby always uses CRLF line endings, regardless of the format of the line endings of the file to begin with. This causes an automatic conversion of all LF files to CRLF. If you check out a project that uses unix line endings, then run annotate_models (before this commit), you're SCM is going to want to commit every line of every model. = In ruby, on *nix / osx = - Strings are always read and written as text with LF line endings. ---- The end result is an endless tug-a-war over line-endings for collaborating windows and *nix developers. If you specify to write the files as binary ("wb"), both windows and *nix will output the text with LF line endings. Most editors on windows support this format, and if you're deploying to a linux server, you should be using this format anyways. This has solved the tug-a-war for me.
… applicable models. Typo: 'annotaion' -> 'annotation'. Don't say that class was annotated if annotation errored out. Add myself to README credits. Update README/example to use the schema version-less header. Rephrase "Nothing to annotate" --> "Nothing annotated"; makes more sense if there were none because they failed.
…s now also get annotated, added a task to remove the annotations
…. Still trying to figure this git stuff out ;) This reverts commit a7e0b8c.
…s that weren't namespaced. It's become a convention to clean up massive numbers of models by grouping them logically into subdirectories (e.g. putting everything related to finances under app/models/finances). This commit refactors the single line that retrieves the model class into a method that can properly check for alternative class names.