New package task. Moved doc output dir to "html".
This commit is contained in:
parent
cb2d775bb1
commit
9cea65bce0
|
@ -1,4 +1,4 @@
|
|||
doc
|
||||
html
|
||||
t
|
||||
pkg
|
||||
doc
|
||||
|
|
34
README.rdoc
34
README.rdoc
|
@ -8,18 +8,34 @@ data saved to the database (especially primary key values). Do *_not_* use
|
|||
this for any production data yet.
|
||||
|
||||
|
||||
= Installation
|
||||
|
||||
Install the "mongo" gem by typing
|
||||
|
||||
$ sudo gem install mongo
|
||||
|
||||
The source code is available at http://github.com/jimm/mongo-ruby-driver. You
|
||||
can either clone the git repository or download a tarball or zip file. Once
|
||||
you have the source, you can use it from wherever you downloaded it or you can
|
||||
install it as a gem from the source by typing
|
||||
|
||||
$ rake gem:install
|
||||
|
||||
|
||||
= Demo
|
||||
|
||||
Mongo must be running, of course.
|
||||
You can see and run the examples if you've downloaded the source. Mongo must
|
||||
be running, of course.
|
||||
|
||||
$ ruby examples/simple.rb
|
||||
|
||||
See also the test code, especially
|
||||
http://github.com/jimm/mongo-ruby-driver/tree/master/tests/test_db_api.rb
|
||||
See also the test code, especially tests/test_db_api.rb.
|
||||
|
||||
|
||||
= Testing
|
||||
|
||||
If you have the source code, you can run the tests.
|
||||
|
||||
$ rake test
|
||||
|
||||
The tests assume that the Mongo database is running on the default port.
|
||||
|
@ -27,12 +43,12 @@ The tests assume that the Mongo database is running on the default port.
|
|||
|
||||
= Documentation
|
||||
|
||||
This documentation is available online at http://mongo.rubyforge.org. You can
|
||||
generate the documentation if you have the source by typing
|
||||
|
||||
$ rake rdoc
|
||||
|
||||
Then open the file doc/index.html. (I need to figure out where to put this on
|
||||
the Web, or perhaps how to publish this to the Wiki at
|
||||
http://github.com/jimm/mongo-ruby-driver/wikis automatically. I have applied
|
||||
for a RubyForge project, so the docs will eventually go there.)
|
||||
Then open the file html/index.html.
|
||||
|
||||
|
||||
= Release Notes
|
||||
|
@ -42,8 +58,6 @@ See the git log comments.
|
|||
|
||||
= To Do
|
||||
|
||||
* Add :publish Rake task, once we get a RubyForge project.
|
||||
|
||||
* Add group_by. Need to figure out how we are going to send functions. The
|
||||
current thinking is that Mongo will allow a subset of JavaScript (which we
|
||||
would have to send as a string), but this is still under discussion.
|
||||
|
@ -88,8 +102,6 @@ Adrian Madrid, aemadrid@gmail.com
|
|||
|
||||
= License
|
||||
|
||||
== Mongo Ruby Driver
|
||||
|
||||
Copyright (C) 2008-2009 10gen Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
|
|
12
Rakefile
12
Rakefile
|
@ -4,6 +4,7 @@ require 'fileutils'
|
|||
require 'rake'
|
||||
require 'rake/testtask'
|
||||
require 'rake/gempackagetask'
|
||||
require 'rake/contrib/rubyforgepublisher'
|
||||
|
||||
GEM = "mongo"
|
||||
GEM_VERSION = '0.0.1'
|
||||
|
@ -12,6 +13,7 @@ DESCRIPTION = 'This is a simple pure-Ruby driver for the 10gen Mongo DB. For mor
|
|||
AUTHOR = 'Jim Menard'
|
||||
EMAIL = 'jimm@io.com'
|
||||
HOMEPAGE = 'http://www.mongodb.org'
|
||||
RUBYFORGE_USER = 'jimm'
|
||||
|
||||
spec = Gem::Specification.new do |s|
|
||||
s.name = GEM
|
||||
|
@ -42,8 +44,14 @@ end
|
|||
|
||||
desc "Generate documentation"
|
||||
task :rdoc do
|
||||
FileUtils.rm_rf('doc')
|
||||
system "rdoc --main README.rdoc --inline-source --quiet README.rdoc `find lib -name '*.rb'`"
|
||||
FileUtils.rm_rf('html')
|
||||
system "rdoc --main README.rdoc --op html --inline-source --quiet README.rdoc `find lib -name '*.rb'`"
|
||||
end
|
||||
|
||||
desc "Publish documentation to mongo.rubyforge.org"
|
||||
task :publish => [:rdoc] do
|
||||
# Assumes docs are in ./html
|
||||
Rake::RubyForgePublisher.new(GEM, RUBYFORGE_USER).upload
|
||||
end
|
||||
|
||||
namespace :gem do
|
||||
|
|
Loading…
Reference in New Issue