<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -51,11 +51,19 @@ From github:
 
 == Usage
 
-To annotate all your models:
+To annotate all your models, tests, and fixtures:
 
   cd /path/to/app
   annotate
 
+To annotate your models and tests:
+
+  annotate --exclude fixtures
+
+To annotate just your models:
+
+  annotate --exclude tests,fixtures
+
 To annotate routes.rb:
 
   annotate -r
@@ -69,6 +77,7 @@ More options:
       -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
+      -e, --exclude [fixtures,tests]   Do not annotate fixtures, test files, or both
           --model-dir dir              Annotate model files stored in dir rather than app/models
 
 == LICENSE:</diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -13,6 +13,9 @@ OptionParser.new do |opts|
   opts.on('-v', '--version', &quot;Show the current version of this gem&quot;) { puts &quot;Annotate v#{Annotate::VERSION}&quot;; exit }
   opts.on('-m', '--show-migration', &quot;Include the migration version number in the annotation&quot;) { ENV['include_version'] = &quot;yes&quot; }
   opts.on('-i', '--show-indexes', &quot;List the table's database indexes in the annotation&quot;) { ENV['show_indexes'] = &quot;yes&quot; }
+  opts.on('-e', '--exclude [tests,fixtures]', Array, &quot;Do not annotate fixtures, test files, or both&quot;) do |exclusions|
+    exclusions.each { |exclusion| ENV[&quot;exclude_#{exclusion}&quot;] = &quot;yes&quot; }
+  end
   opts.on('--model-dir dir', &quot;Annotate model files stored in dir rather than app/models&quot;) {|dir| ENV['model_dir'] = dir }
 end.parse!
 </diff>
      <filename>bin/annotate</filename>
    </modified>
    <modified>
      <diff>@@ -148,17 +148,24 @@ module AnnotateModels
         annotated = true
       end
 
+      annotate_tests(info, model_name) unless ENV['exclude_tests']
+      annotate_fixtures(info, klass, options) unless ENV['exclude_fixtures']
+      annotated
+    end
+
+    def annotate_tests(info, model_name)
       [
-        File.join(UNIT_TEST_DIR,      &quot;#{model_name}_test.rb&quot;), # test
-        File.join(SPEC_MODEL_DIR,     &quot;#{model_name}_spec.rb&quot;), # spec
-        File.join(EXEMPLARS_DIR,      &quot;#{model_name}_exemplar.rb&quot;),   # Object Daddy     
+              File.join(UNIT_TEST_DIR,      &quot;#{model_name}_test.rb&quot;), # test
+              File.join(SPEC_MODEL_DIR,     &quot;#{model_name}_spec.rb&quot;), # spec
+              File.join(EXEMPLARS_DIR,      &quot;#{model_name}_exemplar.rb&quot;),   # Object Daddy
       ].each { |file| annotate_one_file(file, info) }
+    end
 
+    def annotate_fixtures(info, klass, options)
       FIXTURE_DIRS.each do |dir|
-        fixture_file_name = File.join(dir,klass.table_name + &quot;.yml&quot;)
+        fixture_file_name = File.join(dir, klass.table_name + &quot;.yml&quot;)
         annotate_one_file(fixture_file_name, info, options.merge(:position=&gt;(options[:position_in_fixture] || options[:position]))) if File.exist?(fixture_file_name)
       end
-      annotated
     end
 
     # Return a list of the model files to annotate. If we have
@@ -245,7 +252,7 @@ module AnnotateModels
             
             model_file_name = File.join(model_dir, file)
             remove_annotation_of_file(model_file_name)
-            
+
             FIXTURE_DIRS.each do |dir|
               fixture_file_name = File.join(dir,klass.table_name + &quot;.yml&quot;)
               remove_annotation_of_file(fixture_file_name) if File.exist?(fixture_file_name)</diff>
      <filename>lib/annotate/annotate_models.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8ecd23ee73b9eb281c110deac828947d67e953be</id>
    </parent>
  </parents>
  <author>
    <name>Neal Clark</name>
    <email>nclark@thrownproject.org</email>
  </author>
  <url>http://github.com/nclark/annotate_models/commit/d430889dc306489da5daf344e4b16cf8dae84a70</url>
  <id>d430889dc306489da5daf344e4b16cf8dae84a70</id>
  <committed-date>2009-10-11T22:34:23-07:00</committed-date>
  <authored-date>2009-10-11T22:34:23-07:00</authored-date>
  <message>adding option to not annotate tests or fixtures</message>
  <tree>2823cadf8beefaa884384915f12005b4c708ff70</tree>
  <committer>
    <name>Neal Clark</name>
    <email>nclark@thrownproject.org</email>
  </committer>
</commit>
