|
| 1 | +# frozen_string_literal: true |
| 2 | + |
1 | 3 | # NOTE: only doing this in development as some production environments (Heroku)
|
2 | 4 | # NOTE: are sensitive to local FS writes, and besides -- it's just not proper
|
3 | 5 | # NOTE: to have a dev-mode tool do its thing in production.
|
4 | 6 | if Rails.env.development?
|
5 | 7 | require 'annotate'
|
6 |
| - task :set_annotation_options do |
| 8 | + task set_annotation_options: :environment do |
7 | 9 | # You can override any of these by setting an environment variable of the
|
8 | 10 | # same name.
|
9 | 11 | Annotate.set_defaults(
|
10 |
| - 'active_admin' => 'false', |
11 |
| - 'additional_file_patterns' => [], |
12 |
| - 'routes' => 'false', |
13 |
| - 'models' => 'true', |
14 |
| - 'position_in_routes' => 'before', |
15 |
| - 'position_in_class' => 'before', |
16 |
| - 'position_in_test' => 'before', |
17 |
| - 'position_in_fixture' => 'before', |
18 |
| - 'position_in_factory' => 'before', |
19 |
| - 'position_in_serializer' => 'before', |
20 |
| - 'show_foreign_keys' => 'true', |
21 |
| - 'show_complete_foreign_keys' => 'false', |
22 |
| - 'show_indexes' => 'true', |
23 |
| - 'simple_indexes' => 'false', |
24 |
| - 'model_dir' => 'app/models', |
25 |
| - 'root_dir' => '', |
26 |
| - 'include_version' => 'false', |
27 |
| - 'require' => '', |
28 |
| - 'exclude_tests' => 'false', |
29 |
| - 'exclude_fixtures' => 'false', |
30 |
| - 'exclude_factories' => 'false', |
31 |
| - 'exclude_serializers' => 'false', |
32 |
| - 'exclude_scaffolds' => 'true', |
33 |
| - 'exclude_controllers' => 'true', |
34 |
| - 'exclude_helpers' => 'true', |
35 |
| - 'exclude_sti_subclasses' => 'false', |
36 |
| - 'ignore_model_sub_dir' => 'false', |
37 |
| - 'ignore_columns' => nil, |
38 |
| - 'ignore_routes' => nil, |
39 |
| - 'ignore_unknown_models' => 'false', |
40 |
| - 'hide_limit_column_types' => 'integer,bigint,boolean', |
41 |
| - 'hide_default_column_types' => 'json,jsonb,hstore', |
42 |
| - 'skip_on_db_migrate' => 'false', |
43 |
| - 'format_bare' => 'true', |
44 |
| - 'format_rdoc' => 'false', |
45 |
| - 'format_yard' => 'false', |
46 |
| - 'format_markdown' => 'false', |
47 |
| - 'sort' => 'false', |
48 |
| - 'force' => 'false', |
49 |
| - 'frozen' => 'false', |
50 |
| - 'classified_sort' => 'true', |
51 |
| - 'trace' => 'false', |
52 |
| - 'wrapper_open' => nil, |
53 |
| - 'wrapper_close' => nil, |
54 |
| - 'with_comment' => 'true' |
| 12 | + 'active_admin' => 'false', |
| 13 | + 'additional_file_patterns' => [], |
| 14 | + 'routes' => 'false', |
| 15 | + 'models' => 'true', |
| 16 | + 'position_in_routes' => 'before', |
| 17 | + 'position_in_class' => 'before', |
| 18 | + 'position_in_test' => 'before', |
| 19 | + 'position_in_fixture' => 'before', |
| 20 | + 'position_in_factory' => 'before', |
| 21 | + 'position_in_serializer' => 'before', |
| 22 | + 'show_foreign_keys' => 'true', |
| 23 | + 'show_complete_foreign_keys' => 'false', |
| 24 | + 'show_indexes' => 'true', |
| 25 | + 'simple_indexes' => 'false', |
| 26 | + 'model_dir' => 'app/models', |
| 27 | + 'root_dir' => '', |
| 28 | + 'include_version' => 'false', |
| 29 | + 'require' => '', |
| 30 | + 'exclude_tests' => 'false', |
| 31 | + 'exclude_fixtures' => 'false', |
| 32 | + 'exclude_factories' => 'false', |
| 33 | + 'exclude_serializers' => 'false', |
| 34 | + 'exclude_scaffolds' => 'true', |
| 35 | + 'exclude_controllers' => 'true', |
| 36 | + 'exclude_helpers' => 'true', |
| 37 | + 'exclude_sti_subclasses' => 'false', |
| 38 | + 'ignore_model_sub_dir' => 'false', |
| 39 | + 'ignore_columns' => nil, |
| 40 | + 'ignore_routes' => nil, |
| 41 | + 'ignore_unknown_models' => 'false', |
| 42 | + 'hide_limit_column_types' => 'integer,bigint,boolean', |
| 43 | + 'hide_default_column_types' => 'json,jsonb,hstore', |
| 44 | + 'skip_on_db_migrate' => 'false', |
| 45 | + 'format_bare' => 'true', |
| 46 | + 'format_rdoc' => 'false', |
| 47 | + 'format_yard' => 'false', |
| 48 | + 'format_markdown' => 'false', |
| 49 | + 'sort' => 'false', |
| 50 | + 'force' => 'false', |
| 51 | + 'frozen' => 'false', |
| 52 | + 'classified_sort' => 'true', |
| 53 | + 'trace' => 'false', |
| 54 | + 'wrapper_open' => nil, |
| 55 | + 'wrapper_close' => nil, |
| 56 | + 'with_comment' => 'true' |
55 | 57 | )
|
56 | 58 | end
|
57 | 59 |
|
|
0 commit comments