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
05687653
Commit
05687653
authored
Dec 14, 2009
by
John Parker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Look for machinist blueprints in spec/blueprints and factory_girl factories in test/factories
parent
56eb906b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
annotate.gemspec
annotate.gemspec
+1
-1
annotate_models.rb
lib/annotate/annotate_models.rb
+7
-2
No files found.
annotate.gemspec
View file @
05687653
...
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
...
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s
.
required_rubygems_version
=
Gem
::
Requirement
.
new
(
">= 0"
)
if
s
.
respond_to?
:required_rubygems_version
=
s
.
required_rubygems_version
=
Gem
::
Requirement
.
new
(
">= 0"
)
if
s
.
respond_to?
:required_rubygems_version
=
s
.
authors
=
[
"Cuong Tran"
,
"Alex Chaffee"
,
"Marcos Piccinini"
]
s
.
authors
=
[
"Cuong Tran"
,
"Alex Chaffee"
,
"Marcos Piccinini"
]
s
.
date
=
%q{2009-12-1
3
}
s
.
date
=
%q{2009-12-1
4
}
s
.
default_executable
=
%q{annotate}
s
.
default_executable
=
%q{annotate}
s
.
description
=
%q{Annotates Rails Models, routes, fixtures, and others based on the database schema.}
s
.
description
=
%q{Annotates Rails Models, routes, fixtures, and others based on the database schema.}
s
.
email
=
[
"alex@stinky.com"
,
"ctran@pragmaquest.com"
,
"x@nofxx.com"
]
s
.
email
=
[
"alex@stinky.com"
,
"ctran@pragmaquest.com"
,
"x@nofxx.com"
]
...
...
lib/annotate/annotate_models.rb
View file @
05687653
...
@@ -13,7 +13,10 @@ module AnnotateModels
...
@@ -13,7 +13,10 @@ module AnnotateModels
EXEMPLARS_TEST_DIR
=
File
.
join
(
"test"
,
"exemplars"
)
EXEMPLARS_TEST_DIR
=
File
.
join
(
"test"
,
"exemplars"
)
EXEMPLARS_SPEC_DIR
=
File
.
join
(
"spec"
,
"exemplars"
)
EXEMPLARS_SPEC_DIR
=
File
.
join
(
"spec"
,
"exemplars"
)
# Machinist http://github.com/notahat/machinist
# Machinist http://github.com/notahat/machinist
BLUEPRINTS_DIR
=
File
.
join
(
"test"
,
"blueprints"
)
BLUEPRINTS_TEST_DIR
=
File
.
join
(
"test"
,
"blueprints"
)
BLUEPRINTS_SPEC_DIR
=
File
.
join
(
"spec"
,
"blueprints"
)
# Factory Girl http://github.com/thoughtbot/factory_girl
FACTORY_GIRL_DIR
=
File
.
join
(
"test"
,
"factories"
)
def
model_dir
def
model_dir
@model_dir
||
"app/models"
@model_dir
||
"app/models"
...
@@ -178,7 +181,9 @@ module AnnotateModels
...
@@ -178,7 +181,9 @@ module AnnotateModels
[
[
File
.
join
(
EXEMPLARS_TEST_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
(
EXEMPLARS_SPEC_DIR
,
"
#{
model_name
}
_exemplar.rb"
),
# Object Daddy
File
.
join
(
BLUEPRINTS_DIR
,
"
#{
model_name
}
_blueprint.rb"
),
# Machinist Blueprints
File
.
join
(
BLUEPRINTS_TEST_DIR
,
"
#{
model_name
}
_blueprint.rb"
),
# Machinist Blueprints
File
.
join
(
BLUEPRINTS_SPEC_DIR
,
"
#{
model_name
}
_blueprint.rb"
),
# Machinist Blueprints
File
.
join
(
FACTORY_GIRL_DIR
,
"
#{
model_name
}
.rb"
),
# Factory Girl Factories
].
each
do
|
file
|
].
each
do
|
file
|
annotate_one_file
(
file
,
info
,
options_with_position
(
options
,
:position_in_fixture
))
annotate_one_file
(
file
,
info
,
options_with_position
(
options
,
:position_in_fixture
))
end
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