forked from jmesnil/jmx4r
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
executable file
·69 lines (57 loc) · 1.87 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
require "rake/testtask"
require "rake/rdoctask"
require "rake/gempackagetask"
require "rubygems"
dir = File.dirname(__FILE__)
lib = File.join(dir, "lib", "jmx4r.rb")
version = "0.1.0"
task :default => [:test]
Rake::TestTask.new do |test|
test.libs << "test"
test.test_files = ["test/ts_all.rb"]
test.verbose = false
end
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_files.include( "README.rdoc", "LICENSE.txt", "AUTHORS.txt",
"lib/" )
rdoc.main = "README.rdoc"
rdoc.rdoc_dir = "doc/html"
rdoc.title = "jmx4r Documentation"
rdoc.options << "-S"
end
desc "Publish current documentation to Rubyforge"
task :publish_docs => [:rdoc] do
sh "scp -r doc/html/* " +
"[email protected]:/var/www/gforge-projects/jmx4r/doc/"
end
spec = Gem::Specification.new do |spec|
spec.name = "jmx4r"
spec.version = version
spec.platform = Gem::Platform::RUBY
spec.summary = "jmx4r is a JMX library for JRuby"
spec.files = Dir.glob("{examples,lib,test}/**/*.rb") + ["Rakefile"]
spec.test_files = "test/ts_all.rb"
spec.has_rdoc = true
spec.extra_rdoc_files = %w{README.rdoc LICENSE.txt}
spec.rdoc_options << '--title' << 'jmx4r Documentation' <<
'--main' << 'README.rdoc'
spec.require_path = 'lib'
spec.author = "Jeff Mesnil"
spec.email = "[email protected]"
spec.rubyforge_project = "jmx4r"
spec.homepage = "http://jmesnil.net/wiki/Jmx4r"
spec.description = <<END_DESC
jmx4r is a JMX library for JRuby
END_DESC
end
Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_zip = true
pkg.need_tar = true
end
desc "Show library's code statistics"
task :stats do
require 'code_statistics'
CodeStatistics.new( ["jmx4r", "lib"],
["Examples", "examples"],
["Units", "test"] ).to_s
end