forked from kennethkalmer/ruote-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
64 lines (40 loc) · 976 Bytes
/
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
require 'rubygems'
require 'rubygems/user_interaction' if Gem::RubyGemsVersion == '1.5.0'
require 'bundler'
require 'rake'
require 'rake/clean'
require 'rake/rdoctask'
require 'rspec/core/rake_task'
Bundler::GemHelper.install_tasks
#
# clean
CLEAN.include('pkg', 'rdoc')
#
# test / spec
RSpec::Core::RakeTask.new
task :test => :spec
task :default => :spec
#
# gem
GEMSPEC = Bundler.load_gemspec(Dir['*.gemspec'].first)
#
# rdoc
#
# make sure to have rdoc 2.5.x to run that
Rake::RDocTask.new do |rd|
rd.main = 'README.rdoc'
rd.rdoc_dir = 'rdoc'
rd.rdoc_files.include(
'README.rdoc', 'CHANGELOG.txt', 'CREDITS.txt', 'lib/**/*.rb')
rd.title = "#{GEMSPEC.name} #{GEMSPEC.version}"
end
#
# upload_rdoc
desc %{
upload the rdoc to rubyforge
}
task :upload_rdoc => [ :clean, :rdoc ] do
account = '[email protected]'
webdir = '/var/www/gforge-projects/ruote'
sh "rsync -azv -e ssh rdoc/#{GEMSPEC.name}_rdoc #{account}:#{webdir}/"
end