2004-11-24 01:04:44 +00:00
|
|
|
require 'rake/testtask'
|
|
|
|
require 'rake/packagetask'
|
2011-05-24 18:08:11 +00:00
|
|
|
require 'rubygems/package_task'
|
2004-11-24 01:04:44 +00:00
|
|
|
|
|
|
|
desc "Default Task"
|
|
|
|
task :default => [ :test ]
|
|
|
|
|
|
|
|
# Run the unit tests
|
|
|
|
Rake::TestTask.new { |t|
|
|
|
|
t.libs << "test"
|
2010-01-24 18:36:42 +00:00
|
|
|
t.pattern = 'test/**/*_test.rb'
|
2009-11-10 05:42:17 +00:00
|
|
|
t.warning = true
|
2012-02-03 13:01:24 +00:00
|
|
|
t.verbose = true
|
2004-11-24 01:04:44 +00:00
|
|
|
}
|
|
|
|
|
2009-11-11 00:50:15 +00:00
|
|
|
namespace :test do
|
|
|
|
task :isolated do
|
|
|
|
ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME'))
|
2010-01-24 18:36:42 +00:00
|
|
|
Dir.glob("test/**/*_test.rb").all? do |file|
|
2011-01-13 12:55:41 +00:00
|
|
|
sh(ruby, '-Ilib:test', file)
|
2009-11-11 00:50:15 +00:00
|
|
|
end or raise "Failures"
|
|
|
|
end
|
2009-05-13 08:10:37 +00:00
|
|
|
end
|
2004-11-24 01:04:44 +00:00
|
|
|
|
2009-09-25 05:46:04 +00:00
|
|
|
spec = eval(File.read('actionmailer.gemspec'))
|
2004-11-24 01:04:44 +00:00
|
|
|
|
2011-05-24 18:08:11 +00:00
|
|
|
Gem::PackageTask.new(spec) do |p|
|
2004-11-24 01:04:44 +00:00
|
|
|
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
|