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
b4abdb18
Commit
b4abdb18
authored
Feb 12, 2009
by
codeape
Committed by
Ryan Wilcox
Jan 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding extra option to enable skipping the inclusion of current migration veresion
parent
d735ff25
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
4 deletions
+56
-4
annotate_models.gemspec
annotate_models.gemspec
+39
-0
annotate_models.rb
lib/annotate/annotate_models.rb
+1
-4
annotate.rake
lib/tasks/annotate.rake
+16
-0
No files found.
annotate_models.gemspec
0 → 100644
View file @
b4abdb18
# -*- encoding: utf-8 -*-
Gem
::
Specification
.
new
do
|
s
|
s
.
name
=
%q{annotate}
s
.
version
=
"2.0.0.20090212000"
s
.
required_rubygems_version
=
Gem
::
Requirement
.
new
(
">= 0"
)
if
s
.
respond_to?
:required_rubygems_version
=
s
.
authors
=
[
"Dan Cheail"
,
"Cuong Tran"
]
s
.
date
=
%q{2009-02-03}
s
.
default_executable
=
%q{annotate}
s
.
description
=
%q{Annotates Rails Models, routes, and others}
s
.
email
=
[
"ctran@pragmaquest.com"
]
s
.
executables
=
[
"annotate"
]
s
.
extra_rdoc_files
=
[
"History.txt"
,
"License.txt"
,
"Manifest.txt"
,
"README.rdoc"
]
s
.
files
=
[
"History.txt"
,
"License.txt"
,
"Manifest.txt"
,
"README.rdoc"
,
"Rakefile"
,
"annotate_models.gemspec"
,
"bin/annotate"
,
"lib/annotate.rb"
,
"lib/annotate/annotate_models.rb"
,
"lib/annotate/annotate_routes.rb"
,
"lib/tasks/annotate_models.rake"
,
"lib/tasks/annotate_routes.rake"
,
"script/console"
,
"script/destroy"
,
"script/generate"
,
"setup.rb"
,
"spec/annotate/annotate_models_spec.rb"
,
"spec/annotate/annotate_routes_spec.rb"
,
"spec/annotate_spec.rb"
,
"spec/spec.opts"
,
"spec/spec_helper.rb"
,
"tasks/rspec.rake"
]
s
.
has_rdoc
=
true
s
.
homepage
=
%q{http://github.com/ctran/annotate_models}
s
.
rdoc_options
=
[
"--main"
,
"README.rdoc"
]
s
.
require_paths
=
[
"lib"
]
s
.
rubyforge_project
=
%q{annotate}
s
.
rubygems_version
=
%q{1.3.1}
s
.
summary
=
%q{Annotates Rails Models, routes, and others}
if
s
.
respond_to?
:specification_version
then
current_version
=
Gem
::
Specification
::
CURRENT_SPECIFICATION_VERSION
s
.
specification_version
=
2
if
Gem
::
Version
.
new
(
Gem
::
RubyGemsVersion
)
>=
Gem
::
Version
.
new
(
'1.2.0'
)
then
s
.
add_development_dependency
(
%q<newgem>
,
[
">= 1.2.3"
])
s
.
add_development_dependency
(
%q<hoe>
,
[
">= 1.8.0"
])
else
s
.
add_dependency
(
%q<newgem>
,
[
">= 1.2.3"
])
s
.
add_dependency
(
%q<hoe>
,
[
">= 1.8.0"
])
end
else
s
.
add_dependency
(
%q<newgem>
,
[
">= 1.2.3"
])
s
.
add_dependency
(
%q<hoe>
,
[
">= 1.8.0"
])
end
end
lib/annotate/annotate_models.rb
View file @
b4abdb18
...
...
@@ -277,10 +277,7 @@ module AnnotateModels
end
end
rescue
Exception
=>
e
puts
"Unable to annotate
#{
file
}
:
#{
e
.
inspect
}
"
puts
""
# todo: check if all backtrace lines are in "gems" -- if so, it's an annotate bug, so print the whole stack trace.
# puts e.backtrace.join("\n\t")
puts
"Unable to annotate
#{
file
}
:
#{
e
.
message
}
(
#{
e
.
backtrace
.
first
}
)"
end
end
if
annotated
.
empty?
...
...
lib/tasks/annotate.rake
0 → 100644
View file @
b4abdb18
desc
"Add schema information (as comments) to model and fixture files"
task
:annotate_models
=>
:environment
do
require
'annotate_models'
options
=
{}
options
[
:position_in_class
]
=
ENV
[
'position_in_class'
]
||
ENV
[
'position'
]
options
[
:position_in_fixture
]
=
ENV
[
'position_in_fixture'
]
||
ENV
[
'position'
]
options
[
:include_version
]
=
ENV
[
'include_version'
]
AnnotateModels
.
do_annotations
(
options
)
end
desc
"Remove schema information from model and fixture files"
task
:remove_annotation
=>
:environment
do
require
'annotate_models'
AnnotateModels
.
remove_annotations
end
\ No newline at end of file
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