-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
84 lines (69 loc) · 1.8 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
require 'rubygems'
require 'rake'
begin
require 'rubygems/package_task'
PackageTask = Gem::PackageTask
rescue LoadError
require 'rake/gempackagetask'
PackageTask = Rake::GemPackageTask
end
begin
require 'rdoc/task'
rescue LoadError
require 'rake/rdoctask'
end
RDOC_OPTIONS = [
'--line-numbers',
'--inline-source',
"--main", "README",
"-c UTF-8",
]
# gem tasks
base = 'ruby/server/'
PKG_FILES = FileList[
'[A-Z]*',
base + 'bin/**/*',
base + 'lib/**/*',
base + 'test/**/*.rb',
base + 'spec/**/*.rb',
base + 'doc/**/*',
base + 'examples/**/*',
]
EXEC_TABLE = Dir.entries(base + 'bin').reject{ |d| d =~ /^\.+$/ || d =~ /^sample_/ }
require File.expand_path(File.join('ruby', 'server', 'lib', 'roma', 'version'), File.dirname(__FILE__))
VER_NUM = Roma::VERSION
if VER_NUM =~ /([0-9.p-]+)$/
CURRENT_VERSION = $1.delete("-")
else
CURRENT_VERSION = "0.0.0"
end
SPEC = Gem::Specification.new do |s|
s.authors = ["Junji Torii", "Hiroki Matsue"]
s.homepage = 'http://code.google.com/p/roma-prj/'
s.name = "roma"
s.version = CURRENT_VERSION
s.summary = "ROMA server"
s.description = <<-EOF
ROMA server
EOF
s.files = PKG_FILES.to_a
# Use these for libraries.
s.require_path = base + 'lib'
# Use these for applications.
s.bindir = base + "bin"
s.executables = EXEC_TABLE
s.default_executable = "romad"
s.has_rdoc = true
s.rdoc_options.concat RDOC_OPTIONS
s.extra_rdoc_files = ["README", "CHANGELOG"]
s.add_dependency('eventmachine')
end
package_task = PackageTask.new(SPEC) do |pkg|
end
Rake::RDocTask.new("doc") { |rdoc|
rdoc.rdoc_dir = 'doc'
rdoc.title = "ROMA documents"
rdoc.options.concat RDOC_OPTIONS
rdoc.rdoc_files.include('lib/**/*.rb')
rdoc.rdoc_files.include("README")
}