jmesnil / jmx4r
- Source
- Commits
- Network (3)
- Issues (0)
- Downloads (6)
- Wiki (1)
- Graphs
-
Tree:
0da6a8b
jmx4r / Rakefile
| b466dce4 » | jmesnil | 2008-04-10 | 1 | require "rake/testtask" | |
| 2 | require "rake/rdoctask" | ||||
| 3 | require "rake/gempackagetask" | ||||
| 4 | |||||
| 5 | require "rubygems" | ||||
| 6 | |||||
| 7 | dir = File.dirname(__FILE__) | ||||
| 8 | lib = File.join(dir, "lib", "jmx4r.rb") | ||||
| 3a5dbfa4 » | jmesnil | 2009-06-15 | 9 | version = "0.0.8" | |
| b466dce4 » | jmesnil | 2008-04-10 | 10 | ||
| 11 | task :default => [:test] | ||||
| 12 | |||||
| 13 | Rake::TestTask.new do |test| | ||||
| 14 | test.libs << "test" | ||||
| 15 | test.test_files = ["test/ts_all.rb"] | ||||
| 16 | test.verbose = false | ||||
| 17 | end | ||||
| 18 | |||||
| 19 | Rake::RDocTask.new do |rdoc| | ||||
| cc5eafd1 » | jmesnil | 2008-12-03 | 20 | rdoc.rdoc_files.include( "README.rdoc", "LICENSE.txt", "AUTHORS.txt", | |
| b466dce4 » | jmesnil | 2008-04-10 | 21 | "lib/" ) | |
| cc5eafd1 » | jmesnil | 2008-12-03 | 22 | rdoc.main = "README.rdoc" | |
| b466dce4 » | jmesnil | 2008-04-10 | 23 | rdoc.rdoc_dir = "doc/html" | |
| 24 | rdoc.title = "jmx4r Documentation" | ||||
| 25 | rdoc.options << "-S" | ||||
| 26 | end | ||||
| 27 | |||||
| 28 | desc "Publish current documentation to Rubyforge" | ||||
| 29 | task :publish_docs => [:rdoc] do | ||||
| 30 | sh "scp -r doc/html/* " + | ||||
| 31 | "jmesnil@rubyforge.org:/var/www/gforge-projects/jmx4r/doc/" | ||||
| 32 | end | ||||
| 33 | |||||
| 34 | spec = Gem::Specification.new do |spec| | ||||
| 35 | spec.name = "jmx4r" | ||||
| 36 | spec.version = version | ||||
| 37 | spec.platform = Gem::Platform::RUBY | ||||
| 38 | spec.summary = "jmx4r is a JMX library for JRuby" | ||||
| 39 | spec.files = Dir.glob("{examples,lib,test}/**/*.rb") + ["Rakefile"] | ||||
| 40 | |||||
| 328766f6 » | jmesnil | 2008-04-12 | 41 | spec.test_files = "test/ts_all.rb" | |
| b466dce4 » | jmesnil | 2008-04-10 | 42 | spec.has_rdoc = true | |
| cc5eafd1 » | jmesnil | 2008-12-03 | 43 | spec.extra_rdoc_files = %w{README.rdoc LICENSE.txt} | |
| b466dce4 » | jmesnil | 2008-04-10 | 44 | spec.rdoc_options << '--title' << 'jmx4r Documentation' << | |
| cc5eafd1 » | jmesnil | 2008-12-03 | 45 | '--main' << 'README.rdoc' | |
| b466dce4 » | jmesnil | 2008-04-10 | 46 | ||
| 47 | spec.require_path = 'lib' | ||||
| 48 | |||||
| 49 | spec.author = "Jeff Mesnil" | ||||
| 50 | spec.email = "jmesnil@gmail.com" | ||||
| 51 | spec.rubyforge_project = "jmx4r" | ||||
| 2b733f36 » | jmesnil | 2009-01-04 | 52 | spec.homepage = "http://jmesnil.net/wiki/Jmx4r" | |
| b466dce4 » | jmesnil | 2008-04-10 | 53 | spec.description = <<END_DESC | |
| 54 | jmx4r is a JMX library for JRuby | ||||
| 55 | END_DESC | ||||
| 56 | end | ||||
| 57 | |||||
| 58 | Rake::GemPackageTask.new(spec) do |pkg| | ||||
| 59 | pkg.need_zip = true | ||||
| 60 | pkg.need_tar = true | ||||
| 61 | end | ||||
| 62 | |||||
| 63 | desc "Show library's code statistics" | ||||
| 64 | task :stats do | ||||
| 65 | require 'code_statistics' | ||||
| 66 | CodeStatistics.new( ["jmx4r", "lib"], | ||||
| 67 | ["Examples", "examples"], | ||||
| 68 | ["Units", "test"] ).to_s | ||||
| 69 | end | ||||
