Skip to content

Instantly share code, notes, and snippets.

@rainly
Forked from rainux/build_sdoc.rb
Created February 25, 2011 02:46
Show Gist options
  • Save rainly/843303 to your computer and use it in GitHub Desktop.
Save rainly/843303 to your computer and use it in GitHub Desktop.
#!/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