Skip to content

Instantly share code, notes, and snippets.

@rainux
Created February 24, 2011 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rainux/842664 to your computer and use it in GitHub Desktop.
Save rainux/842664 to your computer and use it in GitHub Desktop.
Build gems docs with sdoc
#!/usr/bin/env ruby
require 'fileutils'
require 'tmpdir'
Gems = %w(factory_girl rspec-core capybara remarkable remarkable_activerecord)
output_dir = Dir.pwd
Dir.mktmpdir do |tmpdir|
Gems.each do |gem|
gemdir = `gem open -l #{gem} -x -c echo`.chomp
Dir.chdir(gemdir) do
system "sdoc -o #{tmpdir}/#{gem}"
end
end
FileUtils.rm_rf 'gems'
system "sdoc-merge -o gems -t 'Gems docs' #{tmpdir}/*"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment