Commit 5356f242 by miyucy

remove exclude_factories option

parent d153d317
......@@ -200,15 +200,6 @@ module AnnotateModels
end
end
unless ENV['exclude_factories']
[
File.join(FACTORY_GIRL_SPEC_DIR, "#{model_name}_factory.rb"), # spec/factories
File.join(FACTORY_GIRL_TEST_DIR, "#{model_name}_factory.rb"), # test/factories
].each do |file|
annotate_one_file(file, info, options_with_position(options, :position_in_factory))
end
end
annotated
end
......@@ -319,15 +310,12 @@ module AnnotateModels
File.join(SPEC_MODEL_DIR, "#{klass.name.underscore}_spec.rb"),
File.join(FIXTURE_TEST_DIR, "#{klass.table_name}.yml"), # fixture
File.join(FIXTURE_SPEC_DIR, "#{klass.table_name}.yml"), # fixture
File.join(FACTORY_GIRL_SPEC_DIR, "#{klass.name.underscore}_factory.rb"),
File.join(FACTORY_GIRL_TEST_DIR, "#{klass.name.underscore}_factory.rb"),
].each do |file|
remove_annotation_of_file(file) if File.exist?(file)
end
[ File.join(FACTORY_GIRL_SPEC_DIR, "#{klass.name.underscore}_factory.rb"),
File.join(FACTORY_GIRL_TEST_DIR, "#{klass.name.underscore}_factory.rb")].each do |file|
remove_annotation_of_file(file) if File.exist?(file)
end
end
rescue Exception => e
puts "Unable to annotate #{file}: #{e.message}"
......
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