2010-07-22 21:56:00 +00:00
|
|
|
gem 'rdoc', '>= 2.5.9'
|
2010-06-16 20:30:06 +00:00
|
|
|
require 'rdoc'
|
2005-01-02 15:16:59 +00:00
|
|
|
require 'rake/testtask'
|
2010-07-23 19:11:29 +00:00
|
|
|
require 'rdoc/task'
|
2005-02-15 15:57:44 +00:00
|
|
|
require 'rake/gempackagetask'
|
2008-03-18 04:46:51 +00:00
|
|
|
|
2005-01-02 15:16:59 +00:00
|
|
|
task :default => :test
|
2009-09-25 06:16:41 +00:00
|
|
|
Rake::TestTask.new do |t|
|
|
|
|
t.libs << 'test'
|
2005-01-09 15:02:39 +00:00
|
|
|
t.pattern = 'test/**/*_test.rb'
|
2007-10-07 09:15:26 +00:00
|
|
|
t.warning = true
|
2009-09-25 06:16:41 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
namespace :test do
|
|
|
|
Rake::TestTask.new(:isolated) do |t|
|
|
|
|
t.pattern = 'test/ts_isolated.rb'
|
|
|
|
end
|
2009-04-23 00:41:28 +00:00
|
|
|
end
|
2005-02-15 15:57:44 +00:00
|
|
|
|
|
|
|
# Create compressed packages
|
|
|
|
dist_dirs = [ "lib", "test"]
|
|
|
|
|
2005-02-24 02:02:12 +00:00
|
|
|
# Genereate the RDoc documentation
|
|
|
|
|
2010-07-23 19:11:29 +00:00
|
|
|
RDoc::Task.new { |rdoc|
|
2005-02-24 02:02:12 +00:00
|
|
|
rdoc.rdoc_dir = 'doc'
|
|
|
|
rdoc.title = "Active Support -- Utility classes and standard library extensions from Rails"
|
2010-07-23 19:11:29 +00:00
|
|
|
rdoc.options << '-f' << 'horo'
|
|
|
|
rdoc.options << '--main' << 'README.rdoc'
|
2007-05-28 22:55:14 +00:00
|
|
|
rdoc.options << '--charset' << 'utf-8'
|
2010-07-21 10:51:14 +00:00
|
|
|
rdoc.rdoc_files.include('README.rdoc', 'CHANGELOG')
|
2005-02-24 02:02:12 +00:00
|
|
|
rdoc.rdoc_files.include('lib/active_support.rb')
|
2008-06-19 03:13:21 +00:00
|
|
|
rdoc.rdoc_files.include('lib/active_support/**/*.rb')
|
2005-02-24 02:02:12 +00:00
|
|
|
}
|
|
|
|
|
2009-09-25 05:24:34 +00:00
|
|
|
spec = eval(File.read('activesupport.gemspec'))
|
2005-02-15 15:57:44 +00:00
|
|
|
|
|
|
|
Rake::GemPackageTask.new(spec) do |p|
|
|
|
|
p.gem_spec = spec
|
|
|
|
end
|
|
|
|
|
2010-02-05 02:28:45 +00:00
|
|
|
desc "Release to gemcutter"
|
2010-02-05 08:03:03 +00:00
|
|
|
task :release => :package do
|
|
|
|
require 'rake/gemcutter'
|
|
|
|
Rake::Gemcutter::Tasks.new(spec).define
|
|
|
|
Rake::Task['gem:push'].invoke
|
|
|
|
end
|