Commit d129f0e7 by Alex Chaffee

clean up some config and documentation

parent c7872753
......@@ -118,9 +118,13 @@ Released under the same license as Ruby. No Support. No Warranty.
== AUTHOR:
Original code by: Dave Thomas -- Pragmatic Programmers, LLC <http://agilewebdevelopment.com/plugins/annotate_models>
Overhauled by: Alex Chaffee <http://alexch.github.com>
Gemmed by: Cuong Tran <http://github.com/ctran>
Maintained by: Alex Chaffee and Cuong Tran
Homepage: http://github.com/ctran/annotate_models
Modifications by:
......
here = File.dirname __FILE__
require 'rubygems'
require 'rake'
require './lib/annotate'
require "#{here}/lib/annotate"
# want other tests/tasks run by default? Add them to the list
task :default => [:spec]
begin
require 'mg'
rescue LoadError
abort "Please `gem install mg`"
end
# mg ("minimalist gems") defines rake tasks:
#
# rake gem
......@@ -24,7 +20,11 @@ end
#
# rake package
# Build gem and tarball into dist/
begin
require 'mg'
rescue LoadError
abort "Please `gem install mg`"
end
MG.new("annotate_models.gemspec")
require 'rspec/core/rake_task'
......
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-
require './lib/annotate'
Gem::Specification.new do |s|
s.name = %q{annotate_models}
s.version = "2.4.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Cuong Tran", "Alex Chaffee", "Marcos Piccinini"]
s.name = %q{annotate}
s.version = Annotate.version # "2.5.0"
s.description = %q{Annotates Rails/ActiveRecord Models, routes, fixtures, and others based on the database schema.}
s.summary = %q{Annotates Rails Models, routes, fixtures, and others based on the database schema.}
s.authors = ["Cuong Tran", "Alex Chaffee", "Marcos Piccinini"]
s.email = ["alex@stinky.com", "ctran@pragmaquest.com", "x@nofxx.com"]
s.executables = ["annotate"]
s.extra_rdoc_files = [
"README.rdoc"
]
s.files = [
"History.txt",
"README.rdoc",
"VERSION.yml",
"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",
"spec/annotate/annotate_models_spec.rb",
"spec/annotate/annotate_routes_spec.rb",
"spec/annotate_spec.rb",
"spec/spec.opts",
"spec/spec_helper.rb",
"tasks/migrate.rake"
]
s.executables = ["annotate"] # todo: annotate_models
s.extra_rdoc_files = ["README.rdoc"]
s.files = %w( README.rdoc VERSION.yml History.txt )
s.files += Dir.glob("lib/**/*")
s.files += Dir.glob("tasks/**/*")
s.files += ["bin/annotate"] # todo: annotate_models
s.homepage = %q{http://github.com/ctran/annotate_models}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubyforge_project = %q{annotate}
s.rubygems_version = %q{1.3.5}
s.summary = %q{Annotates Rails Models, routes, fixtures, and others based on the database schema.}
s.test_files = [
"spec/annotate/annotate_models_spec.rb",
"spec/annotate/annotate_routes_spec.rb",
"spec/annotate_spec.rb",
"spec/spec_helper.rb"
]
s.add_runtime_dependency('rake')
s.add_development_dependency('jeweler')
s.add_development_dependency('rspec', '~> 1.3.2')
s.add_development_dependency('activesupport', '>= 2.1.0')
if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
else
end
else
end
s.add_runtime_dependency 'rake' # ?
end
......@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
s.files = %w( README.rdoc VERSION.yml History.txt )
s.files += Dir.glob("lib/**/*")
s.files += Dir.glob("tasks/**/*")
s.files += ["bin/annotate"] # todo: change to annotate_models
s.files += ["bin/annotate"] # todo: annotate_models
s.homepage = %q{http://github.com/ctran/annotate_models}
s.rdoc_options = ["--charset=UTF-8"]
......
annotate_lib = File.expand_path(File.dirname(File.dirname(__FILE__)))
desc "Add schema information (as comments) to model and fixture files"
task :annotate_models => :environment do
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'annotate', 'annotate_models'))
require "#{annotate_lib}/annotate/annotate_models"
options={}
options[:position_in_class] = ENV['position_in_class'] || ENV['position'] || :before
options[:position_in_fixture] = ENV['position_in_fixture'] || ENV['position'] || :before
......@@ -14,7 +16,7 @@ end
desc "Remove schema information from model and fixture files"
task :remove_annotation => :environment do
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'annotate', 'annotate_models'))
require "#{annotate_lib}/annotate/annotate_models"
options={}
options[:model_dir] = ENV['model_dir']
AnnotateModels.remove_annotations(options)
......
desc "Prepends the route map to the top of routes.rb"
task :annotate_routes do
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'annotate', 'annotate_routes'))
annotate_lib = File.expand_path(File.dirname(File.dirname(__FILE__)))
require "#{annotate_lib}/annotate/annotate_routes"
AnnotateRoutes.do_annotate
end
TODO
-----
* clean up history
* change default position back to "top" for all
* change default position back to "top" for all annotations
* add "top" and "bottom" as synonyms for "before" and "after"
* change 'exclude' to 'only' (double negatives are not unconfusing)
TODO (proposed)
----------------
* make a mailing list
alex@stinky.com
ctran@pragmaquest.com
x@nofxx.com
turadg@aleahmad.net
jfrisby@mrjoy.com
Jack Danger Canty
Marcos Piccinini
peterpunk
* push two identical gems, named 'annotate' and 'annotate_models'
* supply two binaries, named 'annotate' and 'annotate_models', since there's already a unix tool named 'annotate'
* test EVERYTHING
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