Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
annotate
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
annotate
Commits
9cf6e0d0
Commit
9cf6e0d0
authored
Oct 30, 2015
by
Cuong Tran
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #283 from kamilbielawski/accept-wrapper-default-params
Accept wrapper default params
parents
2e555f05
2c01787d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
annotate.rb
lib/annotate.rb
+7
-1
auto_annotate_models.rake
lib/generators/annotate/templates/auto_annotate_models.rake
+2
-0
annotate_models_spec.rb
spec/annotate/annotate_models_spec.rb
+1
-0
No files found.
lib/annotate.rb
View file @
9cf6e0d0
...
...
@@ -29,7 +29,7 @@ module Annotate
:timestamp
,
:exclude_serializers
,
:classified_sort
,
:show_foreign_keys
,
]
OTHER_OPTIONS
=
[
:ignore_columns
,
:skip_on_db_migrate
:ignore_columns
,
:skip_on_db_migrate
,
:wrapper_open
,
:wrapper_close
]
PATH_OPTIONS
=
[
:require
,
:model_dir
...
...
@@ -78,6 +78,12 @@ module Annotate
return
options
end
def
self
.
reset_options
[
POSITION_OPTIONS
,
FLAG_OPTIONS
,
PATH_OPTIONS
,
OTHER_OPTIONS
].
flatten
.
each
do
|
key
|
ENV
[
key
.
to_s
]
=
nil
end
end
def
self
.
skip_on_migration?
ENV
[
'skip_on_db_migrate'
]
=~
TRUE_RE
end
...
...
lib/generators/annotate/templates/auto_annotate_models.rake
View file @
9cf6e0d0
...
...
@@ -30,6 +30,8 @@ if Rails.env.development?
'sort'
=>
"false"
,
'force'
=>
"false"
,
'trace'
=>
"false"
,
'wrapper_open'
=>
nil
,
'wrapper_close'
=>
nil
,
})
end
...
...
spec/annotate/annotate_models_spec.rb
View file @
9cf6e0d0
...
...
@@ -479,6 +479,7 @@ end
mock_column
(
:name
,
:string
,
:limit
=>
50
)
])
@schema_info
=
AnnotateModels
.
get_schema_info
(
@klass
,
"== Schema Info"
)
Annotate
.
reset_options
end
def
write_model
file_name
,
file_content
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment