public
Description: a JMX library for JRuby
Homepage: http://github.com/jmesnil/jmx4r/
Clone URL: git://github.com/jmesnil/jmx4r.git
jmx4r / Rakefile
100755 70 lines (57 sloc) 1.919 kb
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
require "rake/testtask"
require "rake/rdoctask"
require "rake/gempackagetask"
 
require "rubygems"
 
dir = File.dirname(__FILE__)
lib = File.join(dir, "lib", "jmx4r.rb")
version = "0.0.8"
 
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/* " +
     "jmesnil@rubyforge.org:/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 = "jmesnil@gmail.com"
  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