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
d9a6fe27
Commit
d9a6fe27
authored
Oct 19, 2010
by
Dmitry Lihachev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
convert ENV[exclude_{fixtures,tests}] to options[exclude_{tests,fixtures}]
parent
fffd1356
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
annotate_models.rb
lib/annotate/annotate_models.rb
+2
-2
annotate_models.rake
lib/tasks/annotate_models.rake
+2
-0
No files found.
lib/annotate/annotate_models.rb
View file @
d9a6fe27
...
...
@@ -167,7 +167,7 @@ module AnnotateModels
annotated
=
true
end
unless
ENV
[
'exclude_tests'
]
unless
options
[
:exclude_tests
]
[
File
.
join
(
UNIT_TEST_DIR
,
"
#{
model_name
}
_test.rb"
),
# test
File
.
join
(
SPEC_MODEL_DIR
,
"
#{
model_name
}
_spec.rb"
),
# spec
...
...
@@ -177,7 +177,7 @@ module AnnotateModels
end
end
unless
ENV
[
'exclude_fixtures'
]
unless
options
[
:exclude_fixtures
]
[
File
.
join
(
EXEMPLARS_TEST_DIR
,
"
#{
model_name
}
_exemplar.rb"
),
# Object Daddy
File
.
join
(
EXEMPLARS_SPEC_DIR
,
"
#{
model_name
}
_exemplar.rb"
),
# Object Daddy
...
...
lib/tasks/annotate_models.rake
View file @
d9a6fe27
...
...
@@ -9,6 +9,8 @@ task :annotate_models => :environment do
options
[
:model_dir
]
=
ENV
[
'model_dir'
]
options
[
:include_version
]
=
ENV
[
'include_version'
]
options
[
:require
]
=
ENV
[
'require'
]
?
ENV
[
'require'
].
split
(
','
)
:
[]
options
[
:exclude_tests
]
=
ENV
[
'exclude_tests'
]
options
[
:exclude_fixtures
]
=
ENV
[
'exclude_fixtures'
]
AnnotateModels
.
do_annotations
(
options
)
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