为本地安装的宝石生成RDOC [英] Generating RDOCs for locally installed gems

查看:179
本文介绍了为本地安装的宝石生成RDOC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力为最近对Nesta感兴趣的宝石做出贡献。开发人员在创建最轻,最薄的CMS之一方面做得非常出色,我想将其记录下来。我已经阅读了代码,并根据我的知识对几种方法进行了评论。

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.

我尝试过的东西:


  1. 手动编辑。

    • 记录文件。

    • 烧毁 gem服务器

  1. Manual edit.
    • Documented the file.
    • Fired up gem server.

  • 记录文件。

  • Ran gem rdoc nesta --rdoc / li>
  • 重新启动 gem服务器

  • Documented the file.
  • Ran gem rdoc nesta --rdoc
  • Restarted gem server

全部无效请帮助。

谢谢。

All to no avail. Please help.
Thank you.

推荐答案

您可以预览生成的html页面,而无需安装修改版本你的机器上的宝石。将它添加到nesta的Rakefile中:

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

并键入 rake doc 。然后查看生成的 html / index.html 文件。

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

这篇关于为本地安装的宝石生成RDOC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆