mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
184419092a
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@874 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
64 lines
2 KiB
Ruby
64 lines
2 KiB
Ruby
require 'rake/testtask'
|
|
require 'rake/rdoctask'
|
|
require 'rake/gempackagetask'
|
|
require 'rake/contrib/rubyforgepublisher'
|
|
|
|
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
|
|
PKG_NAME = 'activesupport'
|
|
PKG_VERSION = '1.0.1' + PKG_BUILD
|
|
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
|
|
|
task :default => :test
|
|
Rake::TestTask.new { |t|
|
|
t.pattern = 'test/**/*_test.rb'
|
|
}
|
|
|
|
# Create compressed packages
|
|
dist_dirs = [ "lib", "test"]
|
|
|
|
# Genereate the RDoc documentation
|
|
|
|
Rake::RDocTask.new { |rdoc|
|
|
rdoc.rdoc_dir = 'doc'
|
|
rdoc.title = "Active Support -- Utility classes and standard library extensions from Rails"
|
|
rdoc.options << '--line-numbers --inline-source --main README'
|
|
rdoc.rdoc_files.include('README', 'CHANGELOG')
|
|
rdoc.rdoc_files.include('lib/active_support.rb')
|
|
rdoc.rdoc_files.include('lib/active_support/*.rb')
|
|
rdoc.rdoc_files.include('lib/active_support/**/*.rb')
|
|
}
|
|
|
|
spec = Gem::Specification.new do |s|
|
|
s.name = PKG_NAME
|
|
s.version = PKG_VERSION
|
|
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}
|
|
|
|
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.org"
|
|
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
|
|
|
|
# Publish documentation
|
|
desc "Publish the API documentation"
|
|
task :pdoc => [:rdoc] do
|
|
Rake::SshDirPublisher.new("davidhh@comox.textdrive.com", "public_html/as", "doc").upload
|
|
end
|