-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.rb
99 lines (88 loc) · 3.15 KB
/
config.rb
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
88
89
90
91
92
93
94
95
96
97
require 'configuration'
require 'rake'
require 'tasks/utils'
#-----------------------------------------------------------------------
# General project configuration
#-----------------------------------------------------------------------
Configuration.for('project') {
name "tyrantmanager"
version TyrantManager::VERSION
author "Jeremy Hinegardner"
email "jeremy@copiousfreetime.org"
homepage "http://copiousfreetime.rubyforge.org/tyrantmanager/"
description Utils.section_of("README.rdoc", "description")
summary description.split(".").first
history "HISTORY.rdoc"
license FileList["LICENSE"]
readme "README.rdoc"
}
#-----------------------------------------------------------------------
# Packaging
#-----------------------------------------------------------------------
Configuration.for('packaging') {
# files in the project
proj_conf = Configuration.for('project')
files {
bin FileList["bin/*"]
ext FileList["ext/*.{c,h,rb}"]
lib FileList["lib/**/*.rb"]
test FileList["spec/**/*.rb", "test/**/*.rb"]
data FileList["data/**/*"]
tasks FileList["tasks/**/*.r{ake,b}"]
rdoc FileList[proj_conf.readme, proj_conf.history,
proj_conf.license] + lib
all bin + ext + lib + test + data + rdoc + tasks
}
# ways to package the results
formats {
tgz true
zip true
rubygem Configuration::Table.has_key?('rubygem')
}
}
#-----------------------------------------------------------------------
# Gem packaging
#-----------------------------------------------------------------------
Configuration.for("rubygem") {
spec "gemspec.rb"
Configuration.for('packaging').files.all << spec
}
#-----------------------------------------------------------------------
# Testing
# - change mode to 'testunit' to use unit testing
#-----------------------------------------------------------------------
Configuration.for('test') {
mode "spec"
files Configuration.for("packaging").files.test
options %w[ --format specdoc --color ]
ruby_opts %w[ ]
}
#-----------------------------------------------------------------------
# Rcov
#-----------------------------------------------------------------------
Configuration.for('rcov') {
output_dir "coverage"
libs %w[ lib ]
rcov_opts %w[ --html ]
ruby_opts %w[ ]
test_files Configuration.for('packaging').files.test
}
#-----------------------------------------------------------------------
# Rdoc
#-----------------------------------------------------------------------
Configuration.for('rdoc') {
files Configuration.for('packaging').files.rdoc
main_page files.first
title Configuration.for('project').name
options %w[ ]
output_dir "doc"
}
#-----------------------------------------------------------------------
# Rubyforge
#-----------------------------------------------------------------------
Configuration.for('rubyforge') {
project "copiousfreetime"
user "jjh"
host "rubyforge.org"
rdoc_location "#{user}@#{host}:/var/www/gforge-projects/#{project}/tyrantmanager/"
}