Permalink
Browse files

Add support for eating our own dogfood.

  • Loading branch information...
1 parent 2cd0ff8 commit 0447008bd48a46f91e87d1ba1522d49496013015 @raggi committed Jul 27, 2010
Showing with 22 additions and 0 deletions.
  1. +22 −0 Rakefile
View
@@ -7,3 +7,25 @@ end
task :install => [:gem] do
sh "gem install hanna*.gem"
end
+
+ENV['RUBYOPT'] = (ENV['RUBYOPT']||'') + ' -Ilib'
+
+require 'rdoc/task'
+RDoc::Task.new do |t|
+ t.rdoc_dir = 'doc'
+ t.options.push('-f', 'hanna')
+ t.main = Dir['README*'].first
+ t.rdoc_files.include(*eval(File.read('hanna.gemspec')).files)
+ t.rdoc_files.exclude('Rakefile')
+end
+
+task :docs => :rerdoc do
+ case RUBY_PLATFORM
+ when /mswin|mingw/
+ sh "start", "html/index.html"
+ when /darwin/
+ sh "open", "html/index.html"
+ else
+ sh "firefox", "html/index.html"
+ end
+end

0 comments on commit 0447008

Please sign in to comment.