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
be91e55f
Commit
be91e55f
authored
Jul 15, 2009
by
Jacqui Maher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass options to annotate_one_file for specs/tests/exemplars as well
parent
8ecd23ee
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
annotate_models.rb
lib/annotate/annotate_models.rb
+2
-1
No files found.
lib/annotate/annotate_models.rb
View file @
be91e55f
...
@@ -106,6 +106,7 @@ module AnnotateModels
...
@@ -106,6 +106,7 @@ module AnnotateModels
old_header
=
old_content
.
match
(
header
).
to_s
old_header
=
old_content
.
match
(
header
).
to_s
new_header
=
info_block
.
match
(
header
).
to_s
new_header
=
info_block
.
match
(
header
).
to_s
old_header
=
""
if
old_header
==
new_header
if
old_header
==
new_header
false
false
else
else
...
@@ -152,7 +153,7 @@ module AnnotateModels
...
@@ -152,7 +153,7 @@ module AnnotateModels
File
.
join
(
UNIT_TEST_DIR
,
"
#{
model_name
}
_test.rb"
),
# test
File
.
join
(
UNIT_TEST_DIR
,
"
#{
model_name
}
_test.rb"
),
# test
File
.
join
(
SPEC_MODEL_DIR
,
"
#{
model_name
}
_spec.rb"
),
# spec
File
.
join
(
SPEC_MODEL_DIR
,
"
#{
model_name
}
_spec.rb"
),
# spec
File
.
join
(
EXEMPLARS_DIR
,
"
#{
model_name
}
_exemplar.rb"
),
# Object Daddy
File
.
join
(
EXEMPLARS_DIR
,
"
#{
model_name
}
_exemplar.rb"
),
# Object Daddy
].
each
{
|
file
|
annotate_one_file
(
file
,
info
)
}
].
each
{
|
file
|
annotate_one_file
(
file
,
info
,
options
.
merge
(
:position
=>
(
options
[
:position_in_fixture
]
||
options
[
:position
]))
)
}
FIXTURE_DIRS
.
each
do
|
dir
|
FIXTURE_DIRS
.
each
do
|
dir
|
fixture_file_name
=
File
.
join
(
dir
,
klass
.
table_name
+
".yml"
)
fixture_file_name
=
File
.
join
(
dir
,
klass
.
table_name
+
".yml"
)
...
...
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