Commit b18abd93 by Jon Frisby

Merge remote-tracking branch 'pinnymz/master'

parents fcbec0e2 aae82380
......@@ -24,6 +24,7 @@ Gem::Specification.new do |s|
"annotate.gemspec",
"bin/annotate",
"lib/annotate.rb",
"lib/annotate/active_record_patch.rb",
"lib/annotate/annotate_models.rb",
"lib/annotate/annotate_routes.rb",
"lib/tasks/annotate_models.rake",
......
# monkey patches
module ::ActiveRecord
class Base
def self.method_missing(name, *args)
# ignore this, so unknown/unloaded macros won't cause parsing to fail
end
end
end
\ No newline at end of file
......@@ -348,13 +348,3 @@ module AnnotateModels
end
end
end
# monkey patches
module ::ActiveRecord
class Base
def self.method_missing(name, *args)
# ignore this, so unknown/unloaded macros won't cause parsing to fail
end
end
end
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 File.expand_path(File.join(File.dirname(__FILE__), '..', 'annotate', 'active_record_patch'))
true_re = /(true|t|yes|y|1)$/i
......@@ -20,6 +21,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 File.expand_path(File.join(File.dirname(__FILE__), '..', 'annotate', 'active_record_patch'))
options={}
options[:model_dir] = ENV['model_dir']
AnnotateModels.remove_annotations(options)
......
require File.dirname(__FILE__) + '/../spec_helper.rb'
require 'annotate/annotate_models'
require 'annotate/active_record_patch'
require 'rubygems'
require 'active_support'
......
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