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
134b833e
Commit
134b833e
authored
Jun 09, 2017
by
Daniel Hanke
Committed by
Cuong Tran
Jun 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing complete-foreign-keys option (introduced in #476) to bin (#477)
parent
22d796c4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
.rubocop_todo.yml
.rubocop_todo.yml
+1
-1
README.rdoc
README.rdoc
+2
-0
annotate
bin/annotate
+6
-0
No files found.
.rubocop_todo.yml
View file @
134b833e
...
...
@@ -108,7 +108,7 @@ Metrics/AbcSize:
# Offense count: 3
# Configuration parameters: CountComments.
Metrics/BlockLength
:
Max
:
1
34
Max
:
1
40
# Offense count: 2
Metrics/BlockNesting
:
...
...
README.rdoc
View file @
134b833e
...
...
@@ -184,6 +184,8 @@ you can do so with a simple environment variable, instead of editing the
-m, --show-migration Include the migration version number in the annotation
-i, --show-indexes List the table's database indexes in the annotation
-k, --show-foreign-keys List the table's foreign key constraints in the annotation
--ck, --complete-foreign-keys
Complete foreign key names in the annotation
-s, --simple-indexes Concat the column's related indexes in the annotation
--model-dir dir Annotate model files stored in dir rather than app/models, separate multiple dirs with commas
--ignore-model-subdirects Ignore subdirectories of the models directory
...
...
bin/annotate
View file @
134b833e
...
...
@@ -107,6 +107,12 @@ OptionParser.new do |opts|
ENV
[
'show_foreign_keys'
]
=
'yes'
end
opts
.
on
(
'--ck'
,
'--complete-foreign-keys'
,
'Complete foreign key names in the annotation'
)
do
ENV
[
'show_foreign_keys'
]
=
'yes'
ENV
[
'show_complete_foreign_keys'
]
=
'yes'
end
opts
.
on
(
'-i'
,
'--show-indexes'
,
"List the table's database indexes in the annotation"
)
do
ENV
[
'show_indexes'
]
=
'yes'
...
...
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