Commit 32e328be by qichunren

fix path load bug, and make rake workable.

parent 9c68c8c9
...@@ -46,7 +46,7 @@ From github: ...@@ -46,7 +46,7 @@ From github:
git clone git://github.com/ctran/annotate_models.git annotate git clone git://github.com/ctran/annotate_models.git annotate
cd annotate cd annotate
rake gem rake build
sudo gem install pkg/annotate-*.gem sudo gem install pkg/annotate-*.gem
== USAGE == USAGE
......
require 'rubygems' require 'rubygems'
require 'rake' require 'rake'
require 'lib/annotate' require File.dirname(__FILE__) + '/lib/annotate'
# want other tests/tasks run by default? Add them to the list # want other tests/tasks run by default? Add them to the list
task :default => [:spec] task :default => [:spec]
...@@ -30,17 +30,17 @@ rescue LoadError ...@@ -30,17 +30,17 @@ rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler" puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end end
require 'spec/rake/spectask' # require 'rspec'
Spec::Rake::SpecTask.new(:spec) do |spec| # Spec::Rake::SpecTask.new(:spec) do |spec|
spec.libs << 'lib' << 'spec' # spec.libs << 'lib' << 'spec'
spec.spec_files = FileList['spec/**/*_spec.rb'] # spec.spec_files = FileList['spec/**/*_spec.rb']
end # end
#
Spec::Rake::SpecTask.new(:rcov) do |spec| # Spec::Rake::SpecTask.new(:rcov) do |spec|
spec.libs << 'lib' << 'spec' # spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/**/*_spec.rb' # spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true # spec.rcov = true
end # end
require 'rake/rdoctask' require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc| Rake::RDocTask.new do |rdoc|
......
# Generated by jeweler # Generated by jeweler
# DO NOT EDIT THIS FILE # DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec` # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*- # -*- encoding: utf-8 -*-
Gem::Specification.new do |s| Gem::Specification.new do |s|
...@@ -9,7 +9,7 @@ Gem::Specification.new do |s| ...@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Cuong Tran", "Alex Chaffee", "Marcos Piccinini"] s.authors = ["Cuong Tran", "Alex Chaffee", "Marcos Piccinini"]
s.date = %q{2009-10-23} s.date = %q{2010-12-08}
s.default_executable = %q{annotate} s.default_executable = %q{annotate}
s.description = %q{Annotates Rails Models, routes, fixtures, and others based on the database schema.} s.description = %q{Annotates Rails Models, routes, fixtures, and others based on the database schema.}
s.email = ["alex@stinky.com", "ctran@pragmaquest.com", "x@nofxx.com"] s.email = ["alex@stinky.com", "ctran@pragmaquest.com", "x@nofxx.com"]
...@@ -37,7 +37,8 @@ Gem::Specification.new do |s| ...@@ -37,7 +37,8 @@ Gem::Specification.new do |s|
s.homepage = %q{http://github.com/ctran/annotate} s.homepage = %q{http://github.com/ctran/annotate}
s.rdoc_options = ["--charset=UTF-8"] s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"] s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.5} s.rubyforge_project = %q{annotate}
s.rubygems_version = %q{1.3.7}
s.summary = %q{Annotates Rails 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.test_files = [ s.test_files = [
"spec/annotate/annotate_models_spec.rb", "spec/annotate/annotate_models_spec.rb",
...@@ -50,9 +51,10 @@ Gem::Specification.new do |s| ...@@ -50,9 +51,10 @@ Gem::Specification.new do |s|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3 s.specification_version = 3
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
else else
end end
else else
end end
end end
require "yaml"
$:.unshift(File.dirname(__FILE__)) unless $:.unshift(File.dirname(__FILE__)) unless
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__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