-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathRakefile
36 lines (30 loc) · 931 Bytes
/
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
require 'rubygems/package_task'
require 'rdoc/task'
spec = Gem::Specification.new { |s|
s.platform = Gem::Platform::RUBY
s.author = "Pete Elmore"
s.email = "[email protected]"
s.files = Dir["{lib,doc,bin,ext}/**/*"].delete_if {|f|
/\/rdoc(\/|$)/i.match f
} + %w(Rakefile README)
s.require_path = 'lib'
s.has_rdoc = true
s.extra_rdoc_files = Dir['doc/*'].select(&File.method(:file?))
s.extensions << 'ext/extconf.rb' if File.exist? 'ext/extconf.rb'
Dir['bin/*'].map(&File.method(:basename)).map(&s.executables.method(:<<))
s.name = 'hoshi'
s.summary = "Nice, object-oriented, first-class views."
s.homepage = "http://debu.gs/#{s.name}"
%w(hpricot).each &s.method(:add_dependency)
s.version = '1.1.2'
}
Gem::PackageTask.new(spec) { |pkg|
pkg.need_tar_bz2 = true
}
task(:install => :package) {
g = "pkg/#{spec.name}-#{spec.version}.gem"
system "gem install -l #{g}"
}
task(:test) {
system "ruby test/run.rb"
}