Created
September 2, 2010 15:39
-
-
Save granth/562448 to your computer and use it in GitHub Desktop.
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
# Rack file for local Rubygems server, using YARD | |
require "rubygems" | |
require "yard" | |
libraries = {} | |
Gem.source_index.find_name('').each do |spec| | |
libraries[spec.name] ||= [] | |
libraries[spec.name] << YARD::Server::LibraryVersion.new(spec.name, spec.version.to_s, nil, :gem) | |
end | |
options = {:single_library => false} | |
server_options = {} | |
run YARD::Server::RackAdapter.new(libraries, options, server_options) |
I adapted this to pull from all gemsets (assuming you use rvm).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use this to make a
gems.local
site in OS X, using PassengerPane. You'll have to create apublic
directory, too, because PassengerPane insists on settingDocumentRoot
Rails-style.