Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

root/branches/2-1-caching/activesupport/Rakefile

Revision 7828, 2.6 kB (checked in by bitsweat, 1 year ago)

Rebundle Builder 2.1.2 but prefer a newer RubyGem if available.

Line 
1 require 'rake/testtask'
2 require 'rake/rdoctask'
3 require 'rake/gempackagetask'
4 require 'rake/contrib/rubyforgepublisher'
5 require File.join(File.dirname(__FILE__), 'lib', 'active_support', 'version')
6
7 PKG_BUILD     = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
8 PKG_NAME      = 'activesupport'
9 PKG_VERSION   = ActiveSupport::VERSION::STRING + PKG_BUILD
10 PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
11
12 RELEASE_NAME  = "REL #{PKG_VERSION}"
13
14 RUBY_FORGE_PROJECT = "activesupport"
15 RUBY_FORGE_USER    = "webster132"
16
17 task :default => :test
18 Rake::TestTask.new { |t|
19   t.pattern = 'test/**/*_test.rb'
20   t.verbose = true
21   t.warning = true
22 }
23
24 # Create compressed packages
25 dist_dirs = [ "lib", "test"]
26
27 # Genereate the RDoc documentation
28
29 Rake::RDocTask.new { |rdoc|
30   rdoc.rdoc_dir = 'doc'
31   rdoc.title    = "Active Support -- Utility classes and standard library extensions from Rails"
32   rdoc.options << '--line-numbers' << '--inline-source'
33   rdoc.options << '--charset' << 'utf-8'
34   rdoc.template = "#{ENV['template']}.rb" if ENV['template']
35   rdoc.rdoc_files.include('README', 'CHANGELOG')
36   rdoc.rdoc_files.include('lib/active_support.rb')
37   rdoc.rdoc_files.include('lib/active_support/*.rb')
38   rdoc.rdoc_files.include('lib/active_support/**/*.rb')
39 }
40
41 spec = Gem::Specification.new do |s|
42   s.name = PKG_NAME
43   s.version = PKG_VERSION
44   s.summary = "Support and utility classes used by the Rails framework."
45   s.description = %q{Utility library which carries commonly used classes and goodies from the Rails framework}
46
47   s.files = [ "CHANGELOG", "README" ] + Dir.glob( "lib/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
48   s.require_path = 'lib'
49   s.has_rdoc = true
50
51   s.author = "David Heinemeier Hansson"
52   s.email = "david@loudthinking.com"
53   s.homepage = "http://www.rubyonrails.org"
54   s.rubyforge_project = "activesupport"
55 end
56
57 Rake::GemPackageTask.new(spec) do |p|
58   p.gem_spec = spec
59   p.need_tar = true
60   p.need_zip = true
61 end
62
63 desc "Publish the beta gem"
64 task :pgem => [:package] do
65   Rake::SshFilePublisher.new("davidhh@wrath.rubyonrails.org", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
66   `ssh davidhh@wrath.rubyonrails.org './gemupdate.sh'`
67 end
68
69 desc "Publish the API documentation"
70 task :pdoc => [:rdoc] do
71   Rake::SshDirPublisher.new("davidhh@wrath.rubyonrails.org", "public_html/as", "doc").upload
72 end
73
74 desc "Publish the release files to RubyForge."
75 task :release => [ :package ] do
76   require 'rubyforge'
77
78   packages = %w( gem tgz zip ).collect{ |ext| "pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}" }
79
80   rubyforge = RubyForge.new
81   rubyforge.login
82   rubyforge.add_release(PKG_NAME, PKG_NAME, "REL #{PKG_VERSION}", *packages)
83 end
Note: See TracBrowser for help on using the browser.