Commit 201910ae by Marcos Piccinini

works with rails 3

parent ffceca9b
...@@ -4,7 +4,7 @@ require 'rake' ...@@ -4,7 +4,7 @@ require 'rake'
begin begin
require 'jeweler' require 'jeweler'
Jeweler::Tasks.new do |gem| Jeweler::Tasks.new do |gem|
gem.name = "annotate" gem.name = "nofxx-annotate"
gem.summary = "Annotates Rails Models, routes, and others" gem.summary = "Annotates Rails Models, routes, and others"
gem.email = "x@nofxx.com" gem.email = "x@nofxx.com"
gem.homepage = "http://github.com/nofxx/annotate" gem.homepage = "http://github.com/nofxx/annotate"
...@@ -16,20 +16,20 @@ rescue LoadError ...@@ -16,20 +16,20 @@ 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 'spec/rake/spectask'
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
task :default => :spec # task :default => :spec
require 'rake/rdoctask' require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc| Rake::RDocTask.new do |rdoc|
......
...@@ -2,6 +2,8 @@ $:.unshift(File.dirname(__FILE__)) unless ...@@ -2,6 +2,8 @@ $:.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__)))
module Annotate module Annotate
require 'my_plugin/railtie' if defined?(Rails)
def self.load_tasks def self.load_tasks
if File.exists?('Rakefile') if File.exists?('Rakefile')
load 'Rakefile' load 'Rakefile'
......
require 'annotate'
require 'rails'
module Annotate
class Railtie < Rails::Railtie
railtie_name :annotate
rake_tasks do
load "tasks/annotate_models.rake"
end
end
end
# 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|
s.name = %q{annotate} s.name = %q{nofxx-annotate}
s.version = "2.3.2" s.version = "3.0.0"
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", "Marcos Piccinini"] s.authors = ["Cuong Tran", "Marcos Piccinini"]
s.date = %q{2009-08-21} s.date = %q{2010-05-09}
s.default_executable = %q{annotate} s.default_executable = %q{annotate}
s.email = %q{x@nofxx.com} s.email = %q{x@nofxx.com}
s.executables = ["annotate"] s.executables = ["annotate"]
...@@ -38,7 +38,7 @@ Gem::Specification.new do |s| ...@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
s.homepage = %q{http://github.com/nofxx/annotate} s.homepage = %q{http://github.com/nofxx/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.rubygems_version = %q{1.3.6}
s.summary = %q{Annotates Rails Models, routes, and others} s.summary = %q{Annotates Rails Models, routes, and others}
s.test_files = [ s.test_files = [
"spec/annotate/annotate_models_spec.rb", "spec/annotate/annotate_models_spec.rb",
...@@ -57,3 +57,4 @@ Gem::Specification.new do |s| ...@@ -57,3 +57,4 @@ Gem::Specification.new do |s|
else else
end end
end end
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