diff --git a/Rakefile b/Rakefile index 3f34c04..bd765a2 100644 --- a/Rakefile +++ b/Rakefile @@ -21,8 +21,10 @@ end desc "Generate documentation" task :rdoc do - FileUtils.rm_rf('html') - system "rdoc --main README.rdoc --op html --inline-source --quiet README.rdoc `find lib -name '*.rb'`" + version = eval(File.read("mongo-ruby-driver.gemspec")).version + out = File.join('html', version.to_s) + FileUtils.rm_rf(out) + system "rdoc --main README.rdoc --op #{out} --inline-source --quiet README.rdoc `find lib -name '*.rb'`" end desc "Publish documentation to mongo.rubyforge.org"