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
5356f242
Commit
5356f242
authored
Oct 15, 2010
by
miyucy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove exclude_factories option
parent
d153d317
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
18 deletions
+6
-18
annotate_models.rb
lib/annotate/annotate_models.rb
+6
-18
No files found.
lib/annotate/annotate_models.rb
View file @
5356f242
...
...
@@ -200,15 +200,6 @@ module AnnotateModels
end
end
unless
ENV
[
'exclude_factories'
]
[
File
.
join
(
FACTORY_GIRL_SPEC_DIR
,
"
#{
model_name
}
_factory.rb"
),
# spec/factories
File
.
join
(
FACTORY_GIRL_TEST_DIR
,
"
#{
model_name
}
_factory.rb"
),
# test/factories
].
each
do
|
file
|
annotate_one_file
(
file
,
info
,
options_with_position
(
options
,
:position_in_factory
))
end
end
annotated
end
...
...
@@ -315,19 +306,16 @@ module AnnotateModels
remove_annotation_of_file
(
model_file_name
)
[
File
.
join
(
UNIT_TEST_DIR
,
"
#{
klass
.
name
.
underscore
}
_test.rb"
),
File
.
join
(
SPEC_MODEL_DIR
,
"
#{
klass
.
name
.
underscore
}
_spec.rb"
),
File
.
join
(
FIXTURE_TEST_DIR
,
"
#{
klass
.
table_name
}
.yml"
),
# fixture
File
.
join
(
FIXTURE_SPEC_DIR
,
"
#{
klass
.
table_name
}
.yml"
),
# fixture
File
.
join
(
UNIT_TEST_DIR
,
"
#{
klass
.
name
.
underscore
}
_test.rb"
),
File
.
join
(
SPEC_MODEL_DIR
,
"
#{
klass
.
name
.
underscore
}
_spec.rb"
),
File
.
join
(
FIXTURE_TEST_DIR
,
"
#{
klass
.
table_name
}
.yml"
),
# fixture
File
.
join
(
FIXTURE_SPEC_DIR
,
"
#{
klass
.
table_name
}
.yml"
),
# fixture
File
.
join
(
FACTORY_GIRL_SPEC_DIR
,
"
#{
klass
.
name
.
underscore
}
_factory.rb"
),
File
.
join
(
FACTORY_GIRL_TEST_DIR
,
"
#{
klass
.
name
.
underscore
}
_factory.rb"
),
].
each
do
|
file
|
remove_annotation_of_file
(
file
)
if
File
.
exist?
(
file
)
end
[
File
.
join
(
FACTORY_GIRL_SPEC_DIR
,
"
#{
klass
.
name
.
underscore
}
_factory.rb"
),
File
.
join
(
FACTORY_GIRL_TEST_DIR
,
"
#{
klass
.
name
.
underscore
}
_factory.rb"
)].
each
do
|
file
|
remove_annotation_of_file
(
file
)
if
File
.
exist?
(
file
)
end
end
rescue
Exception
=>
e
puts
"Unable to annotate
#{
file
}
:
#{
e
.
message
}
"
...
...
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