summaryrefslogtreecommitdiffstats
path: root/ruby
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-03-15 14:48:12 +0000
committerRichard W.M. Jones <rjones@redhat.com>2011-03-15 14:53:08 +0000
commite9f25e693e3211b0219d84f956dcd3d164bac9d3 (patch)
tree6aeee87667e343fb243197ba71ce89c33f0e8293 /ruby
parent6a64114929a0b098f5a1e31e17e7802127925007 (diff)
downloadlibguestfs-e9f25e693e3211b0219d84f956dcd3d164bac9d3.tar.gz
libguestfs-e9f25e693e3211b0219d84f956dcd3d164bac9d3.tar.xz
libguestfs-e9f25e693e3211b0219d84f956dcd3d164bac9d3.zip
ruby: Add rdoc documentation (RHBZ#667610).
Diffstat (limited to 'ruby')
-rw-r--r--ruby/Makefile.am1
-rw-r--r--ruby/README.rdoc4
-rw-r--r--ruby/Rakefile.in15
-rw-r--r--ruby/doc/site/index.html8
4 files changed, 27 insertions, 1 deletions
diff --git a/ruby/Makefile.am b/ruby/Makefile.am
index cd2d4ed0..9df33992 100644
--- a/ruby/Makefile.am
+++ b/ruby/Makefile.am
@@ -50,6 +50,7 @@ TESTS_ENVIRONMENT = \
all: $(generator_built)
rake build
+ rake rdoc
RUBY_SITELIB := $(shell ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
RUBY_SITEARCH := $(shell ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")
diff --git a/ruby/README.rdoc b/ruby/README.rdoc
new file mode 100644
index 00000000..b1ffb269
--- /dev/null
+++ b/ruby/README.rdoc
@@ -0,0 +1,4 @@
+= Ruby bindings for libguestfs
+
+The module Guestfs provides Ruby bindings for
+{the libguestfs API}[http://libguestfs.org/guestfs.3.html].
diff --git a/ruby/Rakefile.in b/ruby/Rakefile.in
index e77b0ebd..ccbcae12 100644
--- a/ruby/Rakefile.in
+++ b/ruby/Rakefile.in
@@ -60,10 +60,23 @@ Rake::TestTask.new(:test) do |t|
end
task :test => :build
+RDOC_FILES = FileList[
+ "README.rdoc",
+ "lib/**/*.rb",
+ "ext/**/*.[ch]"
+]
+
Rake::RDocTask.new do |rd|
rd.main = "README.rdoc"
rd.rdoc_dir = "doc/site/api"
- rd.rdoc_files.include("README.rdoc", "lib/**/*.rb", "ext/**/*.[ch]")
+ rd.rdoc_files.include(RDOC_FILES)
+end
+
+Rake::RDocTask.new(:ri) do |rd|
+ rd.main = "README.rdoc"
+ rd.rdoc_dir = "doc/ri"
+ rd.options << "--ri-system"
+ rd.rdoc_files.include(RDOC_FILES)
end
# Package tasks
diff --git a/ruby/doc/site/index.html b/ruby/doc/site/index.html
new file mode 100644
index 00000000..b64b8121
--- /dev/null
+++ b/ruby/doc/site/index.html
@@ -0,0 +1,8 @@
+<html>
+<head><title>Ruby documentation for libguestfs</title></head>
+<body>
+<p>
+ <a href="api/index.html">Ruby API documentation for libguestfs</a>
+</p>
+</body>
+</html>