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
8eee1a70
Commit
8eee1a70
authored
Jan 30, 2011
by
Weston Triemstra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
making it work with factory girl, the point of the exercise
parent
e5c0cf25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
annotate_models.rb
lib/annotate/annotate_models.rb
+3
-0
No files found.
lib/annotate/annotate_models.rb
View file @
8eee1a70
...
...
@@ -14,6 +14,8 @@ module AnnotateModels
EXEMPLARS_SPEC_DIR
=
File
.
join
(
"spec"
,
"exemplars"
)
# Machinist http://github.com/notahat/machinist
BLUEPRINTS_DIR
=
File
.
join
(
"test"
,
"blueprints"
)
# Factory Girl http://github.com/thoughtbot/factory_girl
FACTORY_GIRL_DIR
=
File
.
join
(
"test"
,
"factories"
)
def
model_dir
@model_dir
||
"app/models"
...
...
@@ -179,6 +181,7 @@ module AnnotateModels
File
.
join
(
EXEMPLARS_TEST_DIR
,
"
#{
model_name
}
_exemplar.rb"
),
# Object Daddy
File
.
join
(
EXEMPLARS_SPEC_DIR
,
"
#{
model_name
}
_exemplar.rb"
),
# Object Daddy
File
.
join
(
BLUEPRINTS_DIR
,
"
#{
model_name
}
_blueprint.rb"
),
# Machinist Blueprints
File
.
join
(
FACTORY_GIRL_DIR
,
"
#{
model_name
}
_factory.rb"
),
# Factory Girl Factories
].
each
do
|
file
|
annotate_one_file
(
file
,
info
,
options_with_position
(
options
,
:position_in_fixture
))
end
...
...
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