Created
February 24, 2011 19:00
-
-
Save rainux/842664 to your computer and use it in GitHub Desktop.
Build gems docs with sdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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