about summary refs log tree commit homepage
path: root/rainbows.gemspec
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-12-24 08:52:55 +0000
committerEric Wong <normalperson@yhbt.net>2010-12-24 09:02:12 +0000
commit43e3d3f7a8dd2b184c8485469c2acff3dac34009 (patch)
treed605a400799b874c78f4f1299b9c4eb38317fe97 /rainbows.gemspec
parent7e0dc42f7084e1719456a80b2e44049133c2e8b7 (diff)
downloadrainbows-43e3d3f7a8dd2b184c8485469c2acff3dac34009.tar.gz
It is a common base so we can share documentation tasks
more easily with Unicorn and it ensures our RDoc no longer
has JavaScript in it!
Diffstat (limited to 'rainbows.gemspec')
-rw-r--r--rainbows.gemspec29
1 files changed, 11 insertions, 18 deletions
diff --git a/rainbows.gemspec b/rainbows.gemspec
index fc8b015..761b71b 100644
--- a/rainbows.gemspec
+++ b/rainbows.gemspec
@@ -9,32 +9,24 @@ manifest = File.readlines('.manifest').map! { |x| x.chomp! }
 test_files = manifest.grep(%r{\Atest/unit/test_.*\.rb\z}).map do |f|
   File.readlines(f).grep(/\bfork\b/).empty? ? f : nil
 end.compact
+require 'wrongdoc'
+extend Wrongdoc::Gemspec
+name, summary, title = readme_metadata
 
 Gem::Specification.new do |s|
   s.name = %q{rainbows}
-  s.version = ENV["VERSION"]
+  s.version = ENV["VERSION"].dup
 
-  s.authors = ["Rainbows! hackers"]
+  s.authors = ["#{name} hackers"]
   s.date = Time.now.utc.strftime('%Y-%m-%d')
-  s.description = File.read("README").split(/\n\n/)[1]
+  s.description = readme_description
   s.email = %q{rainbows-talk@rubyforge.org}
   s.executables = %w(rainbows)
-
-  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://rainbows.rubyforge.org/}
-  s.summary = %q{Unicorn for sleepy apps and slow clients}
-  s.rdoc_options = [ "-t", "Rainbows! #{s.summary}" ]
+  s.homepage = Wrongdoc.config[:rdoc_url]
+  s.summary = summary
+  s.rdoc_options = rdoc_options
   s.require_paths = %w(lib)
   s.rubyforge_project = %q{rainbows}
 
@@ -46,6 +38,7 @@ Gem::Specification.new do |s|
   # we need Unicorn for the HTTP parser and process management
   s.add_dependency(%q<unicorn>, ["~> 3.1.0"])
   s.add_development_dependency(%q<isolate>, "~> 3.0.0")
+  s.add_development_dependency(%q<wrongdoc>, "~> 1.0.1")
 
   # optional runtime dependencies depending on configuration
   # see t/test_isolate.rb for the exact versions we've tested with