diff options
author | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-02-12 03:37:38 +0000 |
---|---|---|
committer | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-02-12 03:37:38 +0000 |
commit | 67a0d9e93388093eb8fb05dd42655a90a832bc21 (patch) | |
tree | 741991a1fa25fb6ac0c72a0aa69ef3e898d67adc /tools/rakehelp.rb | |
parent | 996d1046659b9d5991ce42f89bb5e9a0356f0cfd (diff) | |
download | unicorn-67a0d9e93388093eb8fb05dd42655a90a832bc21.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@32 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'tools/rakehelp.rb')
-rw-r--r-- | tools/rakehelp.rb | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/tools/rakehelp.rb b/tools/rakehelp.rb index 6996658..7b36230 100644 --- a/tools/rakehelp.rb +++ b/tools/rakehelp.rb @@ -65,35 +65,39 @@ end def setup_gem(pkg_name, pkg_version, author, summary, executables, test_file) - pkg_version = pkg_version - pkg_name = pkg_name - pkg_file_name = "#{pkg_name}-#{pkg_version}" - - spec = Gem::Specification.new do |s| - s.name = pkg_name - s.version = pkg_version - s.platform = Gem::Platform::RUBY - s.author = author - s.summary = summary - s.test_file = test_file - s.has_rdoc = true - s.extra_rdoc_files = [ "README" ] - - s.files = %w(COPYING LICENSE ext/http11/MANIFEST README Rakefile setup.rb) + - Dir.glob("{bin,doc,test,lib}/**/*") + - Dir.glob("ext/**/*.{h,c,rb}") + - Dir.glob("examples/**/*.rb") + - Dir.glob("tools/*.rb") + pkg_version = pkg_version + pkg_name = pkg_name + pkg_file_name = "#{pkg_name}-#{pkg_version}" + + spec = Gem::Specification.new do |s| + s.name = pkg_name + s.version = pkg_version + s.platform = Gem::Platform::RUBY + s.author = author + s.summary = summary + s.test_file = test_file + s.has_rdoc = true + s.extra_rdoc_files = [ "README" ] - s.require_path = "lib" - s.extensions = FileList["ext/**/extconf.rb"].to_a - - s.executables = executables - s.bindir = "bin" - end - - Rake::GemPackageTask.new(spec) do |p| - p.gem_spec = spec - p.need_tar = true + s.files = %w(COPYING LICENSE ext/http11/MANIFEST README Rakefile setup.rb) + + Dir.glob("{bin,doc,test,lib}/**/*") + + Dir.glob("ext/**/*.{h,c,rb}") + + Dir.glob("examples/**/*.rb") + + Dir.glob("tools/*.rb") + + s.require_path = "lib" + s.extensions = FileList["ext/**/extconf.rb"].to_a + + s.executables = executables + s.bindir = "bin" + + if block_given? + yield s end + end + + Rake::GemPackageTask.new(spec) do |p| + p.gem_spec = spec + p.need_tar = true + end end |