Commit d9a6fe27 by Dmitry Lihachev

convert ENV[exclude_{fixtures,tests}] to options[exclude_{tests,fixtures}]

parent fffd1356
......@@ -167,7 +167,7 @@ module AnnotateModels
annotated = true
end
unless ENV['exclude_tests']
unless options[:exclude_tests]
[
File.join(UNIT_TEST_DIR, "#{model_name}_test.rb"), # test
File.join(SPEC_MODEL_DIR, "#{model_name}_spec.rb"), # spec
......@@ -177,7 +177,7 @@ module AnnotateModels
end
end
unless ENV['exclude_fixtures']
unless options[:exclude_fixtures]
[
File.join(EXEMPLARS_TEST_DIR, "#{model_name}_exemplar.rb"), # Object Daddy
File.join(EXEMPLARS_SPEC_DIR, "#{model_name}_exemplar.rb"), # Object Daddy
......
......@@ -9,6 +9,8 @@ task :annotate_models => :environment do
options[:model_dir] = ENV['model_dir']
options[:include_version] = ENV['include_version']
options[:require] = ENV['require'] ? ENV['require'].split(',') : []
options[:exclude_tests] = ENV['exclude_tests']
options[:exclude_fixtures] = ENV['exclude_fixtures']
AnnotateModels.do_annotations(options)
end
......
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