Skip to content

Commit

Permalink
Add additional_file_paths to CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwjackson committed Jul 10, 2019
1 parent 8bb7a92 commit 7c6044c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ you can do so with a simple environment variable, instead of editing the
== Options

Usage: annotate [options] [model_file]*
-a, --additional_file_paths Additional file paths or globs to annotate
-d, --delete Remove annotations from all model files or the routes.rb file
-p [before|top|after|bottom], Place the annotations at the top (before) or the bottom (after) of the model/test/fixture/factory/route/serializer file(s)
--position
Expand Down
4 changes: 4 additions & 0 deletions bin/annotate
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ positions = %w(before top after bottom)
OptionParser.new do |opts|
opts.banner = 'Usage: annotate [options] [model_file]*'

opts.on('-a', '--additional_file_patterns', Array, "Additional file paths or globs to annotate") do |additional_file_patterns|
ENV['additional_file_patterns'] = additional_file_patterns
end

opts.on('-d', '--delete', 'Remove annotations from all model files or the routes.rb file') do
target_action = :remove_annotations
end
Expand Down

0 comments on commit 7c6044c

Please sign in to comment.