about summary refs log tree commit homepage
path: root/unicorn.gemspec
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-12-24 08:37:22 +0000
committerEric Wong <normalperson@yhbt.net>2010-12-25 19:27:18 +0000
commitf62ef19a4aa3d3e4ce1aa37a499907ff776a8964 (patch)
treede5cef142c47619ab59eced3d35ecc04fe01dcdf /unicorn.gemspec
parent210e5cc3109af248d29f1d722076ff8ecd1fde2d (diff)
downloadunicorn-f62ef19a4aa3d3e4ce1aa37a499907ff776a8964.tar.gz
wrongdoc factors out a bunch of common code from this
project into its own and removes JavaScript from RDoc
to boot.
Diffstat (limited to 'unicorn.gemspec')
-rw-r--r--unicorn.gemspec33
1 files changed, 10 insertions, 23 deletions
diff --git a/unicorn.gemspec b/unicorn.gemspec
index b79d7d4..e08e5a7 100644
--- a/unicorn.gemspec
+++ b/unicorn.gemspec
@@ -1,7 +1,9 @@
 # -*- encoding: binary -*-
-
 ENV["VERSION"] or abort "VERSION= must be specified"
 manifest = File.readlines('.manifest').map! { |x| x.chomp! }
+require 'wrongdoc'
+extend Wrongdoc::Gemspec
+name, summary, title = readme_metadata
 
 # don't bother with tests that fork, not worth our time to get working
 # with `gem check -t` ... (of course we care for them when testing with
@@ -12,35 +14,19 @@ end.compact
 
 Gem::Specification.new do |s|
   s.name = %q{unicorn}
-  s.version = ENV["VERSION"]
-
-  s.authors = ["Unicorn hackers"]
+  s.version = ENV["VERSION"].dup
+  s.authors = ["#{name} hackers"]
   s.date = Time.now.utc.strftime('%Y-%m-%d')
-  s.description = File.read("README").split(/\n\n/)[1].delete('\\')
+  s.description = readme_description
   s.email = %q{mongrel-unicorn@rubyforge.org}
   s.executables = %w(unicorn unicorn_rails)
   s.extensions = %w(ext/unicorn_http/extconf.rb)
-
-  s.extra_rdoc_files = File.readlines('.document').map! do |x|
-    x.chomp!
-    if File.directory?(x)
-      manifest.grep(%r{\A#{x}/})
-    elsif File.file?(x)
-      x
-    else
-      nil
-    end
-  end.flatten.compact
-
+  s.extra_rdoc_files = extra_rdoc_files(manifest)
   s.files = manifest
-  s.homepage = %q{http://unicorn.bogomips.org/}
-
-  summary = %q{Rack HTTP server for fast clients and Unix}
-  s.rdoc_options = [ "-t", "Unicorn: #{summary}" ]
+  s.homepage = Wrongdoc.config[:rdoc_url]
+  s.rdoc_options = rdoc_options
   s.require_paths = %w(lib ext)
   s.rubyforge_project = %q{mongrel}
-  s.summary = summary
-
   s.test_files = test_files
 
   # for people that are absolutely stuck on Rails 2.3.2 and can't
@@ -51,6 +37,7 @@ Gem::Specification.new do |s|
   s.add_dependency(%q<kgio>, '~> 2.0.0')
 
   s.add_development_dependency('isolate', '~> 3.0.0')
+  s.add_development_dependency('wrongdoc', '~> 1.0.1')
 
   # s.licenses = %w(GPLv2 Ruby) # licenses= method is not in older RubyGems
 end