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
513b837f
Commit
513b837f
authored
Aug 21, 2009
by
Marcos Piccinini
Browse files
Options
Browse Files
Download
Plain Diff
merge peterpunk fork
parents
79353d47
978c3405
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
annotate_models.rb
lib/annotate/annotate_models.rb
+9
-6
No files found.
lib/annotate/annotate_models.rb
View file @
513b837f
...
@@ -8,10 +8,11 @@ module AnnotateModels
...
@@ -8,10 +8,11 @@ module AnnotateModels
# I dont use windows, can`t test
# I dont use windows, can`t test
UNIT_TEST_DIR
=
File
.
join
(
"test"
,
"unit"
)
UNIT_TEST_DIR
=
File
.
join
(
"test"
,
"unit"
)
SPEC_MODEL_DIR
=
File
.
join
(
"spec"
,
"models"
)
SPEC_MODEL_DIR
=
File
.
join
(
"spec"
,
"models"
)
EXEMPLARS_TEST_DIR
=
File
.
join
(
"test"
,
"exemplars"
)
# Object Daddy http://github.com/flogic/object_daddy/tree/master
# Object Daddy http://github.com/flogic/object_daddy/tree/master
EXEMPLARS_DIR
=
File
.
join
(
"spec"
,
"exemplars"
)
EXEMPLARS_
SPEC_
DIR
=
File
.
join
(
"spec"
,
"exemplars"
)
# Machinist http://github.com/notahat/machinist
# Machinist http://github.com/notahat/machinist
BLUEPRINT
=
File
.
join
(
"spec"
,
"blueprint
"
)
BLUEPRINT
S_DIR
=
File
.
join
(
"test"
,
"blueprints
"
)
def
model_dir
def
model_dir
@model_dir
||
"app/models"
@model_dir
||
"app/models"
...
@@ -152,9 +153,11 @@ module AnnotateModels
...
@@ -152,9 +153,11 @@ module AnnotateModels
end
end
[
[
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_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
].
each
{
|
file
|
annotate_one_file
(
file
,
info
)
}
].
each
{
|
file
|
annotate_one_file
(
file
,
info
)
}
FIXTURE_DIRS
.
each
do
|
dir
|
FIXTURE_DIRS
.
each
do
|
dir
|
...
@@ -205,7 +208,7 @@ module AnnotateModels
...
@@ -205,7 +208,7 @@ module AnnotateModels
require
path
require
path
end
end
end
end
header
=
PREFIX
.
dup
header
=
PREFIX
.
dup
if
options
[
:include_version
]
if
options
[
:include_version
]
...
...
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