-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
57 lines (46 loc) · 1.36 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
# -*- encoding: utf-8 -*-
require 'pathname'
require 'rubygems'
require 'rubygems/package_task'
require 'rdoc/task'
require 'rake/testtask'
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
require 'dhcp/version'
gemspec = Gem::Specification.new do |s|
s.name = 'dhcp'
s.version = DHCP::Version::STRING
s.authors = [ 'Aaron D. Gifford' ]
s.license = 'MIT'
s.homepage = 'http://www.aarongifford.com/computers/dhcp/'
s.summary = "dhcp-#{DHCP::Version::STRING}"
s.description = 'A pure-ruby library for parsing and creating IPv4 DHCP packets (requests or responses)'
s.add_runtime_dependency 'ipaddress'
s.rubygems_version = DHCP::Version::STRING
s.rubyforge_project = 'dhcp'
s.files = Pathname.glob([
'*',
'lib/*',
'lib/*/*',
'bin/*'
]).select{|x| File.file?(x)}.map{|x| x.to_s}
s.require_paths = [ 'lib' ]
s.executables = Pathname.glob(['bin/*']).select{|x| File.file?(x)}.map{|x| x.to_s}
end
Gem::PackageTask.new(gemspec) do |pkg|
pkg.need_zip = true
pkg.need_tar = true
end
RDoc::Task.new do |rdoc|
rdoc.main = 'README.rdoc'
rdoc.rdoc_dir = 'doc'
rdoc.rdoc_files.include('README.rdoc', 'lib/**/*.rb')
end
Rake::TestTask.new do |t|
t.test_files = FileList['test/*_test.rb']
t.verbose = true
end
task :default => [
'pkg/dhcp-' + DHCP::Version::STRING + '.gem',
:rdoc,
:test
]