From f62ef19a4aa3d3e4ce1aa37a499907ff776a8964 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 24 Dec 2010 08:37:22 +0000 Subject: doc: use wrongdoc for documentation wrongdoc factors out a bunch of common code from this project into its own and removes JavaScript from RDoc to boot. --- unicorn.gemspec | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) (limited to 'unicorn.gemspec') 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, '~> 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 -- cgit v1.2.3-24-ge0c7