-
Notifications
You must be signed in to change notification settings - Fork 12
/
Rakefile
59 lines (52 loc) · 1.63 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
require 'rake/clean'
require 'rake/rdoctask'
require 'rubygems'
require 'rake/gempackagetask'
require 'grancher'
require 'sdoc'
begin
require 'grancher/task'
Grancher::Task.new do |g|
g.branch = 'gh-pages'
g.push_to = 'origin'
g.directory 'html'
end
rescue LoadError
puts 'You should install the \'grancher\' gem if you wish to push to gh-pages'
end
begin
require 'jeweler'
Jeweler::Tasks.new do |s|
s.name = "trac4r"
s.executables = "trac"
s.summary = 'Ruby Client Library for Trac'
s.email = "[email protected]"
s.description = 'Basic ruby client library and command line interface for accessing Trac instances via its XML RPC API'
s.authors = ['Niklas Cathro','David Copeland']
s.add_dependency('rainbow', '>= 1.0.4')
s.add_dependency('gli', '>= 1.1.0')
s.has_rdoc = true
s.extra_rdoc_files = ['README.rdoc','trac.rdoc']
s.rdoc_options << '--title' << 'trac4r Trac Ruby Client' << '--main' << 'README.rdoc' << '-ri'
s.require_paths << 'lib'
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install jeweler"
end
CLOBBER.include('trac4r.gemspec')
CLOBBER.include('pkg')
CLOBBER.include('trac.rdoc')
Rake::RDocTask.new(:generate_rdoc) do |rd|
rd.main = "README.rdoc"
rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
rd.options << '--fmt' << 'shtml'
rd.template = 'direct'
rd.title = 'Ruby interface to Trac'
end
task :default => :test
task :publish_rdoc => [:rdoc,:publish]
task :rdoc => [:bin_rdoc,:generate_rdoc]
task :bin_rdoc do |t|
`bin/trac rdoc`
end