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
|
require 'rake'
require 'rake/testtask'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rake/clean'
# test target
Rake::TestTask.new do |test|
test.libs << "lib"
end
# package target
PKG_VERSION = '1.0.1'
PKG_FILES = FileList[
'Rakefile',
'README',
'setup.rb',
'lib/**/*.rb',
'test/**/test*.rb',
'test/**/*.yaml',
'examples/*.rb',
'data/**/*.yaml']
CLEAN.include 'pkg'
CLEAN.include 'doc'
CLEAN.include 'web/web'
spec = Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.summary = "A Ruby implementation of SNMP (the Simple Network Management Protocol)."
s.name = 'snmp'
s.version = PKG_VERSION
s.autorequire = 'snmp'
s.files = PKG_FILES.to_a
s.has_rdoc = true
s.extra_rdoc_files = ['README']
s.rdoc_options << '--main' << 'README' <<
'--title' << 'SNMP Library for Ruby'
s.description = "A Ruby implementation of SNMP (the Simple Network Management Protocol)."
s.author = 'Dave Halliday'
s.email = 'snmp@halliday.ca'
s.rubyforge_project = 'snmplib'
s.homepage = 'http://snmplib.rubyforge.org'
end
Rake::GemPackageTask.new(spec) do |package|
package.need_zip = true
package.need_tar = true
end
# rdoc, clobber_rdoc, rerdoc targets
Rake::RDocTask.new do |doc|
doc.rdoc_dir = "doc"
doc.main = "README"
doc.rdoc_files.include('README', 'lib/**/*.rb')
doc.title = "SNMP Library for Ruby"
end
task :web => :rdoc do
require 'web/generate'
end
|