-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
executable file
·66 lines (55 loc) · 1.81 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
require "rake/testtask"
require "rake/rdoctask"
require "rake/gempackagetask"
require "rubygems"
require 'jruby'
dir = File.dirname(__FILE__)
lib = File.join(dir, "lib", "jms4r.rb")
java_libs = File.join(dir, "lib", "java", "*.jar")
Dir[java_libs].each { |jar| puts "#{jar}"; require jar }
version = "0.0.1"
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 = "jms4r Documentation"
rdoc.options << "-S"
end
spec = Gem::Specification.new do |spec|
spec.name = "jms4r"
spec.version = version
spec.platform = Gem::Platform::RUBY
spec.summary = "jms4r is a JMS library for JRuby"
spec.files = Dir.glob("{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' << 'jms4r Documentation' <<
'--main' << 'README.rdoc'
spec.require_path = 'lib'
spec.author = "Jeff Mesnil"
spec.email = "jmesnil@gmail.com"
spec.rubyforge_project = "jms4r"
spec.homepage = "http://github.com/jmesnil/jms4r/"
spec.description = <<END_DESC
jms4r is a JMS 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