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
22d796c4
Commit
22d796c4
authored
Jun 05, 2017
by
Steve Klebanoff
Committed by
Cuong Tran
Jun 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix show_complete_foreign_keys setting (#475)
* add show_complete_foreign_keys as setting * test for show_complete_foreign_keys setting
parent
c24f64c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
annotate.rb
lib/annotate.rb
+2
-1
annotate_models_spec.rb
spec/annotate/annotate_models_spec.rb
+15
-0
No files found.
lib/annotate.rb
View file @
22d796c4
...
...
@@ -30,7 +30,8 @@ module Annotate
:show_indexes
,
:simple_indexes
,
:include_version
,
:exclude_tests
,
:exclude_fixtures
,
:exclude_factories
,
:ignore_model_sub_dir
,
:format_bare
,
:format_rdoc
,
:format_markdown
,
:sort
,
:force
,
:trace
,
:timestamp
,
:exclude_serializers
,
:classified_sort
,
:show_foreign_keys
,
:timestamp
,
:exclude_serializers
,
:classified_sort
,
:show_foreign_keys
,
:show_complete_foreign_keys
,
:exclude_scaffolds
,
:exclude_controllers
,
:exclude_helpers
,
:exclude_sti_subclasses
,
:ignore_unknown_models
].
freeze
...
...
spec/annotate/annotate_models_spec.rb
View file @
22d796c4
...
...
@@ -484,6 +484,21 @@ EOS
EOS
end
describe
'#set_defaults'
do
it
'should default show_complete_foreign_keys to false'
do
expect
(
Annotate
.
true?
(
ENV
[
'show_complete_foreign_keys'
])).
to
be
(
false
)
end
it
'should be able to set show_complete_foreign_keys to true'
do
Annotate
.
set_defaults
(
'show_complete_foreign_keys'
=>
'true'
)
expect
(
Annotate
.
true?
(
ENV
[
'show_complete_foreign_keys'
])).
to
be
(
true
)
end
after
:each
do
ENV
.
delete
(
'show_complete_foreign_keys'
)
end
end
describe
'#get_schema_info with custom options'
do
def
self
.
when_called_with
(
options
=
{})
expected
=
options
.
delete
(
:returns
)
...
...
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