Skip to content

Instantly share code, notes, and snippets.

@dariodaich
Last active February 1, 2018 17:12
Show Gist options
  • Save dariodaich/1edc998d3a0937898b56ede5cdae8be9 to your computer and use it in GitHub Desktop.
Save dariodaich/1edc998d3a0937898b56ede5cdae8be9 to your computer and use it in GitHub Desktop.
Guide on contributing to Ruby documentation.

How to contribute to Ruby docs

The Steps

  1. fork the documenting-ruby/ruby repo
  2. open the GitHub issue regarding docs you want to rewrite/add
  3. make your changes to the documentation
  4. use RDOC to generate local HTML pages for a preview
  5. delete RDOC generated temp directory
  6. commit the changes
  7. submit the pull request to documenting-ruby/ruby on trunk branch
  8. if you don't have one, open an account on Ruby's Redmine project
  9. open the Redmine issue and submit your patch

That's it!

Ruby version control

Ruby core team uses SVN to handle versioning, but there is also a GitHub repo.

Whom to assign the Redmine issue to?

Main person responsible for managing the documentation is Eric Hodel aka drbrain. When opening an issue on Redmine, assign it to him or zzak in order to make sure your issue gets resolved in a timely manner.

RDOC

Ruby uses RDoc to generate online documentation, meaning you will have to use it to mark up your docs and generate HTML in order to preview your work before you submit the patch.

rdoc -o tmpdoc PATH/TO/YOUR/FILES - generate temp directory where RDOC will put all of your generated files.

rm -rf tmpdoc - remove temp directory after you review the changes.

patch - creation and submission

Patch is a textual file that holds contents of your git diff. You can create it by either adding '.patch' to your commit URL on GitHub like this, or by running git format-patch HEAD~1.

After you create it, attach it when you open the issue.

Assign the issue to Eric Hodel - drbrain.

What to document!?

Pretty much anything you notice it is lacking in clarity, or is documented sparsely.

Take a look at the official list of areas that might benefit from improved documentation.

If you need a basic setup and handholding.

To know

Some PRs have been waiting to be merged from 2014. 😒

Additional resources

Ruby Documentation Project is created in order to facilitate the process of documenting the language.

If you prefer video tutorials, take a look at the one Steve Klabnik made.

documenting-ruby organization is the driving force behind the idea of, well, documenting Ruby - better. They have their own fork of a Ruby repo which is used to merge our well formed PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment