]> git.wincent.com - wikitext.git/commitdiff
Use YARD for doc generation instead of RDoc
authorWincent Colaiuta <win@wincent.com>
Sun, 13 Jun 2010 17:34:39 +0000 (19:34 +0200)
committerWincent Colaiuta <win@wincent.com>
Sun, 13 Jun 2010 17:40:56 +0000 (19:40 +0200)
The documentation is still going to require some tweaks, but this commit
switches over the build process to use YARD.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Rakefile
wikitext.gemspec

index 322b99162ad07ebbd0d57e00cd5650938e6b6122..1752066e082c2d12eb5fd0e3f7609f06e81bcd9f 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -14,7 +14,6 @@
 
 require 'rake'
 require 'rake/clean'
-require 'rake/rdoctask'
 require 'rubygems'
 require File.join(File.dirname(__FILE__), 'lib', 'wikitext', 'version.rb')
 
@@ -74,15 +73,13 @@ task :spec => :make do
   sh 'spec spec'
 end
 
-Rake::RDocTask.new do |t|
-  t.rdoc_files.include 'doc/README', 'doc/RELEASE-NOTES', 'doc/rdoc.rb'
-  t.options           << '--charset' << 'UTF-8' << '--inline-source'
-  t.main              = 'doc/README'
-  t.title             = 'Wikitext documentation'
+desc 'Build the YARD HTML files'
+task :yard do
+  sh 'yardoc -o html doc/*.rb - doc/RELEASE-NOTES'
 end
 
-desc 'Upload RDoc to RubyForge website'
-task :upload_rdoc => :rdoc do
+desc 'Upload YARD HTML to RubyForge website'
+task :upload_yard => :yard do
   sh 'scp -r html/* rubyforge.org:/var/www/gforge-projects/wikitext/'
 end
 
index 5c82fe020852cb42c011bdcd64115002c3ebd2b9..e5420ac39ed0bf24c79488a8329a370e19a2d8b0 100644 (file)
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
     Wikitext is a fast wikitext-to-HTML translator written in C.
   ENDDESC
   s.require_paths     = ['ext', 'lib']
-  s.has_rdoc          = true
+  s.has_rdoc          = false
   s.files             = Dir['bin/wikitext',
                             'ext/*.{rb,c,h}',
                             'ext/depend',
@@ -40,9 +40,11 @@ Gem::Specification.new do |s|
     s.add_development_dependency 'rspec'
     s.add_development_dependency 'thor'
     s.add_development_dependency 'wopen3'
+    s.add_development_dependency 'yard'
   else
     s.add_dependency 'rspec'
     s.add_dependency 'thor'
     s.add_dependency 'wopen3'
+    s.add_dependency 'yard'
   end
 end