forked from ruby-dns/net-dns
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRakefile
71 lines (48 loc) · 1.69 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
require 'rubygems'
require 'bundler'
$:.unshift(File.dirname(__FILE__) + "/lib")
require 'net/dns'
# Common package properties
PKG_NAME = ENV['PKG_NAME'] || 'net-dns'
PKG_VERSION = ENV['PKG_VERSION'] || Net::DNS::VERSION
# Run test by default.
task :default => :test
spec = Gem::Specification.new do |s|
s.name = PKG_NAME
s.version = PKG_VERSION
s.summary = "Pure Ruby DNS library."
s.description = "Net::DNS is a pure Ruby DNS library, with a clean OO interface and an extensible API."
s.required_ruby_version = ">= 1.8.7"
s.authors = ["Marco Ceresa", "Simone Carletti"]
s.email = ["ceresa@gmail.com", "weppos@weppos.net"]
s.homepage = "http://github.com/bluemonk/net-dns"
s.rubyforge_project = "net-dns"
s.add_development_dependency "rake", "~> 0.9"
s.add_development_dependency "yard"
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.require_paths = %w( lib )
end
require 'rubygems/package_task'
Gem::PackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
end
desc "Build the gemspec file #{spec.name}.gemspec"
task :gemspec do
file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
File.open(file, "w") {|f| f << spec.to_ruby }
end
require 'rake/testtask'
# Run all the tests in the /test folder
Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList["test/**/*_test.rb"]
t.verbose = true
end
require 'yard'
require 'yard/rake/yardoc_task'
YARD::Rake::YardocTask.new(:yardoc)
desc "Open an irb session preloaded with this library"
task :console do
sh "irb -rubygems -I lib -r net/dns.rb"
end