select/Rakefile

59 lines
1.4 KiB
Ruby
Raw Permalink Normal View History

2010-01-30 01:27:51 +01:00
require 'rubygems'
require 'rake'
begin
2016-08-25 22:33:27 +02:00
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "select"
gem.summary = %Q{IO-event-handler based on select}
gem.description = %Q{Select based event-handler for servers and sockets}
gem.email = "ich@denkn.at"
gem.license = 'LGPL-3.0'
gem.homepage = "http://github.com/DenisKnauf/select"
gem.authors = ["Denis Knauf"]
gem.files = %w[README.md VERSION lib/**/*.rb test/**/*.rb]
gem.require_paths = %w[lib]
end
Jeweler::GemcutterTasks.new
2010-01-30 01:27:51 +01:00
rescue LoadError
2016-08-25 22:33:27 +02:00
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
2010-01-30 01:27:51 +01:00
end
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
2016-08-25 22:33:27 +02:00
test.libs << 'lib' << 'test' << 'ext'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
2010-01-30 01:27:51 +01:00
end
begin
2016-08-25 22:33:27 +02:00
require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end
2010-01-30 01:27:51 +01:00
rescue LoadError
2016-08-25 22:33:27 +02:00
task :rcov do
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
end
2010-01-30 01:27:51 +01:00
end
task :test => :check_dependencies
task :default => :test
2016-08-25 22:33:27 +02:00
require 'rdoc/task'
2010-01-30 01:27:51 +01:00
Rake::RDocTask.new do |rdoc|
2016-08-25 22:33:27 +02:00
if File.exist?('VERSION')
version = File.read('VERSION')
else
version = ""
end
2010-01-30 01:27:51 +01:00
2016-08-25 22:33:27 +02:00
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "select #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
2010-01-30 01:27:51 +01:00
end