-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
69 lines (55 loc) · 1.82 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
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/gempackagetask'
$VERBOSE = nil
spec = Gem::Specification.new do |s|
s.name = 'logmerge'
s.version = '1.0.3'
s.summary = 'Resolves IP addresses and merges Apache access logs.'
s.authors = [ 'Eric Hodel', 'Klaas Jan Wierenga' ]
s.email = [ '[email protected]', '[email protected]' ]
s.homepage = 'http://github.com/kjwierenga/logmerge'
s.description = "
Logmerge contains two utilities logmerge and ip2name. logmerge merges Apache
access logs into one log ordered by date. ip2name performs DNS lookups on
Apache access logs using multiple threads and Ruby's DNS resolver library to
speed through log files."
s.files = File.read('Manifest.txt').split($/)
s.require_path = 'lib'
s.executables = %w[ip2name logmerge]
end
desc 'Run tests'
task :default => [ :test ]
Rake::TestTask.new('test') do |t|
t.libs << 'test'
t.verbose = true
end
desc 'Update Manifest.txt'
task :update_manifest do
sh "find . -type f | sed -e 's%./%%' | egrep -v 'svn|swp|~' | egrep -v '^(doc|pkg)/' | sort > Manifest.txt"
end
desc 'Generate RDoc'
Rake::RDocTask.new :rdoc do |rd|
rd.rdoc_dir = 'doc'
rd.rdoc_files.add 'lib', 'README', 'LICENSE'
rd.rdoc_files.exclude '*/resolv.rb' # WTF doesn't this work?
rd.main = 'README'
rd.options << '-d' if `which dot` =~ /\/dot/
end
desc 'Generate RDoc for dev.robotcoop.com'
Rake::RDocTask.new :dev_rdoc do |rd|
rd.rdoc_dir = '../../../www/trunk/dev/html/Tools/logmerge'
rd.rdoc_files.add 'lib', 'README', 'LICENSE'
rd.main = 'README'
rd.options << '-d' if `which dot` =~ /\/dot/
end
desc 'Build Gem'
Rake::GemPackageTask.new spec do |pkg|
pkg.need_tar = true
end
desc 'Clean up'
task :clean => [ :clobber_rdoc, :clobber_package ]
desc 'Clean up'
task :clobber => [ :clean ]
# vim: syntax=Ruby