2005-01-02 10:16:59 -05:00
|
|
|
require 'rake/testtask'
|
2005-02-15 10:57:44 -05:00
|
|
|
require 'rake/gempackagetask'
|
|
|
|
require 'rake/contrib/rubyforgepublisher'
|
|
|
|
|
|
|
|
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
|
|
|
|
PKG_NAME = 'activesupport'
|
2005-02-15 11:35:07 -05:00
|
|
|
PKG_VERSION = '0.9.0' + PKG_BUILD
|
2005-02-15 10:57:44 -05:00
|
|
|
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
2005-01-02 10:16:59 -05:00
|
|
|
|
|
|
|
task :default => :test
|
|
|
|
Rake::TestTask.new { |t|
|
2005-01-09 10:02:39 -05:00
|
|
|
t.pattern = 'test/**/*_test.rb'
|
2005-01-02 10:16:59 -05:00
|
|
|
}
|
2005-02-15 10:57:44 -05:00
|
|
|
|
|
|
|
# Create compressed packages
|
|
|
|
dist_dirs = [ "lib", "test"]
|
|
|
|
|
|
|
|
spec = Gem::Specification.new do |s|
|
|
|
|
s.name = PKG_NAME
|
|
|
|
s.version = PKG_VERSION
|
2005-02-15 11:35:07 -05:00
|
|
|
s.summary = "Support and utility classes used by the Rails framework."
|
|
|
|
s.description = %q{Utility library which carries commonly used classes and goodies from the Rails framework}
|
2005-02-15 10:57:44 -05:00
|
|
|
|
|
|
|
s.files = [ "CHANGELOG" ] + Dir.glob( "lib/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
|
|
|
|
s.require_path = 'lib'
|
|
|
|
s.has_rdoc = true
|
|
|
|
|
|
|
|
s.author = "David Heinemeier Hansson"
|
|
|
|
s.email = "david@loudthinking.com"
|
|
|
|
s.homepage = "http://www.rubyonrails.com"
|
|
|
|
s.rubyforge_project = "activesupport"
|
|
|
|
end
|
|
|
|
|
|
|
|
Rake::GemPackageTask.new(spec) do |p|
|
|
|
|
p.gem_spec = spec
|
|
|
|
p.need_tar = true
|
|
|
|
p.need_zip = true
|
|
|
|
end
|
|
|
|
|
|
|
|
# Publish beta gem
|
|
|
|
desc "Publish the beta gem"
|
|
|
|
task :pgem => [:package] do
|
|
|
|
Rake::SshFilePublisher.new("davidhh@comox.textdrive.com", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
|
|
|
|
`ssh davidhh@comox.textdrive.com './gemupdate.sh'`
|
|
|
|
end
|