Skip to content

Commit 3199544

Browse files
Update Readme and accepted options in OptionParser
1 parent 9246f21 commit 3199544

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

README.rdoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,18 +154,18 @@ you can do so with a simple environment variable, instead of editing the
154154

155155
Usage: annotate [options] [model_file]*
156156
-d, --delete Remove annotations from all model files or the routes.rb file
157-
-p, --position [before|after] Place the annotations at the top (before) or the bottom (after) of the model/test/fixture/factory/routes file(s)
158-
--pc, --position-in-class [before|after]
157+
-p, --position [before|top|after|bottom] Place the annotations at the top (before) or the bottom (after) of the model/test/fixture/factory/routes file(s)
158+
--pc, --position-in-class [before|top|after|bottom]
159159
Place the annotations at the top (before) or the bottom (after) of the model file
160-
--pf, --position-in-factory [before|after]
160+
--pf, --position-in-factory [before|top|after|bottom]
161161
Place the annotations at the top (before) or the bottom (after) of any factory files
162-
--px, --position-in-fixture [before|after]
162+
--px, --position-in-fixture [before|top|after|bottom]
163163
Place the annotations at the top (before) or the bottom (after) of any fixture files
164-
--pt, --position-in-test [before|after]
164+
--pt, --position-in-test [before|top|after|bottom]
165165
Place the annotations at the top (before) or the bottom (after) of any test files
166-
--pr, --position-in-routes [before|after]
166+
--pr, --position-in-routes [before|top|after|bottom]
167167
Place the annotations at the top (before) or the bottom (after) of the routes.rb file
168-
--ps, --position-in-serializer [before|after]
168+
--ps, --position-in-serializer [before|top|after|bottom]
169169
Place the annotations at the top (before) or the bottom (after) of the serializer files
170170
-r, --routes Annotate routes.rb with the output of 'rake routes'
171171
-v, --version Show the current version of this gem

bin/annotate

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ OptionParser.new do |opts|
3232
target[:task] = :remove_annotations
3333
end
3434

35-
opts.on('-p', '--position [before|after]', ['before', 'after'],
35+
opts.on('-p', '--position [before|top|after|bottom]', ['before', 'top', 'after', 'bottom'],
3636
"Place the annotations at the top (before) or the bottom (after) of the model/test/fixture/factory/routes file(s)") do |p|
3737
ENV['position'] = p
3838
[
@@ -42,37 +42,37 @@ OptionParser.new do |opts|
4242
end
4343
end
4444

45-
opts.on('--pc', '--position-in-class [before|after]', ['before', 'after'],
45+
opts.on('--pc', '--position-in-class [before|top|after|bottom]', ['before', 'top', 'after', 'bottom'],
4646
"Place the annotations at the top (before) or the bottom (after) of the model file") do |p|
4747
ENV['position_in_class'] = p
4848
has_set_position['position_in_class'] = true
4949
end
5050

51-
opts.on('--pf', '--position-in-factory [before|after]', ['before', 'after'],
51+
opts.on('--pf', '--position-in-factory [before|top|after|bottom]', ['before', 'top', 'after', 'bottom'],
5252
"Place the annotations at the top (before) or the bottom (after) of any factory files") do |p|
5353
ENV['position_in_factory'] = p
5454
has_set_position['position_in_factory'] = true
5555
end
5656

57-
opts.on('--px', '--position-in-fixture [before|after]', ['before', 'after'],
57+
opts.on('--px', '--position-in-fixture [before|top|after|bottom]', ['before', 'top', 'after', 'bottom'],
5858
"Place the annotations at the top (before) or the bottom (after) of any fixture files") do |p|
5959
ENV['position_in_fixture'] = p
6060
has_set_position['position_in_fixture'] = true
6161
end
6262

63-
opts.on('--pt', '--position-in-test [before|after]', ['before', 'after'],
63+
opts.on('--pt', '--position-in-test [before|top|after|bottom]', ['before', 'top', 'after', 'bottom'],
6464
"Place the annotations at the top (before) or the bottom (after) of any test files") do |p|
6565
ENV['position_in_test'] = p
6666
has_set_position['position_in_test'] = true
6767
end
6868

69-
opts.on('--pr', '--position-in-routes [before|after]', ['before', 'after'],
69+
opts.on('--pr', '--position-in-routes [before|top|after|bottom]', ['before', 'top', 'after', 'bottom'],
7070
"Place the annotations at the top (before) or the bottom (after) of the routes.rb file") do |p|
7171
ENV['position_in_routes'] = p
7272
has_set_position['position_in_routes'] = true
7373
end
7474

75-
opts.on('--ps', '--position-in-serializer [before|after]', ['before', 'after'],
75+
opts.on('--ps', '--position-in-serializer [before|top|after|bottom]', ['before', 'top', 'after', 'bottom'],
7676
"Place the annotations at the top (before) or the bottom (after) of the serializer files") do |p|
7777
ENV['position_in_serializer'] = p
7878
has_set_position['position_in_serializer'] = true

0 commit comments

Comments
 (0)