Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 107 lines (84 sloc) 2.411 kb
8d085de Ryan Davis Updated History for 3.0 release.
zenspider authored
1 # -*- ruby -*-
2
86a854f Eric Hodel Rakefile for ZenTest.
drbrain authored
3 require 'rake'
4 require 'rake/testtask'
5 require 'rake/rdoctask'
6 require 'rake/gempackagetask'
8d085de Ryan Davis Updated History for 3.0 release.
zenspider authored
7 require 'rbconfig'
86a854f Eric Hodel Rakefile for ZenTest.
drbrain authored
8
9168ae5 Ryan Davis Final sweep for 3.1.0 release.
zenspider authored
9 require './lib/zentest.rb'
86a854f Eric Hodel Rakefile for ZenTest.
drbrain authored
10
11 $VERBOSE = nil
12
13 spec = Gem::Specification.new do |s|
14 s.name = 'ZenTest'
15 s.version = ZenTest::VERSION
16 s.authors = ['Ryan Davis', 'Eric Hodel']
17 s.email = 'ryand-ruby@zenspider.com'
18
19 s.files = File.read('Manifest.txt').split($/)
20 s.require_path = 'lib'
53d26bc Eric Hodel Import Test::Rails.
drbrain authored
21 s.executables = %w[zentest unit_diff autotest multiruby rails_test_audit]
cd13375 Ryan Davis Fixed gem to do summary and description, filelist, homepage, and RF.
zenspider authored
22
23 paragraphs = File.read("README.txt").split(/\n\n+/)
0b215df Ryan Davis Minor doco change.
zenspider authored
24 s.instance_variable_set "@description", paragraphs[3..10].join("\n\n")
25 s.instance_variable_set "@summary", paragraphs[12]
cd13375 Ryan Davis Fixed gem to do summary and description, filelist, homepage, and RF.
zenspider authored
26
894b26d Ryan Davis Argh. Cleaned up annoying rakefile output. sorry. will merge to 3.0.0.
zenspider authored
27 if $DEBUG then
28 puts "ZenTest #{s.version}"
29 puts
0b215df Ryan Davis Minor doco change.
zenspider authored
30 puts "** summary:"
894b26d Ryan Davis Argh. Cleaned up annoying rakefile output. sorry. will merge to 3.0.0.
zenspider authored
31 puts s.summary
32 puts
0b215df Ryan Davis Minor doco change.
zenspider authored
33 puts "** description:"
894b26d Ryan Davis Argh. Cleaned up annoying rakefile output. sorry. will merge to 3.0.0.
zenspider authored
34 puts s.description
35 end
cd13375 Ryan Davis Fixed gem to do summary and description, filelist, homepage, and RF.
zenspider authored
36
37 s.files = IO.readlines("Manifest.txt").map {|f| f.chomp }
38 s.homepage = "http://www.zenspider.com/ZSS/Products/ZenTest/"
39 s.rubyforge_project = "zentest"
86a854f Eric Hodel Rakefile for ZenTest.
drbrain authored
40 end
41
42 desc 'Run tests'
43 task :default => :test
44
45 desc 'Run tests'
0cd84d7 Eric Hodel Rearrange to make ZenTest rubygems-packagable.
drbrain authored
46 Rake::TestTask.new :test do |t|
86a854f Eric Hodel Rakefile for ZenTest.
drbrain authored
47 t.libs << 'test'
48 t.verbose = true
49 end
50
51 desc 'Update Manifest.txt'
8d085de Ryan Davis Updated History for 3.0 release.
zenspider authored
52 task :update_manifest => :clean do
53 sh "p4 open Manifest.txt; find . -type f | sed -e 's%./%%' | sort > Manifest.txt"
86a854f Eric Hodel Rakefile for ZenTest.
drbrain authored
54 end
55
56 desc 'Generate RDoc'
57 Rake::RDocTask.new :rdoc do |rd|
58 rd.rdoc_dir = 'doc'
9168ae5 Ryan Davis Final sweep for 3.1.0 release.
zenspider authored
59 rd.rdoc_files.add 'lib', 'README.txt', 'History.txt', 'LinuxJournalArticle.txt'
86a854f Eric Hodel Rakefile for ZenTest.
drbrain authored
60 rd.main = 'README.txt'
ec1f3fc Eric Hodel RDoc title.
drbrain authored
61 rd.options << '-d' if `which dot` =~ /\/dot/ unless RUBY_PLATFORM =~ /win32/
62 rd.options << '-t "ZenTest RDoc"'
86a854f Eric Hodel Rakefile for ZenTest.
drbrain authored
63 end
64
65 desc 'Build Gem'
d0d5aaf Eric Hodel Make packaging run. (Stupid block.)
drbrain authored
66 Rake::GemPackageTask.new spec do |pkg|
67 pkg.need_tar = true
68 end
86a854f Eric Hodel Rakefile for ZenTest.
drbrain authored
69
8d085de Ryan Davis Updated History for 3.0 release.
zenspider authored
70 $prefix = ENV['PREFIX'] || Config::CONFIG['prefix']
71 $bin = File.join($prefix, 'bin')
72 $lib = Config::CONFIG['sitelibdir']
9168ae5 Ryan Davis Final sweep for 3.1.0 release.
zenspider authored
73 $bins = %w(zentest autotest unit_diff multiruby)
74 $libs = %w(zentest.rb autotest.rb rails_autotest.rb unit_diff.rb)
8d085de Ryan Davis Updated History for 3.0 release.
zenspider authored
75
76 task :install do
77 $bins.each do |f|
78 install File.join("bin", f), $bin, :mode => 0555
79 end
80
81 $libs.each do |f|
82 install File.join("lib", f), $lib, :mode => 0444
83 end
84 end
86a854f Eric Hodel Rakefile for ZenTest.
drbrain authored
85
8d085de Ryan Davis Updated History for 3.0 release.
zenspider authored
86 task :uninstall do
9168ae5 Ryan Davis Final sweep for 3.1.0 release.
zenspider authored
87 # add old versions
88 $bins << "ZenTest"
89 $libs << "ZenTest.rb"
90
8d085de Ryan Davis Updated History for 3.0 release.
zenspider authored
91 $bins.each do |f|
92 rm_f File.join($bin, f)
93 end
94
95 $libs.each do |f|
96 rm_f File.join($lib, f)
97 end
98 end
99
100 desc 'Clean up'
101 task :clean => [ :clobber_rdoc, :clobber_package ] do
3282f77 Ryan Davis Fixed clean rule in rakefile.
zenspider authored
102 rm_f Dir["**/*~"]
8d085de Ryan Davis Updated History for 3.0 release.
zenspider authored
103 end
53d26bc Eric Hodel Import Test::Rails.
drbrain authored
104
105 # vim:syntax=ruby
106
Something went wrong with that request. Please try again.