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

root/tools/gauge/Rakefile

Revision 2454, 1.3 kB (checked in by minam, 3 years ago)

gauge: fleshing it out a bit more

Line 
1 require 'rake'
2 require 'rake/testtask'
3 require 'rake/rdoctask'
4 require 'rake/gempackagetask'
5 require 'rake/contrib/rubyforgepublisher'
6
7 require "./lib/gauge/version"
8
9 PKG_NAME      = "gauge"
10 PKG_BUILD     = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
11 PKG_VERSION   = Gauge::Version::STRING + PKG_BUILD
12 PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
13
14 desc "Default task"
15 task :default => [ :test ]
16
17 desc "Build documentation"
18 task :doc => [ :rdoc ]
19
20 Rake::TestTask.new do |t|
21   t.test_files = Dir["test/**/*_test.rb"]
22   t.verbose = true
23 end
24
25 GEM_SPEC = eval(File.read("#{File.dirname(__FILE__)}/#{PKG_NAME}.gemspec"))
26
27 Rake::GemPackageTask.new(GEM_SPEC) do |p|
28   p.gem_spec = GEM_SPEC
29   p.need_tar = true
30   p.need_zip = true
31 end
32
33 desc "Build the RDoc API documentation"
34 Rake::RDocTask.new do |rdoc|
35   rdoc.rdoc_dir = "doc"
36   rdoc.title    = "Gauge -- A framework for real-time system monitoring"
37   rdoc.options << '--line-numbers --inline-source --main README'
38   rdoc.rdoc_files.include 'README'
39   rdoc.rdoc_files.include 'lib/**/*.rb'
40   rdoc.template = "jamis"
41 end
42
43 desc "Publish the beta gem"
44 task :pgem => [:package] do
45   Rake::SshFilePublisher.new("davidhh@wrath.rubyonrails.org", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
46   `ssh davidhh@wrath.rubyonrails.org './gemupdate.sh'`
47 end
Note: See TracBrowser for help on using the browser.