/
Rakefile
87 lines (72 loc) · 1.88 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# -*- ruby -*-
require 'rubygems'
Gem::manage_gems
require 'rake/gempackagetask'
task :default => [:all, :test]
task :all do
ruby %{-c lib/Papyrus.rb}
end
task :test do
ruby %{-w -Ilib test.rb}
end
task :oldTests do
ruby %{-w -Ilib TC_Papyrus.rb}
end
task :missingTests do
filename = "../missing-tests.rb"
sh %{cd lib && ZenTest Papyrus.rb Papyrus/*.rb ../test.rb > #{filename}}
puts "Missing tests are in #{filename}"
end
task :newTests do
filename = "test.rb"
if File.exists?(filename)
puts "File exists"
else
puts "File does not exist."
sh %{cd lib && ZenTest Papyrus.rb Papyrus/*.rb > ../#{filename}}
end
puts "Tests are in #{filename}"
end
task :install do
ruby %{setup.rb}
end
task :uninstall do
puts "This is only set up for Brian's machine"
sh %{rm -rf /usr/local/lib/ruby/site_ruby/1.8/Papyrus}
end
task :doc do
sh %{rdoc lib/Papyrus.rb README.txt lib/Papyrus/*.rb}
end
task :cnh_doc do
sh %{cp -R --remove-destination doc /home/wisti/Sites/coolnamehere/extras/doc/Papyrus}
end
spec = Gem::Specification.new do |s|
s.name = "Papyrus"
s.require_path = "lib"
$LOAD_PATH.push s.require_path
require s.name
s.version = Papyrus::VERSION
s.author = "Brian Wisti"
s.email = "brianwisti@rubyforge.org"
s.homepage = "http://coolnamehere.com/products/pagetemplate"
s.platform = Gem::Platform::RUBY
s.summary = "A simple templating system for Web sites."
s.files = Dir.glob("**/*")
s.autorequire = "Papyrus.rb"
s.test_file = "test.rb"
s.has_rdoc = true
s.extra_rdoc_files = ["README.txt"]
end
Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_tar = true
end
task :gem do
if File.exists?("CVS")
raise RuntimeError, "Trying to make a gem in CVS directory!"
end
sh %{rake pkg/Papyrus-#{spec.version}.gem}
end
task :export do
dirname = "Papyrus-#{Papyrus::VERSION}"
sh %{cvs export -D now -d #{dirname} Papyrus}
end