Generating RDOCs for locally installed gems
Asked Answered
R

2

2

I am trying to contribute to a gem I recently took interest in - Nesta. The developer has done a great job in creating one of the lightest, thinest CMSs you can find and I want to document it. I have read through the code and commented on a few methods to the best of my knowledge.

However, I seek to test this out locally by calling gem server and seeing the changes on my machine before pushing it online.

Things I have tried:

  1. Manual edit.
    • Documented the file.
    • Fired up gem server.
  2. Using the gem tool.
    • Documented the file.
    • Ran gem rdoc nesta --rdoc
    • Restarted gem server

All to no avail. Please help.
Thank you.

Radioman answered 25/4, 2011 at 8:10 Comment(0)
H
3

You can preview generated html pages without installing a modified version of the gem on your machine. Add this to nesta's Rakefile:

require 'rake/rdoctask'
Rake::RDocTask.new('doc') do |i|
  i.rdoc_files = FileList['lib/**/*']
end

and type rake doc. Then view generated html/index.html file.

Helldiver answered 25/4, 2011 at 10:15 Comment(0)
G
0

Are you sure you've installed the version that you've modified, not the original version?

If you've installed the modified version, but have forgotten to install the rdoc, see Can you install documentation for existing gems?

Gerrigerrie answered 25/4, 2011 at 10:6 Comment(1)
how do I install the modified version of the gem? The gem installed in some directory under RVM. I changed the files there. I didn't copy it from it's install directory. Do I still have to reinstall it?Radioman

© 2022 - 2024 — McMap. All rights reserved.