Commit b4abdb18 by codeape Committed by Ryan Wilcox

adding extra option to enable skipping the inclusion of current migration veresion

parent d735ff25
# -*- 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
......@@ -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?
......
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment