1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
puma--puma/projects/gem_plugin/resources/Rakefile
evanweaver ebcc25a49b there we go
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@618 19e92222-5c0b-0410-8929-a290d50e31e9
2007-09-24 04:23:49 +00:00

61 lines
1.5 KiB
Ruby

require 'rake'
require 'rake/testtask'
require 'rake/clean'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'fileutils'
include FileUtils
version="0.1"
name="<%= project %>"
spec = Gem::Specification.new do |s|
s.name = name
s.version = version
s.description = s.summary = "The <%= project %> GemPlugin"
s.author = "Nobody"
s.add_dependency('gem_plugin', '>= <%= gem_plugin_version %>')
s.platform = Gem::Platform::RUBY
s.has_rdoc = true
s.extra_rdoc_files = ["README"]
s.files = %w(COPYING LICENSE README Rakefile) +
Dir.glob("{bin,doc/rdoc,test,lib}/**/*") +
Dir.glob("ext/**/*.{h,c,rb}") +
Dir.glob("examples/**/*.rb") +
Dir.glob("tools/*.rb") +
Dir.glob("resources/**/*")
s.require_path = "lib"
s.bindir = "bin"
end
Rake::GemPackageTask.new(spec) do |p|
p.need_tar = true if RUBY_PLATFORM !~ /mswin/
end
task :install => [:test, :package] do
sh %{sudo gem install pkg/#{name}-#{version}.gem}
end
task :uninstall => [:clean] do
sh %{sudo gem uninstall #{name}}
end
Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList['test/test*.rb']
t.verbose = true
end
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'doc/rdoc'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.add ['README', 'LICENSE', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
end
task :default => [:test, :package]
CLEAN.include ['build/*', '**/*.o', '**/*.so', '**/*.a', 'lib/*-*', '**/*.log', 'pkg', 'lib/*.bundle', '*.gem', '.config']