Rakefile 1.3 KB
Newer Older
1
require 'rake/testtask'
2 3 4 5 6 7 8
require 'rake/gempackagetask'
require 'rake/contrib/rubyforgepublisher'

PKG_BUILD     = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME      = 'activesupport'
PKG_VERSION   = '1.0.0' + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
9 10 11

task :default => :test
Rake::TestTask.new { |t| 
12
  t.pattern = 'test/**/*_test.rb'
13
}
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45

# Create compressed packages
dist_dirs = [ "lib", "test"]

spec = Gem::Specification.new do |s|
  s.name = PKG_NAME
  s.version = PKG_VERSION
  s.summary = "Support and utility classes."
  s.description = %q{Utility library which carries commonly used classes and goodies from the rails project}

  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