-
Notifications
You must be signed in to change notification settings - Fork 8
/
Rakefile
42 lines (34 loc) · 1.05 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
require 'rdoc/task'
require 'rspec/core/rake_task'
task :default => :spec
desc "Run all specs"
RSpec::Core::RakeTask.new do |t|
t.pattern = "spec/**/*_test.rb"
end
Rake::RDocTask.new do |rd|
rd.main = "README"
rd.rdoc_files.include("README", "lib/**/*.rb")
rd.rdoc_files.exclude("**/jamis.rb")
rd.template = File.expand_path(File.dirname(__FILE__) + "/lib/jamis.rb")
rd.options << '--line-numbers' << '--inline-source'
end
RUBYFORGE_USERNAME = "jameskilton"
PROJECT_WEB_PATH = "/var/www/gforge-projects/rbplusplus/rbgccxml"
namespace :web do
desc "Put the website together"
task :build => :rdoc do
unless File.directory?("publish")
mkdir "publish"
end
sh "cp -r html/* publish/"
end
# As part of the rbplusplus project, this just goes in a subfolder
desc "Update the website"
task :upload => "web:build" do |t|
Rake::SshDirPublisher.new("#{RUBYFORGE_USERNAME}@rubyforge.org", PROJECT_WEB_PATH, "publish").upload
end
desc "Clean up generated web files"
task :clean => ["clobber_rdoc"] do
rm_rf "publish"
end
end