Rakefile in file-tail-0.1.3 vs Rakefile in file-tail-0.1.4

- old
+ new

@@ -1,38 +1,50 @@ -# Rakefile for File::Tail -*- ruby -*- +# vim: set filetype=ruby et sw=2 ts=2: require 'rake/gempackagetask' require 'rbconfig' include Config PKG_NAME = 'file-tail' PKG_VERSION = File.read('VERSION').chomp -PKG_FILES = Dir.glob("**/*").delete_if { |item| - item.include?("CVS") or item.include?("pkg") -} +PKG_FILES = FileList["**/*"].exclude(/pkg|coverage|doc/) desc "Installing library" task :install do - libdir = CONFIG["sitelibdir"] - dest = File.join(libdir, 'file') - install('lib/file/tail.rb', dest) + ruby 'install.rb' end +desc "Creating documentation" +task :doc do + ruby 'make_doc.rb' +end + desc "Testing library" task :test do - ruby %{-Ilib tests/test.rb} + ruby %{-Ilib tests/test_file-tail.rb} end +desc "Testing library with rcov" +task :coverage do + system %{rcov -x '\\btests\/' -Ilib tests/test_file-tail.rb} +end + +desc "Removing generated files" +task :clean do + rm_rf 'doc' + rm_rf 'coverage' +end + spec = Gem::Specification.new do |s| #### Basic information. s.name = 'file-tail' s.version = PKG_VERSION s.summary = "File::Tail for Ruby" - s.description = "" + s.description = "Library to tail files in Ruby" #### Dependencies and requirements. #s.add_dependency('log4r', '> 1.0.4') #s.requirements << "" @@ -44,25 +56,24 @@ #s.extensions << "ext/extconf.rb" #### Load-time details: library and application (you will need one or both). s.require_path = 'lib' # Use these for libraries. - s.autorequire = 'file/tail' + #s.autorequire = 'file/tail' #s.bindir = "bin" # Use these for applications. #s.executables = ["bla.rb"] #s.default_executable = "bla.rb" #### Documentation and testing. s.has_rdoc = true #s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a - #s.rdoc_options << - # '--title' << 'Rake -- Ruby Make' << - # '--main' << 'README' << + s.rdoc_options << + '--title' << 'File::Tail' << # '--line-numbers' - s.test_files << 'tests/test.rb' + s.test_files << 'tests/test_file-tail.rb' #### Author and project details. s.author = "Florian Frank" s.email = "flori@ping.de" @@ -72,6 +83,7 @@ Rake::GemPackageTask.new(spec) do |pkg| pkg.need_tar = true pkg.package_files += PKG_FILES end - # vim: set et sw=2 ts=2: + +task :release => [ :clean, :package ]