Permalink
Browse files

add rdoc and gem tasks

  • Loading branch information...
1 parent 8e1e3c9 commit 71852e65c2ec7ff394a1c43128ac945efcc0e7cd @dj2 dj2 committed Jan 1, 2011
Showing with 18 additions and 0 deletions.
  1. +18 −0 Rakefile
View
@@ -1,8 +1,10 @@
require 'rubygems'
require 'rake'
+require 'rake/rdoctask'
require 'rake/testtask'
require 'spec/rake/spectask'
require 'rake/clean'
+require 'rake/gempackagetask'
CLEAN.include %w(**/*.{o,bundle,so,obj,lib,log} ext/*/Makefile ext/*/conftest.dSYM)
@@ -30,3 +32,19 @@ desc "run spec tests"
Spec::Rake::SpecTask.new('spec') do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
end
+
+desc 'Generate RDoc documentation'
+Rake::RDocTask.new(:rdoc) do |task|
+ task.rdoc_dir = 'doc'
+ task.title = 'Goliath'
+ task.options = %w(--title Goliath --main README --line-numbers)
+ task.rdoc_files.include(['lib/**/*.rb'])
+ task.rdoc_files.include(['README'])
+end
+
+spec = eval(File.read(File.join(File.dirname(__FILE__), "goliath.gemspec")))
+
+desc 'Generate GEM'
+Rake::GemPackageTask.new(spec) do |pkg|
+ pkg.need_tar = true
+end

0 comments on commit 71852e6

Please sign in to comment.